add ccls support

neovim_0_5
ray-x 3 years ago
parent 4a58870a28
commit 69565e38d3

@ -91,6 +91,8 @@ navigator will bind keys and handler for you. The lsp will be loaded lazily base
The plugin can be loaded lazily (packer `opt = true` ), And it will check if optional plugins existance and load those plugins only if they existed.
The termianl will need to be able to output nerdfont and emoji correctly. I am using Kitty with nerdfont (Victor Mono).
## Usage
Please refer to lua/navigator/lspclient/mapping.lua on key mappings. Should be able to work out-of-box.

@ -66,7 +66,6 @@ local golang_setup = {
}
},
root_dir = function(fname)
local util = require("lspconfig").util
return util.root_pattern("go.mod", ".git")(fname) or util.path.dirname(fname)
end
}
@ -171,6 +170,19 @@ local pyright_cfg = {
}
}
local ccls_cfg = {
init_options = {
compilationDatabaseDirectory = "build",
root_dir = [[ util.root_pattern("compile_commands.json", "compile_flags.txt", "CMakeLists.txt", "Makefile", ".git") or util.path.dirname ]],
index = {
threads = 2
},
clang = {
excludeArgs = {"-frounding-math"}
}
}
}
local servers = {
"gopls",
"tsserver",
@ -188,6 +200,7 @@ local servers = {
"cssls",
"yamlls",
"clangd",
"ccls",
"sqls",
"denols",
"dartls",
@ -272,5 +285,6 @@ local function setup(user_opts)
load_cfg(ft, "clangd", clang_cfg, loaded)
load_cfg(ft, "rust_analyzer", rust_cfg, loaded)
load_cfg(ft, "pyright", pyright_cfg, loaded)
load_cfg(ft, "ccls", ccls_cfg, loaded)
end
return {setup = setup, cap = cap}

Loading…
Cancel
Save