Skip to content

Commit

Permalink
Merge pull request #156 from lf-lang/extending
Browse files Browse the repository at this point in the history
Lingua Franca Package Explorer: extensions to UI in VScode plugin
  • Loading branch information
lhstrh authored Oct 9, 2024
2 parents d39a359 + 2e7a5be commit 6fa89c7
Show file tree
Hide file tree
Showing 11 changed files with 1,246 additions and 52 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ node_modules/*
out/
.gradle/*
__pycache__/*
.DS_Store
lfw-pkg/
dist/
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"sourceMaps": true,
"request": "launch",
"type": "extensionHost",
"preLaunchTask": "${defaultBuildTask}"
Expand Down Expand Up @@ -58,6 +59,25 @@
"${workspaceFolder}/out/**/*.js"
],
},
{
"name": "Launch VS Code Extension (Socket) LF",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/",
],
"env": {
"LF_LS_PORT": "7670"
},
"skipFiles": [
"<node_internals>/**"
],
"sourceMaps": true,
"smartStep": true,
"outFiles": [
"${workspaceFolder}/out/**/*.js",
],
},
{
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
![Open VSX Downloads](https://img.shields.io/open-vsx/dt/lf-lang/vscode-lingua-franca?label=Open%20VSX%20Registry%20%E2%A4%93)
![Visual Studio Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/lf-lang.vscode-lingua-franca?label=VS%20Marketplace%20%E2%A4%93)

This extension adds language support for [Lingua Franca (LF)](https://www.lf-lang.org/). It is based on the LF Language and Diagram Server and provides:
This extension adds language support for [Lingua Franca (LF)](https://www.lf-lang.org/).

## ✨ Check out the new Lingua Franca Package Explorer! ✨
Click on the LF icon in the Activity Bar on the left, which features two distinct tree-view sections:
* **Local Libraries:** Unpublished libraries found in the local filesystem under `./src/lib`;
* **Lingo Libraries:** Published libraries downloaded into the workspace using the [Lingo package manager](https://github.com/lf-lang/lingo/).

## Other features
* find references
* folding ranges
* get workspace symbols
Expand Down
37 changes: 37 additions & 0 deletions images/logo/lf-logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions images/logo/lf-logo-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
133 changes: 132 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,24 @@
}
}
],
"colors": [
{
"id": "editorIcon.currentProject",
"description": "Color for a TreeIteem label",
"defaults": {
"dark": "#57cc99",
"light": "#57cc99"
}
},
{
"id": "editorIcon.notCurrentProject",
"description": "Color for a TreeIteem label",
"defaults": {
"dark": "#fcbf49",
"light": "#fcbf49"
}
}
],
"semanticTokenScopes": [
{
"scopes": {
Expand All @@ -83,7 +101,8 @@
},
{
"command": "linguafranca.buildAndRun",
"title": "Lingua Franca: Build and Run"
"title": "Lingua Franca: Build and Run",
"icon": "$(play)"
},
{
"command": "linguafranca.checkDocker",
Expand All @@ -94,10 +113,51 @@
"title": "New Lingua Franca File",
"shortTitle": "Lingua Franca File"
},
{
"command": "linguafranca.refreshEntries",
"title": "Refresh Tree View",
"icon": "$(refresh)"
},
{
"command": "linguafranca.goToFile",
"title": "Go To Selected File",
"icon": "$(go-to-file)"
},
{
"command": "linguafranca.importReactor",
"title": "Import Selected Reactor",
"icon": "$(insert)"
},
{
"command": "linguafranca.openInSplitView",
"title": "Open in Split View",
"icon": "$(split-horizontal)"
},
{
"command": "linguafranca.collapseAll",
"title": "Collapse All",
"icon": "$(collapse-all)"
},
{
"command": "linguafranca.getVersion",
"title": "Lingua Franca: Get Version"
},
{
"command": "linguafranca.includeProject",
"title": "Include in current project",
"icon": "$(desktop-download)"
},
{
"command": "linguafranca.goToLingoToml",
"title": "Go to Lingo.toml",
"icon": "$(edit)"
},
{
"command": "linguafranca.openInTerminal",
"title": "Open in Terminal",
"icon": "$(terminal)"
}

],
"configuration": {
"title": "LinguaFranca",
Expand All @@ -120,6 +180,11 @@
"when": "resourceLangId == lflang",
"command": "klighd-vscode.diagram.open",
"group": "navigation"
},
{
"when": "resourceLangId == lflang",
"command": "linguafranca.buildAndRun",
"group": "navigation"
}
],
"editor/context": [
Expand All @@ -146,7 +211,73 @@
"command": "linguafranca.getVersion",
"when": "false"
}
],
"view/title": [
{
"command": "linguafranca.refreshEntries",
"group": "navigation@1",
"when": "view == lf-lang-projects"
},
{
"command": "linguafranca.collapseAll",
"group": "navigation@2",
"when": "view == lf-lang-projects"
}

],
"view/item/context" : [
{
"command": "linguafranca.openInTerminal",
"group": "inline@1",
"when": "viewItem == project"
},
{
"command": "linguafranca.includeProject",
"group": "inline@1",
"when": "viewItem == root || viewItem == file-local"
},
{
"command": "linguafranca.goToFile",
"group": "inline@2",
"when": "viewItem == file-local || viewItem == file-lingo || viewItem == file-local-included || viewItem == reactor || viewItem == reactor-included"
},
{
"command": "linguafranca.openInSplitView",
"group": "inline@3",
"when": "viewItem == file-local || viewItem == file-lingo || viewItem == file-local-included"
},
{
"command": "linguafranca.openInSplitView",
"when": "viewItem == reactor || viewItem == reactor-included"
},
{
"command": "linguafranca.importReactor",
"group": "inline@3",
"when": "viewItem == reactor-included"
},
{
"command": "linguafranca.goToLingoToml",
"group": "inline",
"when": "viewItem == lingo"
}
]
},
"viewsContainers": {
"activitybar": [
{
"id": "lf-lang",
"title": "Lingua Franca Projects",
"icon": "images/logo/lf-logo-dark.svg"
}
]
},
"views": {
"lf-lang": [
{
"id": "lf-lang-projects",
"name": ""
}
]
}
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 6fa89c7

Please sign in to comment.