Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS Code #376

Merged
merged 173 commits into from
Dec 9, 2021
Merged

VS Code #376

merged 173 commits into from
Dec 9, 2021

Conversation

lhstrh
Copy link
Member

@lhstrh lhstrh commented Jun 18, 2021

This is a draft pull request to track changes in the vscode branch.

The process for opening the extension should be straightforward. As stated by Alexander:

Simply run: gradlew startCode. You also need mvn on your path and if Java 11 is not your default JDK you need to prepend something like this: JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/

Features currently provided include:

  • Highlighting
    • Includes: Syntax highlighting, semantic highlighting
    • Triggered by: Opening a non-empty file with the file extension .lf. Full highlighting requires a target specification at the top of the file.
  • Building upon request by the user
    • Triggered by: Pressing Ctrl+Shift+P and entering the command "Build Lingua Franca" while an LF file is active in the editor
  • C++ validation
    • Triggered by: Opening a non-empty file with a C++ syntax error but no LF syntax errors and saving it, after a version of it has already been built. (It must be built beforehand because access to the CMake cache is required.)
  • Diagrams
    • Triggered by: Opening a Lingua Franca source file and clicking the diagrams icon: image

The Xtext team has already implemented many useful services, including the following. (It is not yet clear if all of them work.)

  • Content assist
  • Folding ranges
  • Find references
  • Quick fixes (beta)
  • Formatting
  • Hover
  • Highlight all references to the current symbol
  • Rename symbols
  • Get workspace symbols

Here is a list of current action items in this branch.

Required before the first release of the extension:

  • Correctly resolve dependencies that can only be retrieved using Gradle
  • Build in a way that allows faster development than fully generating the LDS jar
  • Syntax highlighting
  • Semantic highlighting
  • VS Code: Perform a full build iff the user requests it

For desired features that will not be implemented as part of this PR, see: https://github.com/lf-lang/lingua-franca/issues/614

petervdonovan and others added 27 commits October 29, 2021 16:53
It's a mystery to me why this one function was previously so slow. It looked like it was already theta(n). It's also worth noting that more optimization (by using primitives rather than Range objects) should be possible.
This is desired because it would be more convenient for the VS Code extension
to point to the same submodule versions as master.
TypeScript highlighting is too context-sensitive for this to work. Parameter types are also unaffected by this change, which means that in the future they must either be converted to declarative highlighting or (more likely) fine-tuned programmatically.
@lhstrh lhstrh merged commit 4bb86d6 into master Dec 9, 2021
@lhstrh lhstrh deleted the vscode branch December 9, 2021 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants