From 8780d96f73af565850a48328fe1dfd36a668bb6c Mon Sep 17 00:00:00 2001 From: Alexandru Geană <1569265+abgeana@users.noreply.github.com> Date: Tue, 27 Jul 2021 13:30:10 +0200 Subject: fix(ccls): add .ccls as root pattern CCLS searches for a .ccls file to identify the root folder for a project. --- lua/lspconfig/ccls.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lua/lspconfig/ccls.lua') 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]], }, }, } -- cgit v1.2.3-70-g09d2