diff options
author | sinanmohd <sinan@sinanmohd.com> | 2024-04-06 19:16:12 +0530 |
---|---|---|
committer | sinanmohd <sinan@sinanmohd.com> | 2024-04-06 19:24:41 +0530 |
commit | dfcd079f82db1504c1d3304dcd0702fddaaf03bb (patch) | |
tree | c0917bcef69bdae19395fe0a966c5a3007981d11 | |
parent | 1c0947e578e0b5f8b8ed88571904190b16359ca7 (diff) |
lsp/c: set compilationDatabaseDirectory
ccls relies on a JSON compilation database specified as compile_commands.json.
npass need this after the switch to meson build to locate header files.
for meson projects this assumes the name of the build directory is "/build".
as of writing this, the project root directory is detected using the presence of ".git".
https://git.sinanmohd.com/npass/commit/?id=4ff6158a6cd29e87222387870e6f01aca41b8183
-rw-r--r-- | lua/plugins/opts/lspconfig.lua | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lua/plugins/opts/lspconfig.lua b/lua/plugins/opts/lspconfig.lua index 1a5842d..ecbf65a 100644 --- a/lua/plugins/opts/lspconfig.lua +++ b/lua/plugins/opts/lspconfig.lua @@ -24,6 +24,7 @@ lspconfig.lua_ls.setup(lsp_zero.nvim_lua_ls({ lspconfig.ccls.setup({ init_options = { + compilationDatabaseDirectory = "build", cache = { directory = vim.fn.stdpath("cache") .. "/ccls", }, |