diff options
| author | Ashkan Kiani <ashkan.k.kiani@gmail.com> | 2019-11-14 01:07:09 -0800 |
|---|---|---|
| committer | Ashkan Kiani <ashkan.k.kiani@gmail.com> | 2019-11-14 01:07:09 -0800 |
| commit | 9666b63a70e28b1eef084489a44ea4b4bb4ae65a (patch) | |
| tree | 5870a50d5bce771ca0cde5ae0fe5eba52aa14fdf /lua/common_lsp/clangd.lua | |
| parent | Fix README links. (diff) | |
| download | nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.tar nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.tar.gz nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.tar.bz2 nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.tar.lz nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.tar.xz nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.tar.zst nvim-lspconfig-9666b63a70e28b1eef084489a44ea4b4bb4ae65a.zip | |
Rename to nvim_lsp and nvim-lsp.
Diffstat (limited to 'lua/common_lsp/clangd.lua')
| -rw-r--r-- | lua/common_lsp/clangd.lua | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/lua/common_lsp/clangd.lua b/lua/common_lsp/clangd.lua deleted file mode 100644 index 465af674..00000000 --- a/lua/common_lsp/clangd.lua +++ /dev/null @@ -1,40 +0,0 @@ -local skeleton = require 'common_lsp/skeleton' -local util = require 'common_lsp/util' -local lsp = vim.lsp - -local default_capabilities = lsp.protocol.make_client_capabilities() -default_capabilities.offsetEncoding = {"utf-8", "utf-16"} - -skeleton.clangd = { - default_config = { - cmd = {"clangd", "--background-index"}; - filetypes = {"c", "cpp", "objc", "objcpp"}; - root_dir = util.root_pattern("compile_commands.json", "compile_flags.txt", ".git"); - log_level = lsp.protocol.MessageType.Warning; - settings = {}; - capabilities = default_capabilities; - on_init = vim.schedule_wrap(function(client, result) - if result.offsetEncoding then - client.offset_encoding = result.offsetEncoding - end - end) - }; - -- commands = {}; - -- on_new_config = function(new_config) end; - -- on_attach = function(client, bufnr) end; - docs = { - description = [[ -https://clang.llvm.org/extra/clangd/Installation.html - -clangd 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. -]]; - default_config = { - root_dir = [[root_pattern("compile_commands.json", "compile_flags.txt", ".git")]]; - on_init = [[function to handle changing offsetEncoding]]; - capabilities = [[default capabilities, with offsetEncoding utf-8]]; - }; - }; -} --- vim:et ts=2 sw=2 - |
