Refactor LSP config into separate modules

This commit is contained in:
Fabian Becker
2025-09-26 16:07:46 +02:00
parent bb9e97a6ba
commit cb7e7a5ea4
9 changed files with 88 additions and 120 deletions

View File

@@ -1,2 +1,2 @@
vim.g.nvcode_termcolors = 256
vim.cmd.colorscheme("gruvbox-baby")
vim.cmd.colorscheme("kanagawa-wave")

View File

@@ -16,11 +16,9 @@ return {
index = "index.norg",
}
},
-- ["core.completion"] = {
-- config = {
-- engine = "nvim-cmp",
-- },
-- },
["core.completion"] = {
config = { engine = { module_name = "external.lsp-completion" } },
},
["core.concealer"] = {},
["core.journal"] = {
config = {
@@ -28,9 +26,37 @@ return {
},
},
["core.integrations.telescope"] = {},
["external.interim-ls"] = {
config = {
-- default config shown
completion_provider = {
-- Enable or disable the completion provider
enable = true,
-- Show file contents as documentation when you complete a file name
documentation = true,
-- Try to complete categories provided by Neorg Query. Requires `benlubas/neorg-query`
categories = false,
-- suggest heading completions from the given file for `{@x|}` where `|` is your cursor
-- and `x` is an alphanumeric character. `{@name}` expands to `[name]{:$/people:# name}`
people = {
enable = false,
-- path to the file you're like to use with the `{@x` syntax, relative to the
-- workspace root, without the `.norg` at the end.
-- ie. `folder/people` results in searching `$/folder/people.norg` for headings.
-- Note that this will change with your workspace, so it fails silently if the file
-- doesn't exist
path = "people",
}
}
}
},
}
})
end,
},
{ 'nvim-neorg/neorg-telescope' },
{ 'nvim-neorg/neorg-telescope' , 'benlubas/neorg-interim-ls' },
}

View File

@@ -23,6 +23,18 @@ return {
require("neotest-golang")
},
})
local neotest_ns = vim.api.nvim_create_namespace("neotest")
vim.diagnostic.config({
virtual_text = {
format = function(diagnostic)
local message =
diagnostic.message:gsub("\n", " "):gsub("\t", " "):gsub("%s+", " "):gsub("^%s+", "")
return message
end,
},
}, neotest_ns)
end
},
}