diff options
| author | Alexandru Geana <ab@geana.io> | 2022-04-23 00:15:51 +0200 |
|---|---|---|
| committer | Alexandru Geana <ab@geana.io> | 2022-04-23 08:39:55 +0200 |
| commit | daee5eeceb5d39c1ccb8a73ff62c62aaba92f362 (patch) | |
| tree | 09035dcc4280df3a0e9925a7dd85dee4beecc170 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-daee5eeceb5d39c1ccb8a73ff62c62aaba92f362.tar nvim-lspconfig-daee5eeceb5d39c1ccb8a73ff62c62aaba92f362.tar.gz nvim-lspconfig-daee5eeceb5d39c1ccb8a73ff62c62aaba92f362.tar.bz2 nvim-lspconfig-daee5eeceb5d39c1ccb8a73ff62c62aaba92f362.tar.lz nvim-lspconfig-daee5eeceb5d39c1ccb8a73ff62c62aaba92f362.tar.xz nvim-lspconfig-daee5eeceb5d39c1ccb8a73ff62c62aaba92f362.tar.zst nvim-lspconfig-daee5eeceb5d39c1ccb8a73ff62c62aaba92f362.zip | |
fix(ccls): remove .git from root_dir
CCLS does not use .git to identify the root of a project. In addition,
it causes issues with projects that are based on the repo tool (e.g.
AOSP), which generates .git symlinks in many places in the source tree.
In such cases, CCLS incorrectly identifies subdirectories as the root.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/ccls.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/lspconfig/server_configurations/ccls.lua b/lua/lspconfig/server_configurations/ccls.lua index dd642db2..70490aa4 100644 --- a/lua/lspconfig/server_configurations/ccls.lua +++ b/lua/lspconfig/server_configurations/ccls.lua @@ -4,7 +4,7 @@ return { default_config = { cmd = { 'ccls' }, filetypes = { 'c', 'cpp', 'objc', 'objcpp' }, - root_dir = util.root_pattern('compile_commands.json', '.ccls', '.git'), + root_dir = util.root_pattern('compile_commands.json', '.ccls'), offset_encoding = 'utf-32', -- ccls does not support sending a null root directory single_file_support = false, @@ -37,7 +37,7 @@ lspconfig.ccls.setup { ]], default_config = { - root_dir = [[root_pattern("compile_commands.json", ".ccls", ".git")]], + root_dir = [[root_pattern("compile_commands.json", ".ccls")]], }, }, } |
