aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/ccls.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/lspconfig/ccls.lua')
-rw-r--r--lua/lspconfig/ccls.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/lua/lspconfig/ccls.lua b/lua/lspconfig/ccls.lua
index bb9a02d1..0cb51385 100644
--- a/lua/lspconfig/ccls.lua
+++ b/lua/lspconfig/ccls.lua
@@ -6,7 +6,8 @@ configs.ccls = {
cmd = { 'ccls' },
filetypes = { 'c', 'cpp', 'objc', 'objcpp' },
root_dir = function(fname)
- return util.root_pattern('compile_commands.json', 'compile_flags.txt', '.git')(fname) or util.path.dirname(fname)
+ return util.root_pattern('compile_commands.json', '.ccls', 'compile_flags.txt', '.git')(fname)
+ or util.path.dirname(fname)
end,
},
docs = {
@@ -37,7 +38,7 @@ lspconfig.ccls.setup {
]],
default_config = {
- root_dir = [[root_pattern("compile_commands.json", "compile_flags.txt", ".git") or dirname]],
+ root_dir = [[root_pattern("compile_commands.json", ".ccls", "compile_flags.txt", ".git") or dirname]],
},
},
}