diff --git a/README.md b/README.md index 239a876..cd9ecd1 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/lua/navigator/lspclient/clients.lua b/lua/navigator/lspclient/clients.lua index 8eee9ef..b87de52 100644 --- a/lua/navigator/lspclient/clients.lua +++ b/lua/navigator/lspclient/clients.lua @@ -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}