aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/configs/ccls.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2024-10-24 09:27:23 -0700
committerGitHub <noreply@github.com>2024-10-24 09:27:23 -0700
commite61da1eae59d9f4c6cdb076bdb73e7572f49c069 (patch)
treec880556de9a9969b645226fe1250a0d40c868a05 /lua/lspconfig/configs/ccls.lua
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-e61da1eae59d9f4c6cdb076bdb73e7572f49c069.tar
nvim-lspconfig-e61da1eae59d9f4c6cdb076bdb73e7572f49c069.tar.gz
nvim-lspconfig-e61da1eae59d9f4c6cdb076bdb73e7572f49c069.tar.bz2
nvim-lspconfig-e61da1eae59d9f4c6cdb076bdb73e7572f49c069.tar.lz
nvim-lspconfig-e61da1eae59d9f4c6cdb076bdb73e7572f49c069.tar.xz
nvim-lspconfig-e61da1eae59d9f4c6cdb076bdb73e7572f49c069.tar.zst
nvim-lspconfig-e61da1eae59d9f4c6cdb076bdb73e7572f49c069.zip
refactor(docs): drop redundant default_config #3397
Problem: default_config duplicated in `docs` items. Solution: delete it. docgen autogenerates this now.
Diffstat (limited to 'lua/lspconfig/configs/ccls.lua')
-rw-r--r--lua/lspconfig/configs/ccls.lua10
1 files changed, 1 insertions, 9 deletions
diff --git a/lua/lspconfig/configs/ccls.lua b/lua/lspconfig/configs/ccls.lua
index 72977dfa..6f398abe 100644
--- a/lua/lspconfig/configs/ccls.lua
+++ b/lua/lspconfig/configs/ccls.lua
@@ -1,16 +1,11 @@
local util = require 'lspconfig.util'
-local root_files = {
- 'compile_commands.json',
- '.ccls',
-}
-
return {
default_config = {
cmd = { 'ccls' },
filetypes = { 'c', 'cpp', 'objc', 'objcpp', 'cuda' },
root_dir = function(fname)
- return util.root_pattern(unpack(root_files))(fname) or util.find_git_ancestor(fname)
+ return util.root_pattern('compile_commands.json', '.ccls')(fname) or util.find_git_ancestor(fname)
end,
offset_encoding = 'utf-32',
-- ccls does not support sending a null root directory
@@ -43,8 +38,5 @@ lspconfig.ccls.setup {
```
]],
- default_config = {
- root_dir = [[root_pattern('compile_commands.json', '.ccls', '.git')]],
- },
},
}