diff options
| author | github-actions <github-actions@github.com> | 2023-01-13 04:58:59 +0000 |
|---|---|---|
| committer | github-actions <github-actions@github.com> | 2023-01-13 04:58:59 +0000 |
| commit | f7ebb0fed4b952c77bb5827db030405f2d6cd4e7 (patch) | |
| tree | d95b0a0839fad277680b21ae5f826cc81c313504 /doc | |
| parent | feat: add drools-lsp support (#2394) (diff) | |
| download | nvim-lspconfig-f7ebb0fed4b952c77bb5827db030405f2d6cd4e7.tar nvim-lspconfig-f7ebb0fed4b952c77bb5827db030405f2d6cd4e7.tar.gz nvim-lspconfig-f7ebb0fed4b952c77bb5827db030405f2d6cd4e7.tar.bz2 nvim-lspconfig-f7ebb0fed4b952c77bb5827db030405f2d6cd4e7.tar.lz nvim-lspconfig-f7ebb0fed4b952c77bb5827db030405f2d6cd4e7.tar.xz nvim-lspconfig-f7ebb0fed4b952c77bb5827db030405f2d6cd4e7.tar.zst nvim-lspconfig-f7ebb0fed4b952c77bb5827db030405f2d6cd4e7.zip | |
docs: update server_configurations.md
skip-checks: true
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/server_configurations.md | 72 | ||||
| -rw-r--r-- | doc/server_configurations.txt | 72 |
2 files changed, 144 insertions, 0 deletions
diff --git a/doc/server_configurations.md b/doc/server_configurations.md index d582f40a..e930977c 100644 --- a/doc/server_configurations.md +++ b/doc/server_configurations.md @@ -43,6 +43,7 @@ autogenerated from the Lua files. You can view this file in Nvim by running - [dockerls](#dockerls) - [dolmenls](#dolmenls) - [dotls](#dotls) +- [drools_lsp](#drools_lsp) - [efm](#efm) - [elixirls](#elixirls) - [elmls](#elmls) @@ -1799,6 +1800,77 @@ require'lspconfig'.dotls.setup{} ``` +## drools_lsp + +https://github.com/kiegroup/drools-lsp + +Language server for the [Drools Rule Language (DRL)](https://docs.drools.org/latest/drools-docs/docs-website/drools/language-reference/#con-drl_drl-rules). + +The `drools-lsp` server is a self-contained java jar file (`drools-lsp-server-jar-with-dependencies.jar`), and can be downloaded from [https://github.com/kiegroup/drools-lsp/releases/](https://github.com/kiegroup/drools-lsp/releases/). + +Configuration information: +```lua +-- Option 1) Specify the entire command: +require('lspconfig').drools_lsp.setup { + cmd = { + '/path/to/java', + '-cp', + '/path/to/drools-lsp-server-jar-with-dependencies.jar', + 'org.drools.lsp.server.Main', + }, +} + +-- Option 2) Specify just the jar location (the JAVA_HOME environment variable will be respected): +require('lspconfig').drools_lsp.setup { + settings = { + drools = { + jar = '/path/to/drools-lsp-server-jar-with-dependencies.jar', + }, + }, +} + +-- Option 3) Specify the jar location plus the java bin path and/or java opts: +require('lspconfig').drools_lsp.setup { + settings = { + java = { + bin = '/path/to/java', + opts = { '-Xmx500m' }, + }, + drools = { + jar = '/path/to/drools-lsp-server-jar-with-dependencies.jar', + }, + }, +} +``` + +It is also recommended to set up automatic filetype detection for drools (`*.drl`) files, for example: +```vim +autocmd BufRead,BufNewFile *.drl set filetype=drools +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.drools_lsp.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "drools" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + ## efm https://github.com/mattn/efm-langserver diff --git a/doc/server_configurations.txt b/doc/server_configurations.txt index d582f40a..e930977c 100644 --- a/doc/server_configurations.txt +++ b/doc/server_configurations.txt @@ -43,6 +43,7 @@ autogenerated from the Lua files. You can view this file in Nvim by running - [dockerls](#dockerls) - [dolmenls](#dolmenls) - [dotls](#dotls) +- [drools_lsp](#drools_lsp) - [efm](#efm) - [elixirls](#elixirls) - [elmls](#elmls) @@ -1799,6 +1800,77 @@ require'lspconfig'.dotls.setup{} ``` +## drools_lsp + +https://github.com/kiegroup/drools-lsp + +Language server for the [Drools Rule Language (DRL)](https://docs.drools.org/latest/drools-docs/docs-website/drools/language-reference/#con-drl_drl-rules). + +The `drools-lsp` server is a self-contained java jar file (`drools-lsp-server-jar-with-dependencies.jar`), and can be downloaded from [https://github.com/kiegroup/drools-lsp/releases/](https://github.com/kiegroup/drools-lsp/releases/). + +Configuration information: +```lua +-- Option 1) Specify the entire command: +require('lspconfig').drools_lsp.setup { + cmd = { + '/path/to/java', + '-cp', + '/path/to/drools-lsp-server-jar-with-dependencies.jar', + 'org.drools.lsp.server.Main', + }, +} + +-- Option 2) Specify just the jar location (the JAVA_HOME environment variable will be respected): +require('lspconfig').drools_lsp.setup { + settings = { + drools = { + jar = '/path/to/drools-lsp-server-jar-with-dependencies.jar', + }, + }, +} + +-- Option 3) Specify the jar location plus the java bin path and/or java opts: +require('lspconfig').drools_lsp.setup { + settings = { + java = { + bin = '/path/to/java', + opts = { '-Xmx500m' }, + }, + drools = { + jar = '/path/to/drools-lsp-server-jar-with-dependencies.jar', + }, + }, +} +``` + +It is also recommended to set up automatic filetype detection for drools (`*.drl`) files, for example: +```vim +autocmd BufRead,BufNewFile *.drl set filetype=drools +``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.drools_lsp.setup{} +``` + + +**Default values:** + - `filetypes` : + ```lua + { "drools" } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `single_file_support` : + ```lua + true + ``` + + ## efm https://github.com/mattn/efm-langserver |
