From 1dceac7fa6e6a16c1c67fcc51b1ecbee667d32b4 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Sun, 22 Sep 2024 22:34:49 +0800 Subject: [PATCH] Support XML language --- README.md | 1 + README.zh-CN.md | 1 + langserver/lemminx.json | 8 ++++ lsp-bridge.el | 3 ++ todo.md | 82 ++++++++++++++++++++--------------------- 5 files changed, 52 insertions(+), 43 deletions(-) create mode 100644 langserver/lemminx.json diff --git a/README.md b/README.md index 0f77f58c9f..28d4181f07 100644 --- a/README.md +++ b/README.md @@ -449,6 +449,7 @@ If your language supports mixed multi-language servers, it is recommended to che | 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) | | | 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 8e0d921eb4..8b1a4c9616 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -444,6 +444,7 @@ lsp-bridge 针对许多语言都提供 2 个以上的语言服务器支持, | 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) | | | 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/lemminx.json b/langserver/lemminx.json new file mode 100644 index 0000000000..9747fb354b --- /dev/null +++ b/langserver/lemminx.json @@ -0,0 +1,8 @@ +{ + "name": "lemminx", + "languageId": "xml", + "command": [ + "lemminx" + ], + "settings": {} +} diff --git a/lsp-bridge.el b/lsp-bridge.el index 24446a04a9..96a2d772fc 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") + (nxml-mode . "lemminx") (robot-mode . "vscode-rf-language-server") (vimrc-mode . "vim-language-server") (terraform-mode . "terraform-ls") @@ -694,6 +695,7 @@ Possible choices are basedpyright_ruff, pyright_ruff, pyright-background-analysi solidity-mode-hook gleam-ts-mode-hook ada-mode-hook + nxml-mode-hook robot-mode-hook vimrc-mode-hook terraform-mode-hook @@ -763,6 +765,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 + (nxml-mode . lsp-bridge-indent-two-level) ; XML (robot-mode . robot-mode-basic-offset) ; Robot (vimrc-mode . lsp-bridge-indent-four-level) ; Vim (terraform-mode . terraform-indent-level) ; Terraform diff --git a/todo.md b/todo.md index e1486ab615..1b62a10356 100644 --- a/todo.md +++ b/todo.md @@ -4,84 +4,80 @@ 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. **XML**: - - [github.com/microclimate-devops/xml-language-server](https://github.com/microclimate-devops/xml-language-server) - - [github.com/angelozerr/lsp4xml](https://github.com/angelozerr/lsp4xml) +3. **Puppet**: [github.com/lingua-pupuli/puppet-editor-services](https://github.com/lingua-pupuli/puppet-editor-services) -4. **Puppet**: [github.com/lingua-pupuli/puppet-editor-services](https://github.com/lingua-pupuli/puppet-editor-services) +4. **Helm (Kubernetes)**: [github.com/mrjosh/helm-ls](https://github.com/mrjosh/helm-ls) -5. **Helm (Kubernetes)**: [github.com/mrjosh/helm-ls](https://github.com/mrjosh/helm-ls) +5. **SystemVerilog**: [github.com/dalance/svls](https://github.com/dalance/svls) -6. **SystemVerilog**: [github.com/dalance/svls](https://github.com/dalance/svls) +6. **Rego**: [github.com/StyraInc/regal](https://github.com/StyraInc/regal) -7. **Rego**: [github.com/StyraInc/regal](https://github.com/StyraInc/regal) +7. **Apache Camel**: [github.com/camel-tooling/camel-language-server](https://github.com/camel-tooling/camel-language-server) -8. **Apache Camel**: [github.com/camel-tooling/camel-language-server](https://github.com/camel-tooling/camel-language-server) +8. **Cucumber (Gherkin)**: cucumber/language-server -9. **Cucumber (Gherkin)**: cucumber/language-server +9. **Snyk**: [github.com/snyk/snyk-ls](https://github.com/snyk/snyk-ls) -10. **Snyk**: [github.com/snyk/snyk-ls](https://github.com/snyk/snyk-ls) +10. **LanguageTool**: [github.com/valentjn/ltex-ls](https://github.com/valentjn/ltex-ls) -11. **LanguageTool**: [github.com/valentjn/ltex-ls](https://github.com/valentjn/ltex-ls) +11. **JS/TS + PHP + Python + Java**: [github.com/SonarSource/sonarlint-language-server](https://github.com/SonarSource/sonarlint-language-server) -12. **JS/TS + PHP + Python + Java**: [github.com/SonarSource/sonarlint-language-server](https://github.com/SonarSource/sonarlint-language-server) +12. **Gauge**: [github.com/getgauge/gauge](https://github.com/getgauge/gauge) -13. **Gauge**: [github.com/getgauge/gauge](https://github.com/getgauge/gauge) +13. **Coq**: coq-lsp -14. **Coq**: coq-lsp +14. **Delphi**: Embarcadero (Proprietary - DelphiLSP) -15. **Delphi**: Embarcadero (Proprietary - DelphiLSP) +15. **BibTeX**: [github.com/oncomouse/citation-langserver](https://github.com/oncomouse/citation-langserver) -16. **BibTeX**: [github.com/oncomouse/citation-langserver](https://github.com/oncomouse/citation-langserver) +16. **JSON-LD**: [github.com/ajuvercr/jsonld-lsp](https://github.com/ajuvercr/jsonld-lsp) -17. **JSON-LD**: [github.com/ajuvercr/jsonld-lsp](https://github.com/ajuvercr/jsonld-lsp) +17. **Ballerina**: [github.com/ballerina-platform/ballerina-lang/tree/master/language-server](https://github.com/ballerina-platform/ballerina-lang/tree/master/language-server) -18. **Ballerina**: [github.com/ballerina-platform/ballerina-lang/tree/master/language-server](https://github.com/ballerina-platform/ballerina-lang/tree/master/language-server) +18. **Langium**: [github.com/langium/langium](https://github.com/langium/langium) -19. **Langium**: [github.com/langium/langium](https://github.com/langium/langium) +19. **Odin**: [github.com/DanielGavin/ols](https://github.com/DanielGavin/ols) -20. **Odin**: [github.com/DanielGavin/ols](https://github.com/DanielGavin/ols) +20. **Xtext** (Any Language): [github.com/eclipse/xtext-core](https://github.com/eclipse/xtext-core) -21. **Xtext** (Any Language): [github.com/eclipse/xtext-core](https://github.com/eclipse/xtext-core) +21. **ActionScript3**: [github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server](https://github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server) -22. **ActionScript3**: [github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server](https://github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server) +22. **Raku**: [github.com/bscan/RakuNavigator](https://github.com/bscan/RakuNavigator) -23. **Raku**: [github.com/bscan/RakuNavigator](https://github.com/bscan/RakuNavigator) +23. **Flux**: [github.com/influxdata/flux-lsp](https://github.com/influxdata/flux-lsp) -24. **Flux**: [github.com/influxdata/flux-lsp](https://github.com/influxdata/flux-lsp) +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) -25. **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) +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) -26. **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) +26. **Common Workflow Language (CWL)**: Rabix/Benten -27. **Common Workflow Language (CWL)**: Rabix/Benten +27. **Smalltalk/Pharo**: [github.com/badetitou/Pharo-LanguageServer](https://github.com/badetitou/Pharo-LanguageServer) -28. **Smalltalk/Pharo**: [github.com/badetitou/Pharo-LanguageServer](https://github.com/badetitou/Pharo-LanguageServer) +28. **DreamMaker**: [github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver](https://github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver) -29. **DreamMaker**: [github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver](https://github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver) +29. **Grain**: [github.com/grain-lang/grain](https://github.com/grain-lang/grain) -30. **Grain**: [github.com/grain-lang/grain](https://github.com/grain-lang/grain) +30. **V**: [github.com/vlang/v-analyzer](https://github.com/vlang/v-analyzer) -31. **V**: [github.com/vlang/v-analyzer](https://github.com/vlang/v-analyzer) +31. **TTCN-3**: [github.com/nokia/ntt](https://github.com/nokia/ntt) -32. **TTCN-3**: [github.com/nokia/ntt](https://github.com/nokia/ntt) +32. **Red**: [github.com/bitbegin/redlangserver](https://github.com/bitbegin/redlangserver) -33. **Red**: [github.com/bitbegin/redlangserver](https://github.com/bitbegin/redlangserver) +33. **Fennel**: [git.sr.ht/~xerool/fennel-ls](https://git.sr.ht/~xerool/fennel-ls) -34. **Fennel**: [git.sr.ht/~xerool/fennel-ls](https://git.sr.ht/~xerool/fennel-ls) +34. **Erg**: [github.com/erg-lang/erg/tree/main/crates/els](https://github.com/erg-lang/erg/tree/main/crates/els) -35. **Erg**: [github.com/erg-lang/erg/tree/main/crates/els](https://github.com/erg-lang/erg/tree/main/crates/els) +35. **Fuzion**: [github.com/tokiwa-software/fuzion-lsp-server](https://github.com/tokiwa-software/fuzion-lsp-server) -36. **Fuzion**: [github.com/tokiwa-software/fuzion-lsp-server](https://github.com/tokiwa-software/fuzion-lsp-server) +36. **Imandra Protocol Language**: [github.com/AestheticIntegration/ipl-vscode](https://github.com/AestheticIntegration/ipl-vscode) -37. **Imandra Protocol Language**: [github.com/AestheticIntegration/ipl-vscode](https://github.com/AestheticIntegration/ipl-vscode) +37. **MOCA**: [github.com/mrglassdanny/moca-language-server](https://github.com/mrglassdanny/moca-language-server) -38. **MOCA**: [github.com/mrglassdanny/moca-language-server](https://github.com/mrglassdanny/moca-language-server) +38. **openVALIDATION**: [github.com/openvalidation/ov-language-server](https://github.com/openvalidation/ov-language-server) -39. **openVALIDATION**: [github.com/openvalidation/ov-language-server](https://github.com/openvalidation/ov-language-server) +39. **Veryl**: [github.com/dalance/veryl/tree/master/crates/languageserver](https://github.com/dalance/veryl/tree/master/crates/languageserver) -40. **Veryl**: [github.com/dalance/veryl/tree/master/crates/languageserver](https://github.com/dalance/veryl/tree/master/crates/languageserver) +40. **Standard ML**: Millet -41. **Standard ML**: Millet - -42. **Systemtap**: Systemtap LSP +41. **Systemtap**: Systemtap LSP