aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeth Messer <3678+megalithic@users.noreply.github.com>2024-05-17 02:07:28 -0400
committerGitHub <noreply@github.com>2024-05-17 14:07:28 +0800
commitb3fc67c63ebb209f3e6f72718b9360aef2c0c027 (patch)
treed7691c9811b5a72977d7cf5b933a79eeeca6a177
parentrefactor: add compatible tbl_flatten and lsp_get_clients for new version 0.10... (diff)
downloadnvim-lspconfig-b3fc67c63ebb209f3e6f72718b9360aef2c0c027.tar
nvim-lspconfig-b3fc67c63ebb209f3e6f72718b9360aef2c0c027.tar.gz
nvim-lspconfig-b3fc67c63ebb209f3e6f72718b9360aef2c0c027.tar.bz2
nvim-lspconfig-b3fc67c63ebb209f3e6f72718b9360aef2c0c027.tar.lz
nvim-lspconfig-b3fc67c63ebb209f3e6f72718b9360aef2c0c027.tar.xz
nvim-lspconfig-b3fc67c63ebb209f3e6f72718b9360aef2c0c027.tar.zst
nvim-lspconfig-b3fc67c63ebb209f3e6f72718b9360aef2c0c027.zip
feat: adds next-ls server configuration (#3155)
* feat: adds next-ls server configuration * docs: update server_configurations.md skip-checks: true * fix: assumes nextls is installed and on $PATH * docs: update server_configurations.md skip-checks: true * fix: updates root_dir method * docs: update server_configurations.md skip-checks: true --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
-rw-r--r--doc/server_configurations.md30
-rw-r--r--doc/server_configurations.txt30
-rw-r--r--lua/lspconfig/server_configurations/nextls.lua18
3 files changed, 78 insertions, 0 deletions
diff --git a/doc/server_configurations.md b/doc/server_configurations.md
index 45490469..3a265382 100644
--- a/doc/server_configurations.md
+++ b/doc/server_configurations.md
@@ -166,6 +166,7 @@ autogenerated from the Lua files. You can view this file in Nvim by running
- [mutt_ls](#mutt_ls)
- [nelua_lsp](#nelua_lsp)
- [neocmake](#neocmake)
+- [nextls](#nextls)
- [nginx_language_server](#nginx_language_server)
- [nickel_ls](#nickel_ls)
- [nil_ls](#nil_ls)
@@ -7374,6 +7375,35 @@ require'lspconfig'.neocmake.setup{}
```
+## nextls
+
+https://github.com/elixir-tools/next-ls
+
+**By default, next-ls does not set its `cmd`. Please see the following [detailed instructions](https://www.elixir-tools.dev/docs/next-ls/installation/) for possible installation methods.**
+
+
+
+**Snippet to enable the language server:**
+```lua
+require'lspconfig'.nextls.setup{}
+```
+
+
+**Default values:**
+ - `filetypes` :
+ ```lua
+ { "elixir", "eelixir", "heex", "surface" }
+ ```
+ - `root_dir` :
+ ```lua
+ see source file
+ ```
+ - `single_file_support` :
+ ```lua
+ true
+ ```
+
+
## nginx_language_server
https://pypi.org/project/nginx-language-server/
diff --git a/doc/server_configurations.txt b/doc/server_configurations.txt
index 45490469..3a265382 100644
--- a/doc/server_configurations.txt
+++ b/doc/server_configurations.txt
@@ -166,6 +166,7 @@ autogenerated from the Lua files. You can view this file in Nvim by running
- [mutt_ls](#mutt_ls)
- [nelua_lsp](#nelua_lsp)
- [neocmake](#neocmake)
+- [nextls](#nextls)
- [nginx_language_server](#nginx_language_server)
- [nickel_ls](#nickel_ls)
- [nil_ls](#nil_ls)
@@ -7374,6 +7375,35 @@ require'lspconfig'.neocmake.setup{}
```
+## nextls
+
+https://github.com/elixir-tools/next-ls
+
+**By default, next-ls does not set its `cmd`. Please see the following [detailed instructions](https://www.elixir-tools.dev/docs/next-ls/installation/) for possible installation methods.**
+
+
+
+**Snippet to enable the language server:**
+```lua
+require'lspconfig'.nextls.setup{}
+```
+
+
+**Default values:**
+ - `filetypes` :
+ ```lua
+ { "elixir", "eelixir", "heex", "surface" }
+ ```
+ - `root_dir` :
+ ```lua
+ see source file
+ ```
+ - `single_file_support` :
+ ```lua
+ true
+ ```
+
+
## nginx_language_server
https://pypi.org/project/nginx-language-server/
diff --git a/lua/lspconfig/server_configurations/nextls.lua b/lua/lspconfig/server_configurations/nextls.lua
new file mode 100644
index 00000000..acecaf76
--- /dev/null
+++ b/lua/lspconfig/server_configurations/nextls.lua
@@ -0,0 +1,18 @@
+local util = require 'lspconfig.util'
+
+return {
+ default_config = {
+ filetypes = { 'elixir', 'eelixir', 'heex', 'surface' },
+ root_dir = function(fname)
+ return util.root_pattern 'mix.exs'(fname) or util.find_git_ancestor(fname)
+ end,
+ single_file_support = true,
+ },
+ docs = {
+ description = [[
+https://github.com/elixir-tools/next-ls
+
+**By default, next-ls does not set its `cmd`. Please see the following [detailed instructions](https://www.elixir-tools.dev/docs/next-ls/installation/) for possible installation methods.**
+]],
+ },
+}