diff options
| author | kylo252 <59826753+kylo252@users.noreply.github.com> | 2021-11-11 17:20:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-11 08:20:08 -0800 |
| commit | b177f5126c5b9da530e5a17643016ad3ae0648a2 (patch) | |
| tree | 082a8d17189d0b6e075c329c5e8823acb2b27dc1 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-b177f5126c5b9da530e5a17643016ad3ae0648a2.tar nvim-lspconfig-b177f5126c5b9da530e5a17643016ad3ae0648a2.tar.gz nvim-lspconfig-b177f5126c5b9da530e5a17643016ad3ae0648a2.tar.bz2 nvim-lspconfig-b177f5126c5b9da530e5a17643016ad3ae0648a2.tar.lz nvim-lspconfig-b177f5126c5b9da530e5a17643016ad3ae0648a2.tar.xz nvim-lspconfig-b177f5126c5b9da530e5a17643016ad3ae0648a2.tar.zst nvim-lspconfig-b177f5126c5b9da530e5a17643016ad3ae0648a2.zip | |
chore: use find_git_ancestor consistently (#1404)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/bashls.lua | 4 | ||||
| -rw-r--r-- | lua/lspconfig/bicep.lua | 5 | ||||
| -rw-r--r-- | lua/lspconfig/cucumber_language_server.lua | 4 | ||||
| -rw-r--r-- | lua/lspconfig/flux-lsp.lua | 4 | ||||
| -rw-r--r-- | lua/lspconfig/fstar.lua | 4 | ||||
| -rw-r--r-- | lua/lspconfig/groovyls.lua | 4 | ||||
| -rw-r--r-- | lua/lspconfig/jsonls.lua | 4 | ||||
| -rw-r--r-- | lua/lspconfig/lemminx.lua | 5 | ||||
| -rw-r--r-- | lua/lspconfig/perlpls.lua | 4 | ||||
| -rw-r--r-- | lua/lspconfig/solang.lua | 4 | ||||
| -rw-r--r-- | lua/lspconfig/svls.lua | 5 | ||||
| -rw-r--r-- | lua/lspconfig/yamlls.lua | 4 |
12 files changed, 30 insertions, 21 deletions
diff --git a/lua/lspconfig/bashls.lua b/lua/lspconfig/bashls.lua index 9fe3f397..9c45e931 100644 --- a/lua/lspconfig/bashls.lua +++ b/lua/lspconfig/bashls.lua @@ -14,7 +14,7 @@ configs[server_name] = { GLOB_PATTERN = vim.env.GLOB_PATTERN or '*@(.sh|.inc|.bash|.command)', }, filetypes = { 'sh' }, - root_dir = util.root_pattern '.git', + root_dir = util.find_git_ancestor, single_file_support = true, }, docs = { @@ -24,7 +24,7 @@ https://github.com/mads-hartmann/bash-language-server Language server for bash, written using tree sitter in typescript. ]], default_config = { - root_dir = "vim's starting directory", + root_dir = [[util.find_git_ancestor]], }, }, } diff --git a/lua/lspconfig/bicep.lua b/lua/lspconfig/bicep.lua index 96e71cb1..b09b31f1 100644 --- a/lua/lspconfig/bicep.lua +++ b/lua/lspconfig/bicep.lua @@ -5,7 +5,7 @@ local server_name = 'bicep' configs[server_name] = { default_config = { filetypes = { 'bicep' }, - root_dir = util.root_pattern '.git', + root_dir = util.find_git_ancestor, init_options = {}, }, docs = { @@ -35,5 +35,8 @@ To download the latest release and place in /usr/local/bin/bicep-langserver: && unzip -d /usr/local/bin/bicep-langserver bicep-langserver.zip) ``` ]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, }, } diff --git a/lua/lspconfig/cucumber_language_server.lua b/lua/lspconfig/cucumber_language_server.lua index f96e7b3d..6b8ecbfe 100644 --- a/lua/lspconfig/cucumber_language_server.lua +++ b/lua/lspconfig/cucumber_language_server.lua @@ -5,7 +5,7 @@ configs.cucumber_language_server = { default_config = { cmd = { 'cucumber-language-server', '--stdio' }, filetypes = { 'cucumber' }, - root_dir = util.root_pattern '.git', + root_dir = util.find_git_ancestor, }, docs = { description = [[ @@ -21,7 +21,7 @@ npm install -g @cucumber/language-server ``` ]], default_config = { - root_dir = [[root_pattern(".git")]], + root_dir = [[util.find_git_ancestor]], }, }, } diff --git a/lua/lspconfig/flux-lsp.lua b/lua/lspconfig/flux-lsp.lua index 719c42d1..6d10b2cb 100644 --- a/lua/lspconfig/flux-lsp.lua +++ b/lua/lspconfig/flux-lsp.lua @@ -8,7 +8,7 @@ configs[server_name] = { default_config = { cmd = { bin_name }, filetypes = { 'flux' }, - root_dir = util.root_pattern '.git', + root_dir = util.find_git_ancestor, }, docs = { description = [[ @@ -19,7 +19,7 @@ cargo install --git https://github.com/influxdata/flux-lsp ``` ]], default_config = { - root_dir = [[root_pattern(".git")]], + root_dir = [[util.find_git_ancestor]], }, }, } diff --git a/lua/lspconfig/fstar.lua b/lua/lspconfig/fstar.lua index af117ca1..df94225b 100644 --- a/lua/lspconfig/fstar.lua +++ b/lua/lspconfig/fstar.lua @@ -5,7 +5,7 @@ configs.fstar = { default_config = { cmd = { 'fstar.exe', '--lsp' }, filetypes = { 'fstar' }, - root_dir = util.root_pattern '.git', + root_dir = util.find_git_ancestor, }, docs = { description = [[ @@ -14,7 +14,7 @@ https://github.com/FStarLang/FStar LSP support is included in FStar. Make sure `fstar.exe` is in your PATH. ]], default_config = { - root_dir = [[root_pattern(".git")]], + root_dir = [[util.find_git_ancestor]], }, }, } diff --git a/lua/lspconfig/groovyls.lua b/lua/lspconfig/groovyls.lua index 5bb8c7d4..5d7d2572 100644 --- a/lua/lspconfig/groovyls.lua +++ b/lua/lspconfig/groovyls.lua @@ -12,7 +12,7 @@ configs[name] = { bin_name, }, filetypes = { 'groovy' }, - root_dir = util.root_pattern '.git' or vim.loop.os_homedir(), + root_dir = util.find_git_ancestor or vim.loop.os_homedir(), }, docs = { description = [[ @@ -41,7 +41,7 @@ require'lspconfig'.groovyls.setup{ bin_name, }, filetypes = { 'groovy' }, - root_dir = [[root_pattern(".git") or vim.loop.os_homedir()]], + root_dir = [[util.find_git_ancestor or or vim.loop.os_homedir()]], }, }, } diff --git a/lua/lspconfig/jsonls.lua b/lua/lspconfig/jsonls.lua index 6b391950..6875e811 100644 --- a/lua/lspconfig/jsonls.lua +++ b/lua/lspconfig/jsonls.lua @@ -11,7 +11,7 @@ configs[server_name] = { init_options = { provideFormatter = true, }, - root_dir = util.root_pattern '.git', + root_dir = util.find_git_ancestor, single_file_support = true, }, docs = { @@ -54,7 +54,7 @@ require'lspconfig'.jsonls.setup { ``` ]], default_config = { - root_dir = [[root_pattern(".git") or dirname]], + root_dir = [[util.find_git_ancestor]], }, }, } diff --git a/lua/lspconfig/lemminx.lua b/lua/lspconfig/lemminx.lua index 31f4df23..26e4c409 100644 --- a/lua/lspconfig/lemminx.lua +++ b/lua/lspconfig/lemminx.lua @@ -5,7 +5,7 @@ local server_name = 'lemminx' configs[server_name] = { default_config = { filetypes = { 'xml', 'xsd', 'svg' }, - root_dir = util.root_pattern '.git', + root_dir = util.find_git_ancestor, single_file_support = true, }, docs = { @@ -26,6 +26,9 @@ require'lspconfig'.lemminx.setup{ NOTE to macOS users: Binaries from unidentified developers are blocked by default. If you trust the downloaded binary from jboss.org, run it once, cancel the prompt, then remove the binary from Gatekeeper quarantine with `xattr -d com.apple.quarantine lemminx`. It should now run without being blocked. ]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, }, } diff --git a/lua/lspconfig/perlpls.lua b/lua/lspconfig/perlpls.lua index 81ea7ad6..a356bddd 100644 --- a/lua/lspconfig/perlpls.lua +++ b/lua/lspconfig/perlpls.lua @@ -10,7 +10,7 @@ configs.perlpls = { }, }, filetypes = { 'perl' }, - root_dir = util.root_pattern '.git', + root_dir = util.find_git_ancestor, single_file_support = true, }, docs = { @@ -24,7 +24,7 @@ https://metacpan.org/pod/PLS To use the language server, ensure that you have PLS installed and that it is in your path ]], default_config = { - root_dir = "vim's starting directory", + root_dir = [[util.find_git_ancestor]], }, }, } diff --git a/lua/lspconfig/solang.lua b/lua/lspconfig/solang.lua index 9eda4b35..43698443 100644 --- a/lua/lspconfig/solang.lua +++ b/lua/lspconfig/solang.lua @@ -5,7 +5,7 @@ configs.solang = { default_config = { cmd = { 'solang', '--language-server', '--target', 'ewasm' }, filetypes = { 'solidity' }, - root_dir = util.root_pattern '.git', + root_dir = util.find_git_ancestor, }, docs = { description = [[ @@ -22,7 +22,7 @@ There is currently no support for completion, goto definition, references, or ot ]], default_config = { - root_dir = [[root_pattern(".git")]], + root_dir = [[util.find_git_ancestor]], }, }, } diff --git a/lua/lspconfig/svls.lua b/lua/lspconfig/svls.lua index 71f97c2e..3b87793c 100644 --- a/lua/lspconfig/svls.lua +++ b/lua/lspconfig/svls.lua @@ -7,7 +7,7 @@ configs[server_name] = { default_config = { cmd = { 'svls' }, filetypes = { 'verilog', 'systemverilog' }, - root_dir = util.root_pattern '.git', + root_dir = util.find_git_ancestor, }, docs = { description = [[ @@ -20,5 +20,8 @@ Language server for verilog and SystemVerilog cargo install svls ``` ]], + default_config = { + root_dir = [[util.find_git_ancestor]], + }, }, } diff --git a/lua/lspconfig/yamlls.lua b/lua/lspconfig/yamlls.lua index bb432c70..5f30d420 100644 --- a/lua/lspconfig/yamlls.lua +++ b/lua/lspconfig/yamlls.lua @@ -8,7 +8,7 @@ configs[server_name] = { default_config = { cmd = { bin_name, '--stdio' }, filetypes = { 'yaml' }, - root_dir = util.root_pattern '.git', + root_dir = util.find_git_ancestor, single_file_support = true, settings = { -- https://github.com/redhat-developer/vscode-redhat-telemetry#how-to-disable-telemetry-reporting @@ -26,7 +26,7 @@ yarn global add yaml-language-server ``` ]], default_config = { - root_dir = [[root_pattern(".git") or dirname]], + root_dir = [[util.find_git_ancestor]], }, }, } |
