remove floating diagnostics, and add line diagnostics
This commit is contained in:
@ -21,7 +21,6 @@ local function lsp_keymaps(bufnr)
|
|||||||
map('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>')
|
map('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>')
|
||||||
|
|
||||||
-- Diagnostics
|
-- Diagnostics
|
||||||
map('n', '<Tab>', '<cmd>lua vim.diagnostic.open_float()<cr>')
|
|
||||||
map('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<cr>')
|
map('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<cr>')
|
||||||
map('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>')
|
map('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>')
|
||||||
end
|
end
|
||||||
@ -41,15 +40,6 @@ local function lsp_settings()
|
|||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
underline = true,
|
underline = true,
|
||||||
severity_sort = true,
|
severity_sort = true,
|
||||||
float = {
|
|
||||||
focusable = false,
|
|
||||||
show_header = true,
|
|
||||||
style = 'minimal',
|
|
||||||
border = 'shadow',
|
|
||||||
source = 'always',
|
|
||||||
header = '',
|
|
||||||
prefix = '* ',
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with( vim.lsp.handlers.hover,
|
vim.lsp.handlers['textDocument/hover'] = vim.lsp.with( vim.lsp.handlers.hover,
|
||||||
|
13
after/plugin/lsplines.lua
Normal file
13
after/plugin/lsplines.lua
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
local status_ok, lines = pcall(require, "lsp_lines")
|
||||||
|
if not status_ok then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
lines.setup {}
|
||||||
|
|
||||||
|
vim.diagnostic.config {
|
||||||
|
virtual_lines = {
|
||||||
|
highlight_whole_line = true,
|
||||||
|
only_current_line = true
|
||||||
|
}
|
||||||
|
}
|
@ -113,11 +113,8 @@ require 'dep' {
|
|||||||
|
|
||||||
{ 'danymat/neogen' }, -- generate lsp annotations
|
{ 'danymat/neogen' }, -- generate lsp annotations
|
||||||
|
|
||||||
-- dap ----------------------------------------------------------------------
|
{ 'whynothugo/lsp_lines.nvim',
|
||||||
{ 'mfussenegger/nvim-dap',
|
url = 'https://git.sr.ht/~whynothugo/lsp_lines.nvim',
|
||||||
deps = {
|
|
||||||
'rcarriga/nvim-dap-ui',
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- dap + lsp + linter + formatter installer ---------------------------------
|
-- dap + lsp + linter + formatter installer ---------------------------------
|
||||||
|
Reference in New Issue
Block a user