mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-07 07:09:15 +00:00
fix(nvim): better diagnostic color
Signed-off-by: Chiang Léana <leana.chiang@etudiant.univ-rennes1.fr>
This commit is contained in:
parent
16d8459de5
commit
e4795e4ccf
4 changed files with 46 additions and 51 deletions
|
|
@ -4,14 +4,14 @@ require "mason-lspconfig".setup({
|
|||
automatic_installation = false
|
||||
})
|
||||
|
||||
require "lsp-format".setup()
|
||||
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float, { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { noremap = true, silent = true })
|
||||
vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { noremap = true, silent = true })
|
||||
vim.keymap.set('n', '<space>q', vim.diagnostic.setloclist, { noremap = true, silent = true })
|
||||
|
||||
-- require "lsp-format".setup()
|
||||
local on_attach = function(client, bufnr)
|
||||
require "lsp-format".on_attach(client)
|
||||
-- require "lsp-format".on_attach(client)
|
||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
|
|
@ -34,8 +34,6 @@ local on_attach = function(client, bufnr)
|
|||
end
|
||||
|
||||
-- Border setup
|
||||
vim.cmd [[autocmd! ColorScheme * highlight NormalFloat guibg=white]]
|
||||
vim.cmd [[autocmd! ColorScheme * highlight FloatBorder guifg=black guibg=white]]
|
||||
local border = {
|
||||
{ "╭", "FloatBorder" },
|
||||
{ "─", "FloatBorder" },
|
||||
|
|
@ -105,3 +103,11 @@ require "lspconfig".gopls.setup {
|
|||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
require "lspconfig".pylsp.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
require "lspconfig".clangd.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue