From b510db53aa2b4b7de17142cb0a293afb54b6d0d2 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Sun, 22 Sep 2024 22:46:33 +0800 Subject: [PATCH] Support puppet language --- README.md | 1 + README.zh-CN.md | 1 + langserver/puppet-languageserver.json | 10 ++++ lsp-bridge.el | 3 ++ todo.md | 78 +++++++++++++-------------- 5 files changed, 53 insertions(+), 40 deletions(-) create mode 100644 langserver/puppet-languageserver.json diff --git a/README.md b/README.md index 28d4181f07..7ad807a5c6 100644 --- a/README.md +++ b/README.md @@ -428,6 +428,7 @@ If your language supports mixed multi-language servers, it is recommended to che | | [python-ms](https://github.com/microsoft/python-language-server) | Legacy language server for Python2 | | | [ruff](https://github.com/charliermarsh/ruff-lsp) | `pip install ruff-lsp`, `lsp-bridge-python-lsp-server` is set to `ruff`, which only has the function of linter. If you need to complete the functions, install other Python language servers, and set the `lsp-bridge-python-multi-lsp-server` to `[LSP NAME]_ruff` | | QML | [qmlls](https://github.com/qt/qtdeclarative/tree/dev/tools/qmlls) | The `qmlls` binary should be part of the normal Qt packages since Qt 6.3.0 Ensure that the directory of `qmlls` binary file is in PATH | +| Puppet | [puppet-languageserver](https://github.com/puppetlabs/puppet-editor-services) | | | R | [rlanguageserver](https://github.com/REditorSupport/languageserver) | | | Racket | [racket-langserver](https://github.com/jeapostrophe/racket-langserver) | | | React | [typescript](https://github.com/microsoft/TypeScript) | `npm i -g typescript` | diff --git a/README.zh-CN.md b/README.zh-CN.md index 8b1a4c9616..0aed868707 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -423,6 +423,7 @@ lsp-bridge 针对许多语言都提供 2 个以上的语言服务器支持, | | [python-ms](https://github.com/microsoft/python-language-server) | 支持 Python2 的 lsp | | | [ruff](https://github.com/charliermarsh/ruff-lsp) | `pip install ruff-lsp`, `lsp-bridge-python-lsp-server` 设置成 `ruff`, 只具备 linter 的功能。 如需补全等功能, 安装其他的 Python 语言服务器, 并把 `lsp-bridge-python-multi-lsp-server` 设置成 `[相应的语言服务器名称]_ruff` | | QML | [qmlls](https://github.com/qt/qtdeclarative/tree/dev/tools/qmlls) | QT 6.3.0 之后的版本自带 qmlls, 将 qmlls 所在目录加到 PATH 中 | +| Puppet | [puppet-languageserver](https://github.com/puppetlabs/puppet-editor-services) | | | R | [rlanguageserver](https://github.com/REditorSupport/languageserver) | | | Racket | [racket-langserver](https://github.com/jeapostrophe/racket-langserver) | | | React | [typescript](https://github.com/microsoft/TypeScript) | `npm i -g typescript` | diff --git a/langserver/puppet-languageserver.json b/langserver/puppet-languageserver.json new file mode 100644 index 0000000000..6952531c73 --- /dev/null +++ b/langserver/puppet-languageserver.json @@ -0,0 +1,10 @@ +{ + "name": "puppet-languageserver", + "languageId": "puppet", + "command": [ + "ruby", + "puppet-languageserver", + "--stdio" + ], + "settings": {} +} diff --git a/lsp-bridge.el b/lsp-bridge.el index 96a2d772fc..0cabe72540 100644 --- a/lsp-bridge.el +++ b/lsp-bridge.el @@ -579,6 +579,7 @@ Possible choices are basedpyright_ruff, pyright_ruff, pyright-background-analysi (solidity-mode . "solidity") (gleam-ts-mode . "gleam") (ada-mode . "ada-language-server") + (puppet-mode . "puppet-languageserver") (nxml-mode . "lemminx") (robot-mode . "vscode-rf-language-server") (vimrc-mode . "vim-language-server") @@ -695,6 +696,7 @@ Possible choices are basedpyright_ruff, pyright_ruff, pyright-background-analysi solidity-mode-hook gleam-ts-mode-hook ada-mode-hook + puppet-mode-hook nxml-mode-hook robot-mode-hook vimrc-mode-hook @@ -765,6 +767,7 @@ you can customize `lsp-bridge-get-workspace-folder' to return workspace folder p (raku-mode . raku-indent-offset) ; Perl6/Raku (erlang-mode . erlang-indent-level) ; Erlang (ada-mode . ada-indent) ; Ada + (puppet-mode . puppet-indent-level) ; Puppet (nxml-mode . lsp-bridge-indent-two-level) ; XML (robot-mode . robot-mode-basic-offset) ; Robot (vimrc-mode . lsp-bridge-indent-four-level) ; Vim diff --git a/todo.md b/todo.md index 1b62a10356..2d543a2947 100644 --- a/todo.md +++ b/todo.md @@ -4,80 +4,78 @@ Below LSP server haven't supported, PR are welcome. ;) 2. **PowerShell**: [github.com/PowerShell/PowerShellEditorServices](https://github.com/PowerShell/PowerShellEditorServices) (need env to test start command) -3. **Puppet**: [github.com/lingua-pupuli/puppet-editor-services](https://github.com/lingua-pupuli/puppet-editor-services) +3. **Helm (Kubernetes)**: [github.com/mrjosh/helm-ls](https://github.com/mrjosh/helm-ls) -4. **Helm (Kubernetes)**: [github.com/mrjosh/helm-ls](https://github.com/mrjosh/helm-ls) +4. **SystemVerilog**: [github.com/dalance/svls](https://github.com/dalance/svls) -5. **SystemVerilog**: [github.com/dalance/svls](https://github.com/dalance/svls) +5. **Rego**: [github.com/StyraInc/regal](https://github.com/StyraInc/regal) -6. **Rego**: [github.com/StyraInc/regal](https://github.com/StyraInc/regal) +6. **Apache Camel**: [github.com/camel-tooling/camel-language-server](https://github.com/camel-tooling/camel-language-server) -7. **Apache Camel**: [github.com/camel-tooling/camel-language-server](https://github.com/camel-tooling/camel-language-server) +7. **Cucumber (Gherkin)**: cucumber/language-server -8. **Cucumber (Gherkin)**: cucumber/language-server +8. **Snyk**: [github.com/snyk/snyk-ls](https://github.com/snyk/snyk-ls) -9. **Snyk**: [github.com/snyk/snyk-ls](https://github.com/snyk/snyk-ls) +9. **LanguageTool**: [github.com/valentjn/ltex-ls](https://github.com/valentjn/ltex-ls) -10. **LanguageTool**: [github.com/valentjn/ltex-ls](https://github.com/valentjn/ltex-ls) +10. **JS/TS + PHP + Python + Java**: [github.com/SonarSource/sonarlint-language-server](https://github.com/SonarSource/sonarlint-language-server) -11. **JS/TS + PHP + Python + Java**: [github.com/SonarSource/sonarlint-language-server](https://github.com/SonarSource/sonarlint-language-server) +11. **Gauge**: [github.com/getgauge/gauge](https://github.com/getgauge/gauge) -12. **Gauge**: [github.com/getgauge/gauge](https://github.com/getgauge/gauge) +12. **Coq**: coq-lsp -13. **Coq**: coq-lsp +13. **Delphi**: Embarcadero (Proprietary - DelphiLSP) -14. **Delphi**: Embarcadero (Proprietary - DelphiLSP) +14. **BibTeX**: [github.com/oncomouse/citation-langserver](https://github.com/oncomouse/citation-langserver) -15. **BibTeX**: [github.com/oncomouse/citation-langserver](https://github.com/oncomouse/citation-langserver) +15. **JSON-LD**: [github.com/ajuvercr/jsonld-lsp](https://github.com/ajuvercr/jsonld-lsp) -16. **JSON-LD**: [github.com/ajuvercr/jsonld-lsp](https://github.com/ajuvercr/jsonld-lsp) +16. **Ballerina**: [github.com/ballerina-platform/ballerina-lang/tree/master/language-server](https://github.com/ballerina-platform/ballerina-lang/tree/master/language-server) -17. **Ballerina**: [github.com/ballerina-platform/ballerina-lang/tree/master/language-server](https://github.com/ballerina-platform/ballerina-lang/tree/master/language-server) +17. **Langium**: [github.com/langium/langium](https://github.com/langium/langium) -18. **Langium**: [github.com/langium/langium](https://github.com/langium/langium) +18. **Odin**: [github.com/DanielGavin/ols](https://github.com/DanielGavin/ols) -19. **Odin**: [github.com/DanielGavin/ols](https://github.com/DanielGavin/ols) +19. **Xtext** (Any Language): [github.com/eclipse/xtext-core](https://github.com/eclipse/xtext-core) -20. **Xtext** (Any Language): [github.com/eclipse/xtext-core](https://github.com/eclipse/xtext-core) +20. **ActionScript3**: [github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server](https://github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server) -21. **ActionScript3**: [github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server](https://github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server) +21. **Raku**: [github.com/bscan/RakuNavigator](https://github.com/bscan/RakuNavigator) -22. **Raku**: [github.com/bscan/RakuNavigator](https://github.com/bscan/RakuNavigator) +22. **Flux**: [github.com/influxdata/flux-lsp](https://github.com/influxdata/flux-lsp) -23. **Flux**: [github.com/influxdata/flux-lsp](https://github.com/influxdata/flux-lsp) +23. **SPARQL**: [github.com/stardog-union/stardog-language-servers/tree/master/packages/sparql-language-server](https://github.com/stardog-union/stardog-language-servers/tree/master/packages/sparql-language-server) -24. **SPARQL**: [github.com/stardog-union/stardog-language-servers/tree/master/packages/sparql-language-server](https://github.com/stardog-union/stardog-language-servers/tree/master/packages/sparql-language-server) +24. **Turtle**: [github.com/stardog-union/stardog-language-servers/tree/master/packages/turtle-language-server](https://github.com/stardog-union/stardog-language-servers/tree/master/packages/turtle-language-server) -25. **Turtle**: [github.com/stardog-union/stardog-language-servers/tree/master/packages/turtle-language-server](https://github.com/stardog-union/stardog-language-servers/tree/master/packages/turtle-language-server) +25. **Common Workflow Language (CWL)**: Rabix/Benten -26. **Common Workflow Language (CWL)**: Rabix/Benten +26. **Smalltalk/Pharo**: [github.com/badetitou/Pharo-LanguageServer](https://github.com/badetitou/Pharo-LanguageServer) -27. **Smalltalk/Pharo**: [github.com/badetitou/Pharo-LanguageServer](https://github.com/badetitou/Pharo-LanguageServer) +27. **DreamMaker**: [github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver](https://github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver) -28. **DreamMaker**: [github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver](https://github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver) +28. **Grain**: [github.com/grain-lang/grain](https://github.com/grain-lang/grain) -29. **Grain**: [github.com/grain-lang/grain](https://github.com/grain-lang/grain) +29. **V**: [github.com/vlang/v-analyzer](https://github.com/vlang/v-analyzer) -30. **V**: [github.com/vlang/v-analyzer](https://github.com/vlang/v-analyzer) +30. **TTCN-3**: [github.com/nokia/ntt](https://github.com/nokia/ntt) -31. **TTCN-3**: [github.com/nokia/ntt](https://github.com/nokia/ntt) +31. **Red**: [github.com/bitbegin/redlangserver](https://github.com/bitbegin/redlangserver) -32. **Red**: [github.com/bitbegin/redlangserver](https://github.com/bitbegin/redlangserver) +32. **Fennel**: [git.sr.ht/~xerool/fennel-ls](https://git.sr.ht/~xerool/fennel-ls) -33. **Fennel**: [git.sr.ht/~xerool/fennel-ls](https://git.sr.ht/~xerool/fennel-ls) +33. **Erg**: [github.com/erg-lang/erg/tree/main/crates/els](https://github.com/erg-lang/erg/tree/main/crates/els) -34. **Erg**: [github.com/erg-lang/erg/tree/main/crates/els](https://github.com/erg-lang/erg/tree/main/crates/els) +34. **Fuzion**: [github.com/tokiwa-software/fuzion-lsp-server](https://github.com/tokiwa-software/fuzion-lsp-server) -35. **Fuzion**: [github.com/tokiwa-software/fuzion-lsp-server](https://github.com/tokiwa-software/fuzion-lsp-server) +35. **Imandra Protocol Language**: [github.com/AestheticIntegration/ipl-vscode](https://github.com/AestheticIntegration/ipl-vscode) -36. **Imandra Protocol Language**: [github.com/AestheticIntegration/ipl-vscode](https://github.com/AestheticIntegration/ipl-vscode) +36. **MOCA**: [github.com/mrglassdanny/moca-language-server](https://github.com/mrglassdanny/moca-language-server) -37. **MOCA**: [github.com/mrglassdanny/moca-language-server](https://github.com/mrglassdanny/moca-language-server) +37. **openVALIDATION**: [github.com/openvalidation/ov-language-server](https://github.com/openvalidation/ov-language-server) -38. **openVALIDATION**: [github.com/openvalidation/ov-language-server](https://github.com/openvalidation/ov-language-server) +38. **Veryl**: [github.com/dalance/veryl/tree/master/crates/languageserver](https://github.com/dalance/veryl/tree/master/crates/languageserver) -39. **Veryl**: [github.com/dalance/veryl/tree/master/crates/languageserver](https://github.com/dalance/veryl/tree/master/crates/languageserver) +39. **Standard ML**: Millet -40. **Standard ML**: Millet - -41. **Systemtap**: Systemtap LSP +40. **Systemtap**: Systemtap LSP