-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modelica Language Server initial commit
- Loading branch information
0 parents
commit d509d47
Showing
43 changed files
with
6,195 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/** | ||
client/node_modules/** | ||
client/out/** | ||
server/node_modules/** | ||
server/out/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/**@type {import('eslint').Linter.Config} */ | ||
// eslint-disable-next-line no-undef | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
plugins: [ | ||
'@typescript-eslint', | ||
], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
rules: { | ||
'semi': [2, "always"], | ||
'@typescript-eslint/no-unused-vars': 0, | ||
'@typescript-eslint/no-explicit-any': 0, | ||
'@typescript-eslint/explicit-module-boundary-types': 0, | ||
'@typescript-eslint/no-non-null-assertion': 0, | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: npm | ||
directory: / | ||
schedule: | ||
interval: monthly | ||
|
||
- package-ecosystem: github-actions | ||
directory: / | ||
schedule: | ||
interval: monthly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "v*.*.*" | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup npm | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: Install X server | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y xvfb | ||
- name: Install the dependencies | ||
run: npm clean-install && npm run postinstall | ||
|
||
- name: Build package | ||
run: npm run esbuild | ||
|
||
- name: Test language server | ||
run: npm run test:server | ||
|
||
- name: Test language server client | ||
run: | | ||
Xvfb -ac :99 -screen 0 1280x1024x16 & | ||
export DISPLAY=:99 | ||
npm run test | ||
- name: Package Extension | ||
run: npx vsce package | ||
|
||
- name: Archive vsix package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: modelica-language-server.vsix | ||
path: modelica-language-server-*.vsix | ||
|
||
release: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: build | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: modelica-language-server.vsix | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
modelica-language-server-*.vsix | ||
fail_on_unmatched_files: true | ||
generate_release_notes: true | ||
append_body: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.vscode-test | ||
modelica-language-server*.vsix | ||
node_modules/ | ||
out/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"AnHeuermann.metamodelica" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// A launch configuration that compiles the extension and then opens it inside a | ||
// new window | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Launch Client", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"runtimeExecutable": "${execPath}", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceRoot}" | ||
], | ||
"outFiles": [ | ||
"${workspaceRoot}/out/**/*.js" | ||
], | ||
"preLaunchTask": { | ||
"type": "npm", | ||
"script": "esbuild-watch" | ||
} | ||
}, | ||
{ | ||
"name": "Language Server E2E Test", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"runtimeExecutable": "${execPath}", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceRoot}", | ||
"--extensionTestsPath=${workspaceRoot}/client/out/test/index", | ||
"${workspaceRoot}/client/testFixture" | ||
], | ||
"outFiles": [ | ||
"${workspaceRoot}/client/out/test/**/*.js" | ||
], | ||
"preLaunchTask": { | ||
"type": "npm", | ||
"script": "test-compile" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"editor.insertSpaces": false, | ||
"typescript.tsc.autoDetect": "off", | ||
"typescript.preferences.quoteStyle": "single", | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": "explicit" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "compile", | ||
"group": "build", | ||
"presentation": { | ||
"panel": "dedicated", | ||
"reveal": "never" | ||
}, | ||
"problemMatcher": [ | ||
"$tsc" | ||
] | ||
}, | ||
{ | ||
"type": "npm", | ||
"script": "watch", | ||
"isBackground": true, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
}, | ||
"presentation": { | ||
"panel": "dedicated", | ||
"reveal": "never" | ||
}, | ||
"problemMatcher": [ | ||
"$tsc-watch" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
!server/OSMC-License.txt | ||
.eslintignore | ||
.github | ||
.gitignore | ||
.travis.yml | ||
.vscode/** | ||
**/*.map | ||
**/*.ts | ||
**/tsconfig.base.json | ||
**/tsconfig.json | ||
client/ | ||
contributing.md | ||
esbuild.config.js | ||
node_modules/ | ||
scripts/ | ||
server/ |
Oops, something went wrong.