From 6e881a4cca1421b547c31b963c36c3cf1fc09f95 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Mon, 23 Sep 2024 07:02:57 +0800 Subject: [PATCH] Add ballerina-lang-server LSP server. --- README.md | 1 + README.zh-CN.md | 2 +- langserver/ballerina-lang-server.json | 9 +++++ lsp-bridge.el | 3 ++ todo.md | 52 +++++++++++++-------------- 5 files changed, 39 insertions(+), 28 deletions(-) create mode 100644 langserver/ballerina-lang-server.json diff --git a/README.md b/README.md index e11f50f3ed..addddb8e99 100644 --- a/README.md +++ b/README.md @@ -361,6 +361,7 @@ If your language supports mixed multi-language servers, it is recommended to che | Ada | [ada_language_server](https://github.com/AdaCore/ada_language_server) | | | Ansible | [ansible-language-server](https://github.com/ansible/ansible-language-server) | Ansible uses YAML as source code, you’ll need to customize `lsp-bridge-get-single-lang-server-by-project` to return "ansible-language-server". | | Astro | [astro](https://github.com/withastro/language-tools/tree/main/packages/language-server) | `npm i -g @astrojs/language-server` | +| Ballerina | [ballerina-lang-server](https://github.com/ballerina-platform/ballerina-lang) | | | Bash | [bash-language-server](https://github.com/bash-lsp/bash-language-server) | | | Beancount | [beancount-language-server](https://github.com/polarmutex/beancount-language-server) | `cargo install beancount-language-server` | | BibTex | [citation-langserver](https://github.com/oncomouse/citation-langserver) | | diff --git a/README.zh-CN.md b/README.zh-CN.md index 5fafe7276a..1315918053 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -357,10 +357,10 @@ lsp-bridge 针对许多语言都提供 2 个以上的语言服务器支持, | Ada | [ada_language_server](https://github.com/AdaCore/ada_language_server) | | | Ansible | [ansible-language-server](https://github.com/ansible/ansible-language-server) | Ansible 使用 YAML 来编程, 你需要定制选项 `lsp-bridge-get-single-lang-server-by-project` 当工程是 Ansible 项目的路径时, 返回 "ansible-language-server" 字符串 | | Astro | [astro](https://github.com/withastro/language-tools/tree/main/packages/language-server) | `npm i -g @astrojs/language-server` | +| Ballerina | [ballerina-lang-server](https://github.com/ballerina-platform/ballerina-lang) | | | Bash | [bash-language-server](https://github.com/bash-lsp/bash-language-server) | | | Beancount | [beancount-language-server](https://github.com/polarmutex/beancount-language-server) | `cargo install beancount-language-server` | | BibTex | [citation-langserver](https://github.com/oncomouse/citation-langserver) | | - | Clojure | [clojure-lsp](https://github.com/clojure-lsp/clojure-lsp) | 如果使用 `homebrew` 安装的, 请确保安装的是 `clojure-lsp/brew/clojure-lsp-native` [clojure-lsp-native](https://clojure-lsp.io/installation/#homebrew-macos-and-linux) | | Cmake | [cmake-language-server](https://github.com/regen100/cmake-language-server) | `pip install cmake-language-server` | | Cobol | [che-che4z-lsp-for-cobol](https://github.com/eclipse-che4z/che-che4z-lsp-for-cobol) | | diff --git a/langserver/ballerina-lang-server.json b/langserver/ballerina-lang-server.json new file mode 100644 index 0000000000..93393736fc --- /dev/null +++ b/langserver/ballerina-lang-server.json @@ -0,0 +1,9 @@ +{ + "name": "ballerina-lang-server", + "languageId": "ballerina", + "command": [ + "bal", + "start-language-server" + ], + "settings": {} +} diff --git a/lsp-bridge.el b/lsp-bridge.el index 98508b05d8..1bed7ca9a1 100644 --- a/lsp-bridge.el +++ b/lsp-bridge.el @@ -587,6 +587,7 @@ Possible choices are basedpyright_ruff, pyright_ruff, pyright-background-analysi (solidity-mode . "solidity") (gleam-ts-mode . "gleam") (ada-mode . "ada-language-server") + (ballerina-mode . "ballerina-lang-server") (bibtex-mode . "citation-langserver") (feature-mode . "cucumber-language-server") (rego-mode . "regal") @@ -707,6 +708,7 @@ Possible choices are basedpyright_ruff, pyright_ruff, pyright-background-analysi solidity-mode-hook gleam-ts-mode-hook ada-mode-hook + ballerina-mode-hook bibtex-mode-hook feature-mode-hook rego-mode-hook @@ -781,6 +783,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 + (ballerina-mode . ballerina-indent-offset) ; Ballerina (bibtex-mode . lsp-bridge-indent-two-level) ; BibTex (feature-mode . feature-indent-level) ; Cucumber (rego-mode . lsp-bridge-indent-two-level) ; Rego diff --git a/todo.md b/todo.md index 81c69515c2..9690c2e78a 100644 --- a/todo.md +++ b/todo.md @@ -8,54 +8,52 @@ Below LSP server haven't supported, PR are welcome. ;) 4. **Delphi**: Embarcadero (Proprietary - DelphiLSP) (Need found the full path of DelphiLSP.exe in Windows) -5. **JSON-LD**: [github.com/ajuvercr/jsonld-lsp](https://github.com/ajuvercr/jsonld-lsp) +5. **JSON-LD**: [github.com/ajuvercr/jsonld-lsp](https://github.com/ajuvercr/jsonld-lsp) (Emacs haven't mode to support JSON-LD file) -6. **Ballerina**: [github.com/ballerina-platform/ballerina-lang/tree/master/language-server](https://github.com/ballerina-platform/ballerina-lang/tree/master/language-server) +6. **Langium**: [github.com/langium/langium](https://github.com/langium/langium) -7. **Langium**: [github.com/langium/langium](https://github.com/langium/langium) +7. **Odin**: [github.com/DanielGavin/ols](https://github.com/DanielGavin/ols) -8. **Odin**: [github.com/DanielGavin/ols](https://github.com/DanielGavin/ols) +8. **Xtext** (Any Language): [github.com/eclipse/xtext-core](https://github.com/eclipse/xtext-core) -9. **Xtext** (Any Language): [github.com/eclipse/xtext-core](https://github.com/eclipse/xtext-core) +9. **ActionScript3**: [github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server](https://github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server) -10. **ActionScript3**: [github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server](https://github.com/BowlerHatLLC/vscode-nextgenas/tree/master/language-server) +10. **Raku**: [github.com/bscan/RakuNavigator](https://github.com/bscan/RakuNavigator) -11. **Raku**: [github.com/bscan/RakuNavigator](https://github.com/bscan/RakuNavigator) +11. **Flux**: [github.com/influxdata/flux-lsp](https://github.com/influxdata/flux-lsp) -12. **Flux**: [github.com/influxdata/flux-lsp](https://github.com/influxdata/flux-lsp) +12. **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) -13. **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) +13. **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) -14. **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) +14. **Common Workflow Language (CWL)**: Rabix/Benten -15. **Common Workflow Language (CWL)**: Rabix/Benten +15. **Smalltalk/Pharo**: [github.com/badetitou/Pharo-LanguageServer](https://github.com/badetitou/Pharo-LanguageServer) -16. **Smalltalk/Pharo**: [github.com/badetitou/Pharo-LanguageServer](https://github.com/badetitou/Pharo-LanguageServer) +16. **DreamMaker**: [github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver](https://github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver) -17. **DreamMaker**: [github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver](https://github.com/SpaceManiac/SpacemanDMM/tree/master/crates/dm-langserver) +17. **Grain**: [github.com/grain-lang/grain](https://github.com/grain-lang/grain) -18. **Grain**: [github.com/grain-lang/grain](https://github.com/grain-lang/grain) +18. **V**: [github.com/vlang/v-analyzer](https://github.com/vlang/v-analyzer) -19. **V**: [github.com/vlang/v-analyzer](https://github.com/vlang/v-analyzer) +19. **TTCN-3**: [github.com/nokia/ntt](https://github.com/nokia/ntt) -20. **TTCN-3**: [github.com/nokia/ntt](https://github.com/nokia/ntt) +20. **Red**: [github.com/bitbegin/redlangserver](https://github.com/bitbegin/redlangserver) -21. **Red**: [github.com/bitbegin/redlangserver](https://github.com/bitbegin/redlangserver) +21. **Fennel**: [git.sr.ht/~xerool/fennel-ls](https://git.sr.ht/~xerool/fennel-ls) -22. **Fennel**: [git.sr.ht/~xerool/fennel-ls](https://git.sr.ht/~xerool/fennel-ls) +22. **Erg**: [github.com/erg-lang/erg/tree/main/crates/els](https://github.com/erg-lang/erg/tree/main/crates/els) -23. **Erg**: [github.com/erg-lang/erg/tree/main/crates/els](https://github.com/erg-lang/erg/tree/main/crates/els) +23. **Fuzion**: [github.com/tokiwa-software/fuzion-lsp-server](https://github.com/tokiwa-software/fuzion-lsp-server) -24. **Fuzion**: [github.com/tokiwa-software/fuzion-lsp-server](https://github.com/tokiwa-software/fuzion-lsp-server) +24. **Imandra Protocol Language**: [github.com/AestheticIntegration/ipl-vscode](https://github.com/AestheticIntegration/ipl-vscode) -25. **Imandra Protocol Language**: [github.com/AestheticIntegration/ipl-vscode](https://github.com/AestheticIntegration/ipl-vscode) +25. **MOCA**: [github.com/mrglassdanny/moca-language-server](https://github.com/mrglassdanny/moca-language-server) -26. **MOCA**: [github.com/mrglassdanny/moca-language-server](https://github.com/mrglassdanny/moca-language-server) +26. **openVALIDATION**: [github.com/openvalidation/ov-language-server](https://github.com/openvalidation/ov-language-server) -27. **openVALIDATION**: [github.com/openvalidation/ov-language-server](https://github.com/openvalidation/ov-language-server) +27. **Veryl**: [github.com/dalance/veryl/tree/master/crates/languageserver](https://github.com/dalance/veryl/tree/master/crates/languageserver) -28. **Veryl**: [github.com/dalance/veryl/tree/master/crates/languageserver](https://github.com/dalance/veryl/tree/master/crates/languageserver) +28. **Standard ML**: Millet -29. **Standard ML**: Millet - -30. **Systemtap**: Systemtap LSP +29. **Systemtap**: Systemtap LSP