From b51f1ae28924a752258e7607fbc3210f9b18eaac Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Thu, 22 Jul 2021 00:08:36 +0200 Subject: Updates based on Chris's lunarvim --- .config/nvim/ftplugin/c.lua | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) (limited to '.config/nvim/ftplugin/c.lua') diff --git a/.config/nvim/ftplugin/c.lua b/.config/nvim/ftplugin/c.lua index 43db5ec..c4fbdd1 100644 --- a/.config/nvim/ftplugin/c.lua +++ b/.config/nvim/ftplugin/c.lua @@ -1,24 +1,4 @@ -if require("cfg.utils").check_lsp_client_active "clangd" then - return -end - -local clangd_flags = { "--background-index" } - -if O.lang.clang.cross_file_rename then - table.insert(clangd_flags, "--cross-file-rename") -end - -table.insert(clangd_flags, "--header-insertion=" .. O.lang.clang.header_insertion) - -require("lspconfig").clangd.setup { - cmd = { DATA_PATH .. "/lspinstall/cpp/clangd/bin/clangd", unpack(clangd_flags) }, - on_attach = require("lsp").common_on_attach, - handlers = { - ["textDocument/publishDiagnostics"] = vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, { - virtual_text = O.lang.clang.diagnostics.virtual_text, - signs = O.lang.clang.diagnostics.signs, - underline = O.lang.clang.diagnostics.underline, - update_in_insert = true, - }), - }, -} +require("lang.clang").format() +require("lang.clang").lint() +require("lang.clang").lsp() +require("lang.clang").dap() -- cgit v1.2.3-70-g09d2