Skip to content

Commit

Permalink
Cleanup for extension publish! v0.0.1 is out!
Browse files Browse the repository at this point in the history
  • Loading branch information
VonTum committed Jul 28, 2024
1 parent ebcf11d commit 9f89e2d
Show file tree
Hide file tree
Showing 28 changed files with 96 additions and 3,843 deletions.
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
node_modules/**
client/node_modules/**
client/out/**
server/node_modules/**
server/out/**
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"typescript.preferences.quoteStyle": "single",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
}
},
"sus_lsp.executable_path": "/home/lennart/Desktop/sus-compiler/target/release/sus_compiler"
}
7 changes: 6 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
.vscode/**
**/*.ts
**/*.map
**/*.sus
.gitignore
**/tsconfig.json
**/tsconfig.base.json
contributing.md
.travis.yml
make_extention.sh
.eslintignore
client/node_modules/**
client/out/test/**
!client/node_modules/vscode-jsonrpc/**
!client/node_modules/vscode-languageclient/**
!client/node_modules/vscode-languageserver-protocol/**
!client/node_modules/vscode-languageserver-types/**
!client/node_modules/{minimatch,brace-expansion,concat-map,balanced-match}/**
!client/node_modules/{semver,lru-cache,yallist}/**
!client/node_modules/{semver,lru-cache,yallist}/**
node_modules/**
36 changes: 2 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,5 @@
# LSP Example
# SUS Compiler VSCode Language Support

Heavily documented sample code for https://code.visualstudio.com/api/language-extensions/language-server-extension-guide
The actual brains of the Language Server are part of the sus_compiler itself. For this, please have a look at the main repository: [https://github.com/pc2/sus-compiler](https://github.com/pc2/sus-compiler)

## Functionality

This Language Server works for plain text file. It has the following language features:
- Completions
- Diagnostics regenerated on each file change or configuration change

It also includes an End-to-End test.

## Structure

```
.
├── client // Language Client
│ ├── src
│ │ ├── test // End to End tests for Language Client / Server
│ │ └── extension.ts // Language Client entry point
├── package.json // The extension manifest.
└── server // Language Server
└── src
└── server.ts // Language Server entry point
```

## Running the Sample

- Run `npm install` in this folder. This installs all necessary npm modules in both the client and server folder
- Open VS Code on this folder.
- Press Ctrl+Shift+B to start compiling the client and server in [watch mode](https://code.visualstudio.com/docs/editor/tasks#:~:text=The%20first%20entry%20executes,the%20HelloWorld.js%20file.).
- Switch to the Run and Debug View in the Sidebar (Ctrl+Shift+D).
- Select `Launch Client` from the drop down (if it is not already).
- Press ▷ to run the launch config (F5).
- In the [Extension Development Host](https://code.visualstudio.com/api/get-started/your-first-extension#:~:text=Then%2C%20inside%20the%20editor%2C%20press%20F5.%20This%20will%20compile%20and%20run%20the%20extension%20in%20a%20new%20Extension%20Development%20Host%20window.) instance of VSCode, open a document in 'plain text' language mode.
- Type `j` or `t` to see `Javascript` and `TypeScript` completion.
- Enter text content such as `AAA aaa BBB`. The extension will emit diagnostics for all words in all-uppercase.
38 changes: 29 additions & 9 deletions client/out/extension.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion client/out/extension.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9f89e2d

Please sign in to comment.