fix(neovim): update virtual line format for diagnostics (#224)
* Only show diagnostic message in the current line * Remove unused options Reviewed-on: #224 Co-authored-by: Joao P Dubas <joao.dubas+gitea@gmail.com> Co-committed-by: Joao P Dubas <joao.dubas+gitea@gmail.com>
This commit is contained in:
parent
678246e4ea
commit
e5a8d1147b
@ -1,5 +1,5 @@
|
||||
diff --git a/init.lua b/init.lua
|
||||
index 776c687..040cf83 100644
|
||||
index 776c687..6ae630e 100644
|
||||
--- a/init.lua
|
||||
+++ b/init.lua
|
||||
@@ -91,7 +91,7 @@ vim.g.mapleader = ' '
|
||||
@ -39,18 +39,28 @@ index 776c687..040cf83 100644
|
||||
-- [[ Basic Keymaps ]]
|
||||
-- See `:help vim.keymap.set()`
|
||||
|
||||
@@ -632,7 +640,9 @@ require('lazy').setup({
|
||||
@@ -632,9 +640,9 @@ require('lazy').setup({
|
||||
[vim.diagnostic.severity.HINT] = ' ',
|
||||
},
|
||||
} or {},
|
||||
- virtual_text = {
|
||||
- source = 'if_many',
|
||||
- spacing = 2,
|
||||
+ virtual_text = false,
|
||||
+ -- Display multiline diagnostics on virtual lines
|
||||
+ virtual_lines = {
|
||||
source = 'if_many',
|
||||
spacing = 2,
|
||||
format = function(diagnostic)
|
||||
@@ -676,6 +686,28 @@ require('lazy').setup({
|
||||
local diagnostic_message = {
|
||||
[vim.diagnostic.severity.ERROR] = diagnostic.message,
|
||||
@@ -644,6 +652,7 @@ require('lazy').setup({
|
||||
}
|
||||
return diagnostic_message[diagnostic.severity]
|
||||
end,
|
||||
+ current_line = true,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -676,6 +685,28 @@ require('lazy').setup({
|
||||
-- ts_ls = {},
|
||||
--
|
||||
|
||||
@ -79,7 +89,7 @@ index 776c687..040cf83 100644
|
||||
lua_ls = {
|
||||
-- cmd = { ... },
|
||||
-- filetypes = { ... },
|
||||
@@ -690,6 +722,32 @@ require('lazy').setup({
|
||||
@@ -690,6 +721,32 @@ require('lazy').setup({
|
||||
},
|
||||
},
|
||||
},
|
||||
@ -112,7 +122,7 @@ index 776c687..040cf83 100644
|
||||
}
|
||||
|
||||
-- Ensure the servers and tools above are installed
|
||||
@@ -721,6 +779,33 @@ require('lazy').setup({
|
||||
@@ -721,6 +778,33 @@ require('lazy').setup({
|
||||
-- by the server configuration above. Useful when disabling
|
||||
-- certain features of an LSP (for example, turning off formatting for ts_ls)
|
||||
server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {})
|
||||
@ -146,7 +156,7 @@ index 776c687..040cf83 100644
|
||||
require('lspconfig')[server_name].setup(server)
|
||||
end,
|
||||
},
|
||||
@@ -801,6 +886,8 @@ require('lazy').setup({
|
||||
@@ -801,6 +885,8 @@ require('lazy').setup({
|
||||
opts = {},
|
||||
},
|
||||
'folke/lazydev.nvim',
|
||||
@ -155,7 +165,7 @@ index 776c687..040cf83 100644
|
||||
},
|
||||
--- @module 'blink.cmp'
|
||||
--- @type blink.cmp.Config
|
||||
@@ -846,9 +933,15 @@ require('lazy').setup({
|
||||
@@ -846,9 +932,15 @@ require('lazy').setup({
|
||||
},
|
||||
|
||||
sources = {
|
||||
@ -172,7 +182,7 @@ index 776c687..040cf83 100644
|
||||
},
|
||||
},
|
||||
|
||||
@@ -874,19 +967,39 @@ require('lazy').setup({
|
||||
@@ -874,19 +966,39 @@ require('lazy').setup({
|
||||
--
|
||||
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
|
||||
'folke/tokyonight.nvim',
|
||||
@ -218,7 +228,7 @@ index 776c687..040cf83 100644
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -936,7 +1049,39 @@ require('lazy').setup({
|
||||
@@ -936,7 +1048,39 @@ require('lazy').setup({
|
||||
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
|
||||
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
|
||||
opts = {
|
||||
@ -259,7 +269,7 @@ index 776c687..040cf83 100644
|
||||
-- Autoinstall languages that are not installed
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
@@ -966,17 +1111,17 @@ require('lazy').setup({
|
||||
@@ -966,17 +1110,17 @@ require('lazy').setup({
|
||||
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
|
||||
--
|
||||
-- require 'kickstart.plugins.debug',
|
||||
|
Loading…
x
Reference in New Issue
Block a user