aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorHarley Laue <losinggeneration@gmail.com>2023-12-30 18:03:33 -0800
committerGitHub <noreply@github.com>2023-12-31 10:03:33 +0800
commitb84a1f67264a9393a0cea169fcc2268dcf650700 (patch)
tree469c36ae399e160932ebff740f260a1f84fd9fdd /lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-b84a1f67264a9393a0cea169fcc2268dcf650700.tar
nvim-lspconfig-b84a1f67264a9393a0cea169fcc2268dcf650700.tar.gz
nvim-lspconfig-b84a1f67264a9393a0cea169fcc2268dcf650700.tar.bz2
nvim-lspconfig-b84a1f67264a9393a0cea169fcc2268dcf650700.tar.lz
nvim-lspconfig-b84a1f67264a9393a0cea169fcc2268dcf650700.tar.xz
nvim-lspconfig-b84a1f67264a9393a0cea169fcc2268dcf650700.tar.zst
nvim-lspconfig-b84a1f67264a9393a0cea169fcc2268dcf650700.zip
fix(ols): remove single_file_support (#2952)
* fix(ols): remove single_file_support It doesn't seem like ols really has support for single_file_support. The ols application crashes with the following message: "ols/src/server/requests.odin(1494:28) Index 0 is out of range 0..<0\n" This happens on workspace/didChangeConfiguration when settings are provided in the users' ols setup. To work around this, essentially turning off single_file_support & adding *.odin as a way to detect a root_dir. This isn't very common but at least one other language server uses this method, qml_ls. However, without this, the ols doesn't really work out of the box for projects that lack a .git directory or ols.json file. * fix(ols): remove single_file_support that defaults to false
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/server_configurations/ols.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/lua/lspconfig/server_configurations/ols.lua b/lua/lspconfig/server_configurations/ols.lua
index 65dd085c..6b890f60 100644
--- a/lua/lspconfig/server_configurations/ols.lua
+++ b/lua/lspconfig/server_configurations/ols.lua
@@ -4,8 +4,7 @@ return {
default_config = {
cmd = { 'ols' },
filetypes = { 'odin' },
- root_dir = util.root_pattern('ols.json', '.git'),
- single_file_support = true,
+ root_dir = util.root_pattern('ols.json', '.git', '*.odin'),
},
docs = {
description = [[
@@ -14,7 +13,7 @@ return {
`Odin Language Server`.
]],
default_config = {
- root_dir = [[util.root_pattern("ols.json", ".git")]],
+ root_dir = [[util.root_pattern("ols.json", ".git", "*.odin")]],
},
},
}