aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-01-04 00:20:41 -0800
committerGitHub <noreply@github.com>2021-01-04 00:20:41 -0800
commita8ccf4225a2bdb2050125f0c4bf3b81128f10330 (patch)
treec63b06d8b2918f86835d84505482680491512f8c /lua
parentMerge pull request #525 from mjlbach/fix_texlab_build_args (diff)
parent[docgen] Update README.md (diff)
downloadnvim-lspconfig-a8ccf4225a2bdb2050125f0c4bf3b81128f10330.tar
nvim-lspconfig-a8ccf4225a2bdb2050125f0c4bf3b81128f10330.tar.gz
nvim-lspconfig-a8ccf4225a2bdb2050125f0c4bf3b81128f10330.tar.bz2
nvim-lspconfig-a8ccf4225a2bdb2050125f0c4bf3b81128f10330.tar.lz
nvim-lspconfig-a8ccf4225a2bdb2050125f0c4bf3b81128f10330.tar.xz
nvim-lspconfig-a8ccf4225a2bdb2050125f0c4bf3b81128f10330.tar.zst
nvim-lspconfig-a8ccf4225a2bdb2050125f0c4bf3b81128f10330.zip
Merge pull request #528 from mjlbach/improve_ccls_documentation
ccls: Improve documentation, add on_init example
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/ccls.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/lua/lspconfig/ccls.lua b/lua/lspconfig/ccls.lua
index d167249d..20415d28 100644
--- a/lua/lspconfig/ccls.lua
+++ b/lua/lspconfig/ccls.lua
@@ -15,6 +15,25 @@ https://github.com/MaskRay/ccls/wiki
ccls relies on a [JSON compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html) specified
as compile_commands.json or, for simpler projects, a compile_flags.txt.
For details on how to automatically generate one using CMake look [here](https://cmake.org/cmake/help/latest/variable/CMAKE_EXPORT_COMPILE_COMMANDS.html).
+
+Customization options are passed to ccls at initialization time via init_options, a list of available options can be found [here](https://github.com/MaskRay/ccls/wiki/Customization#initialization-options). For example:
+
+```lua
+local lspconfig = require'lspconfig'
+lspconfig.ccls.setup {
+ init_options = {
+ compilationDatabaseDirectory = "build";
+ index = {
+ threads = 0;
+ };
+ clang = {
+ excludeArgs = { "-frounding-math"} ;
+ };
+ }
+}
+
+```
+
]];
default_config = {
root_dir = [[root_pattern("compile_commands.json", "compile_flags.txt", ".git")]];