nvim: fix lsp config to display diagnostics and new config scheme
This commit is contained in:
parent
25ddac36b8
commit
c266045624
1 changed files with 14 additions and 1 deletions
|
@ -41,6 +41,18 @@ lib.mkIf (lib.elem "nvim::lsp" config.machine.pkgs) {
|
||||||
-- This will avoid an annoying layout shift in the screen
|
-- This will avoid an annoying layout shift in the screen
|
||||||
vim.opt.signcolumn = 'yes'
|
vim.opt.signcolumn = 'yes'
|
||||||
|
|
||||||
|
vim.diagnostic.config({
|
||||||
|
virtual_text = true,
|
||||||
|
signs = {
|
||||||
|
text = {
|
||||||
|
[vim.diagnostic.severity.ERROR] = '✘',
|
||||||
|
[vim.diagnostic.severity.WARN] = '▲',
|
||||||
|
[vim.diagnostic.severity.HINT] = '⚑',
|
||||||
|
[vim.diagnostic.severity.INFO] = '»',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
---Force a specific language for ltex-ls
|
---Force a specific language for ltex-ls
|
||||||
---@param lang string
|
---@param lang string
|
||||||
function SetLtexLang(lang)
|
function SetLtexLang(lang)
|
||||||
|
@ -114,7 +126,8 @@ lib.mkIf (lib.elem "nvim::lsp" config.machine.pkgs) {
|
||||||
config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities)
|
config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities)
|
||||||
''
|
''
|
||||||
}
|
}
|
||||||
lspconfig[server].setup(config)
|
vim.lsp.enable(server)
|
||||||
|
vim.lsp.config(server, config)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue