diff options
| author | Aotrix <[email protected]> | 2026-01-31 21:08:13 +0100 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2026-01-31 21:08:13 +0100 |
| commit | 29264ecaa8307c01e32978ad8cc52781cfafdb9b (patch) | |
| tree | 25d4b6012d907cd010f4713ee20ac2425093ae4b /lua/aotrix/plugins/lsp.lua | |
| parent | cfecefdf1a24ea690e0613b8c5d219b0511785c5 (diff) | |
added conditional breakpoint shortcut and virtual text
Diffstat (limited to 'lua/aotrix/plugins/lsp.lua')
| -rw-r--r-- | lua/aotrix/plugins/lsp.lua | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/lua/aotrix/plugins/lsp.lua b/lua/aotrix/plugins/lsp.lua index c55aa0b..484f289 100644 --- a/lua/aotrix/plugins/lsp.lua +++ b/lua/aotrix/plugins/lsp.lua @@ -6,7 +6,7 @@ return { config = function() require("mason").setup() require("mason-lspconfig").setup({ - ensure_installed = { "cmake", "lua_ls" } + ensure_installed = {"cmake", "lua_ls"} }) vim.lsp.config["clangd"] = { cmd = { @@ -14,25 +14,20 @@ return { "--header-insertion=iwyu", "--completion-style=detailed", "--function-arg-placeholders", "--fallback-style=llvm" }, - root_markers = { { "CMakeLists.txt", - "Makefile", - "configure.ac", - "configure.in", - "config.h.in", - "meson.build", - "meson_options.txt", - "build.ninja" }, - { "compile_commands.json", "compile_flags.txt" }, - { ".git" } }, - filetypes = { "cpp", "hpp", "c", "h" }, + root_markers = { + { + "CMakeLists.txt", "Makefile", "configure.ac", + "configure.in", "config.h.in", "meson.build", + "meson_options.txt", "build.ninja" + }, {"compile_commands.json", "compile_flags.txt"}, {".git"} + }, + filetypes = {"cpp", "hpp", "c", "h"}, capabilities = { - offsetEncoding = { "utf-16" }, + offsetEncoding = {"utf-16"}, textDocument = { - semanticTokens = { - multilineTokenSupport = true, - }, - completion = { completionItem = { snippetSupport = true } } + semanticTokens = {multilineTokenSupport = true}, + completion = {completionItem = {snippetSupport = true}} } }, init_options = { @@ -41,12 +36,13 @@ return { clangdFileStatus = true } } + vim.diagnostic.config({virtual_text = true}) vim.keymap.set("n", "<leader>o", "<cmd>LspClangdSwitchSourceHeader<cr>") vim.lsp.config["cmake"] = {} vim.lsp.config["lua_ls"] = { - settings = { completion = { callSnippet = 'Replace' } } + settings = {completion = {callSnippet = 'Replace'}} } vim.lsp.enable("clangd") |
