mirror of
https://github.com/halfdan/dotfiles.git
synced 2025-11-02 05:26:02 +00:00
Refactor LSP config into separate modules
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
vim.g.nvcode_termcolors = 256
|
||||
vim.cmd.colorscheme("gruvbox-baby")
|
||||
vim.cmd.colorscheme("kanagawa-wave")
|
||||
|
||||
@@ -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' },
|
||||
}
|
||||
|
||||
@@ -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
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user