aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/cmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lspconfig/cmake.lua')
-rw-r--r--lua/lspconfig/cmake.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/lua/lspconfig/cmake.lua b/lua/lspconfig/cmake.lua
index a648c444..9592dec2 100644
--- a/lua/lspconfig/cmake.lua
+++ b/lua/lspconfig/cmake.lua
@@ -5,9 +5,8 @@ configs.cmake = {
default_config = {
cmd = { 'cmake-language-server' },
filetypes = { 'cmake' },
- root_dir = function(fname)
- return util.root_pattern('.git', 'compile_commands.json', 'build')(fname) or util.path.dirname(fname)
- end,
+ root_dir = util.root_pattern('.git', 'compile_commands.json', 'build'),
+ single_file_support = true,
init_options = {
buildDirectory = 'build',
},