From ae6b4702b6f47dda77e04ff8c820c4a24a8ba708 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Sun, 22 Sep 2024 23:19:37 +0800 Subject: [PATCH] Add camells LSP server. --- README.md | 8 +++-- README.zh-CN.md | 8 +++-- langserver/camells.json | 8 +++++ lsp-bridge.el | 6 +++- todo.md | 70 +++++++++++++++++++---------------------- 5 files changed, 56 insertions(+), 44 deletions(-) create mode 100644 langserver/camells.json diff --git a/README.md b/README.md index 6ebeb0428e..078fc7d44c 100644 --- a/README.md +++ b/README.md @@ -271,6 +271,7 @@ lsp-bridge provides support for more than two language servers for many language - `lsp-bridge-markdown-lsp-server`: Markdown language server, you can choose `vale-ls` or `marksman` - `lsp-bridge-lua-lsp-server`: Lua language server, you can choose `sumneko` or `lua-lsp` - `lsp-bridge-verilog-lsp-server`: Verilog language server, you can choose `verible`, or `svls` +- `lsp-bridge-xml-lsp-server`: XML language server, you can choose `lemminx`, or `camells` ## Options @@ -447,13 +448,14 @@ If your language supports mixed multi-language servers, it is recommended to che | Terraform | [terraform-ls](https://github.com/hashicorp/terraform-ls) | | | Typescript | [typescript](https://github.com/typescript-language-server/typescript-language-server) | | | Typst | [typst-lsp](https://github.com/nvarner/typst-lsp) | | -| Verilog | [verible](https://github.com/chipsalliance/verible) | | -| | [svls](https://github.com/dalance/svls) | | +| Verilog | [verible](https://github.com/chipsalliance/verible) | `lsp-bridge-verilog-lsp-server` set to `verible` | +| | [svls](https://github.com/dalance/svls) | `lsp-bridge-verilog-lsp-server` set to `svls` | | VHDL | [vhdl-tool](https://www.vhdltool.com) | | | Vim | [vim-language-server](https://github.com/iamcco/vim-language-server) | `npm install -g vim-language-server` | | Vue | [volar](https://github.com/johnsoncodehk/volar) | `npm install -g typescript @vue/language-server` | | Wxml | [wxml-language-server](https://github.com/chemzqm/wxml-languageserver) | | -| XML | [lemminx](https://github.com/eclipse/lemminx) | | +| XML | [lemminx](https://github.com/eclipse/lemminx) | `lsp-bridge-xml-lsp-server` set to `lemminx` | +| | [camells](https://github.com/camel-tooling/camel-language-server) | `lsp-bridge-xml-lsp-server` set to `camells` | | Yang | [yang-ls](https://github.com/TypeFox/yang-lsp) | | | Yaml | [yaml-language-server](https://github.com/redhat-developer/yaml-language-server) | `npm install -g yaml-language-server` | | Zig | [zls](https://github.com/zigtools/zls) | Execute `zls config` to generate configuration for `zls`. see [Configuration Options](https://github.com/zigtools/zls#configuration-options) | diff --git a/README.zh-CN.md b/README.zh-CN.md index 7862f64c94..4b97a613c1 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -266,6 +266,7 @@ lsp-bridge 针对许多语言都提供 2 个以上的语言服务器支持, - `lsp-bridge-markdown-lsp-server`: Markdown 语言的服务器, 可以选择 `vale-ls` 或者 `marksman` - `lsp-bridge-lua-lsp-server`: Lua 语言的服务器, 可以选择 `sumneko`, 或者 `lua-lsp` - `lsp-bridge-verilog-lsp-server`: Verilog 语言的服务器, 可以选择 `verible`, 或者 `svls` +- `lsp-bridge-xml-lsp-server`: XML 语言的服务器, 可以选择 `lemminx`, 或者 `camells` ## 选项 @@ -442,13 +443,14 @@ lsp-bridge 针对许多语言都提供 2 个以上的语言服务器支持, | Terraform | [terraform-ls](https://github.com/hashicorp/terraform-ls) | | | Typescript | [typescript](https://github.com/typescript-language-server/typescript-language-server) | | | Typst | [typst-lsp](https://github.com/nvarner/typst-lsp) | | -| Verilog | [verible](https://github.com/chipsalliance/verible) | | -| | [svls](https://github.com/dalance/svls) | | +| Verilog | [verible](https://github.com/chipsalliance/verible) | `lsp-bridge-verilog-lsp-server` 设置为 `verible` | +| | [svls](https://github.com/dalance/svls) | `lsp-bridge-verilog-lsp-server` 设置为 `svls` | | VHDL | [vhdl-tool](https://www.vhdltool.com) | | | Vim | [vim-language-server](https://github.com/iamcco/vim-language-server) | `npm install -g vim-language-server` | | Vue | [volar](https://github.com/johnsoncodehk/volar) | `npm install -g typescript @vue/language-server` | | Wxml | [wxml-language-server](https://github.com/chemzqm/wxml-languageserver) | | -| XML | [lemminx](https://github.com/eclipse/lemminx) | | +| XML | [lemminx](https://github.com/eclipse/lemminx) | `lsp-bridge-xml-lsp-server` 设置为 `lemminx` | +| | [camells](https://github.com/camel-tooling/camel-language-server/) | `lsp-bridge-xml-lsp-server` 设置为 `camells` | | Yang | [yang-ls](https://github.com/TypeFox/yang-lsp) | | | Yaml | [yaml-language-server](https://github.com/redhat-developer/yaml-language-server) | `npm install -g yaml-language-server` | | Zig | [zls](https://github.com/zigtools/zls) | 运行 `zls config` 来生成 zls 的配置。 参考 [Configuration Options](https://github.com/zigtools/zls#configuration-options) | diff --git a/langserver/camells.json b/langserver/camells.json new file mode 100644 index 0000000000..daf5878300 --- /dev/null +++ b/langserver/camells.json @@ -0,0 +1,8 @@ +{ + "name": "camells", + "languageId": "xml", + "command": [ + "camells" + ], + "settings": {} +} diff --git a/lsp-bridge.el b/lsp-bridge.el index 72c8049baa..60c4293386 100644 --- a/lsp-bridge.el +++ b/lsp-bridge.el @@ -508,6 +508,10 @@ Possible choices are basedpyright_ruff, pyright_ruff, pyright-background-analysi "Default LSP server for Verilog, you can choose `verible', `svls'" :type 'string) +(defcustom lsp-bridge-xml-lsp-server "lemminx" + "Default LSP server for XML, you can choose `lemminx', `camells'" + :type 'string) + (defcustom lsp-bridge-use-wenls-in-org-mode nil "Use `wen' lsp server in org-mode, default is disable.") @@ -585,7 +589,7 @@ Possible choices are basedpyright_ruff, pyright_ruff, pyright-background-analysi (ada-mode . "ada-language-server") (rego-mode . "regal") (puppet-mode . "puppet-languageserver") - (nxml-mode . "lemminx") + (nxml-mode . lsp-bridge-xml-lsp-server) (robot-mode . "vscode-rf-language-server") (vimrc-mode . "vim-language-server") (terraform-mode . "terraform-ls") diff --git a/todo.md b/todo.md index 25edeba547..a28db9db3f 100644 --- a/todo.md +++ b/todo.md @@ -4,72 +4,68 @@ 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. **Apache Camel**: [github.com/camel-tooling/camel-language-server](https://github.com/camel-tooling/camel-language-server) +3. **Cucumber (Gherkin)**: cucumber/language-server -4. **Cucumber (Gherkin)**: cucumber/language-server +4. **Snyk**: [github.com/snyk/snyk-ls](https://github.com/snyk/snyk-ls) -5. **Snyk**: [github.com/snyk/snyk-ls](https://github.com/snyk/snyk-ls) +5. **LanguageTool**: [github.com/valentjn/ltex-ls](https://github.com/valentjn/ltex-ls) -6. **LanguageTool**: [github.com/valentjn/ltex-ls](https://github.com/valentjn/ltex-ls) +6. **Gauge**: [github.com/getgauge/gauge](https://github.com/getgauge/gauge) -7. **JS/TS + PHP + Python + Java**: [github.com/SonarSource/sonarlint-language-server](https://github.com/SonarSource/sonarlint-language-server) +7. **Coq**: coq-lsp -8. **Gauge**: [github.com/getgauge/gauge](https://github.com/getgauge/gauge) +8. **Delphi**: Embarcadero (Proprietary - DelphiLSP) -9. **Coq**: coq-lsp +9. **BibTeX**: [github.com/oncomouse/citation-langserver](https://github.com/oncomouse/citation-langserver) -10. **Delphi**: Embarcadero (Proprietary - DelphiLSP) +10. **JSON-LD**: [github.com/ajuvercr/jsonld-lsp](https://github.com/ajuvercr/jsonld-lsp) -11. **BibTeX**: [github.com/oncomouse/citation-langserver](https://github.com/oncomouse/citation-langserver) +11. **Ballerina**: [github.com/ballerina-platform/ballerina-lang/tree/master/language-server](https://github.com/ballerina-platform/ballerina-lang/tree/master/language-server) -12. **JSON-LD**: [github.com/ajuvercr/jsonld-lsp](https://github.com/ajuvercr/jsonld-lsp) +12. **Langium**: [github.com/langium/langium](https://github.com/langium/langium) -13. **Ballerina**: [github.com/ballerina-platform/ballerina-lang/tree/master/language-server](https://github.com/ballerina-platform/ballerina-lang/tree/master/language-server) +13. **Odin**: [github.com/DanielGavin/ols](https://github.com/DanielGavin/ols) -14. **Langium**: [github.com/langium/langium](https://github.com/langium/langium) +14. **Xtext** (Any Language): [github.com/eclipse/xtext-core](https://github.com/eclipse/xtext-core) -15. **Odin**: [github.com/DanielGavin/ols](https://github.com/DanielGavin/ols) +15. **ActionScript3**: [github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server](https://github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server) -16. **Xtext** (Any Language): [github.com/eclipse/xtext-core](https://github.com/eclipse/xtext-core) +16. **Raku**: [github.com/bscan/RakuNavigator](https://github.com/bscan/RakuNavigator) -17. **ActionScript3**: [github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server](https://github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server) +17. **Flux**: [github.com/influxdata/flux-lsp](https://github.com/influxdata/flux-lsp) -18. **Raku**: [github.com/bscan/RakuNavigator](https://github.com/bscan/RakuNavigator) +18. **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) -19. **Flux**: [github.com/influxdata/flux-lsp](https://github.com/influxdata/flux-lsp) +19. **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) -20. **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) +20. **Common Workflow Language (CWL)**: Rabix/Benten -21. **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) +21. **Smalltalk/Pharo**: [github.com/badetitou/Pharo-LanguageServer](https://github.com/badetitou/Pharo-LanguageServer) -22. **Common Workflow Language (CWL)**: Rabix/Benten +22. **DreamMaker**: [github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver](https://github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver) -23. **Smalltalk/Pharo**: [github.com/badetitou/Pharo-LanguageServer](https://github.com/badetitou/Pharo-LanguageServer) +23. **Grain**: [github.com/grain-lang/grain](https://github.com/grain-lang/grain) -24. **DreamMaker**: [github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver](https://github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver) +24. **V**: [github.com/vlang/v-analyzer](https://github.com/vlang/v-analyzer) -25. **Grain**: [github.com/grain-lang/grain](https://github.com/grain-lang/grain) +25. **TTCN-3**: [github.com/nokia/ntt](https://github.com/nokia/ntt) -26. **V**: [github.com/vlang/v-analyzer](https://github.com/vlang/v-analyzer) +26. **Red**: [github.com/bitbegin/redlangserver](https://github.com/bitbegin/redlangserver) -27. **TTCN-3**: [github.com/nokia/ntt](https://github.com/nokia/ntt) +27. **Fennel**: [git.sr.ht/~xerool/fennel-ls](https://git.sr.ht/~xerool/fennel-ls) -28. **Red**: [github.com/bitbegin/redlangserver](https://github.com/bitbegin/redlangserver) +28. **Erg**: [github.com/erg-lang/erg/tree/main/crates/els](https://github.com/erg-lang/erg/tree/main/crates/els) -29. **Fennel**: [git.sr.ht/~xerool/fennel-ls](https://git.sr.ht/~xerool/fennel-ls) +29. **Fuzion**: [github.com/tokiwa-software/fuzion-lsp-server](https://github.com/tokiwa-software/fuzion-lsp-server) -30. **Erg**: [github.com/erg-lang/erg/tree/main/crates/els](https://github.com/erg-lang/erg/tree/main/crates/els) +30. **Imandra Protocol Language**: [github.com/AestheticIntegration/ipl-vscode](https://github.com/AestheticIntegration/ipl-vscode) -31. **Fuzion**: [github.com/tokiwa-software/fuzion-lsp-server](https://github.com/tokiwa-software/fuzion-lsp-server) +31. **MOCA**: [github.com/mrglassdanny/moca-language-server](https://github.com/mrglassdanny/moca-language-server) -32. **Imandra Protocol Language**: [github.com/AestheticIntegration/ipl-vscode](https://github.com/AestheticIntegration/ipl-vscode) +32. **openVALIDATION**: [github.com/openvalidation/ov-language-server](https://github.com/openvalidation/ov-language-server) -33. **MOCA**: [github.com/mrglassdanny/moca-language-server](https://github.com/mrglassdanny/moca-language-server) +33. **Veryl**: [github.com/dalance/veryl/tree/master/crates/languageserver](https://github.com/dalance/veryl/tree/master/crates/languageserver) -34. **openVALIDATION**: [github.com/openvalidation/ov-language-server](https://github.com/openvalidation/ov-language-server) +34. **Standard ML**: Millet -35. **Veryl**: [github.com/dalance/veryl/tree/master/crates/languageserver](https://github.com/dalance/veryl/tree/master/crates/languageserver) - -36. **Standard ML**: Millet - -37. **Systemtap**: Systemtap LSP +35. **Systemtap**: Systemtap LSP