diff options
Diffstat (limited to 'lua/lspconfig/server_configurations/cmake.lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/cmake.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/cmake.lua b/lua/lspconfig/server_configurations/cmake.lua new file mode 100644 index 00000000..0ba4dc30 --- /dev/null +++ b/lua/lspconfig/server_configurations/cmake.lua @@ -0,0 +1,23 @@ +local util = require 'lspconfig/util' + +return { + default_config = { + cmd = { 'cmake-language-server' }, + filetypes = { 'cmake' }, + root_dir = util.root_pattern('.git', 'compile_commands.json', 'build'), + single_file_support = true, + init_options = { + buildDirectory = 'build', + }, + }, + docs = { + description = [[ +https://github.com/regen100/cmake-language-server + +CMake LSP Implementation +]], + default_config = { + root_dir = [[root_pattern(".git", "compile_commands.json", "build") or dirname]], + }, + }, +} |
