diff --git a/lazy-lock.json b/lazy-lock.json index 9a2dca7..d4683a9 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -38,6 +38,7 @@ "lazy.nvim": { "branch": "main", "commit": "28126922c9b54e35a192ac415788f202c3944c9f" }, "lazygit.nvim": { "branch": "main", "commit": "1e08e3f5ac1152339690140e61a4a32b3bdc7de5" }, "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, + "lualine-diagnostic-message": { "branch": "master", "commit": "132ec94f3f5358bad91de955f05aee2f5b3e946d" }, "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, "luasnip-snippets": { "branch": "main", "commit": "c948a463195515bef9468bfffe37552d3594c27c" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "56e435e09f8729af2d41973e81a0db440f8fe9c9" }, diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 3634060..6be064a 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -31,7 +31,9 @@ local lspKeys = function(client, bufnr) vim.tbl_extend('error', options, { desc = 'References' })) vim.keymap.set('n', 's', tele_builtins.lsp_dynamic_workspace_symbols, vim.tbl_extend('error', options, { desc = 'Workspace symbols' })) - vim.keymap.set('n', 'v', function() tele_builtins.diagnostics({ bufnr = 0 }) end, + vim.keymap.set('n', 'v', vim.diagnostic.open_float, + vim.tbl_extend('error', options, { desc = 'Diagnostics Float' })) + vim.keymap.set('n', 'V', function() tele_builtins.diagnostics({ bufnr = 0 }) end, vim.tbl_extend('error', options, { desc = 'Diagnostics' })) vim.keymap.set('n', '', 'ClangdSwitchSourceHeader', vim.tbl_extend('error', options, { desc = 'Switch Source/Header' })) @@ -126,7 +128,7 @@ return { ensure_installed = { 'clangd', 'denols', - 'neocmake', + -- 'neocmake', 'pyright', -- 'zk', -- No support for windows 'lua_ls', @@ -347,14 +349,6 @@ return { end, }, }) - local diag_group = vim.api.nvim_create_augroup('lsp_diagnostic_float', { clear = false }) - vim.api.nvim_create_autocmd({ 'CursorHold' }, { - callback = function() - vim.diagnostic.open_float({scope = 'line', focusable = false}, { focus = false }) - end, - group = diag_group, - desc = 'Document Highlight', - }) end, event = 'VeryLazy' } diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 9cf03b3..1c3fd56 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -1,6 +1,9 @@ return { 'nvim-lualine/lualine.nvim', - dependencies = { 'nvim-tree/nvim-web-devicons' }, + dependencies = { + 'nvim-tree/nvim-web-devicons', + 'Isrothy/lualine-diagnostic-message' + }, config = function() local statusline = require('arrow.statusline') require('lualine').setup { @@ -59,6 +62,15 @@ return { { 'filesize', }, + { + 'diagnostic-message', + icons = { + error = ' ', + warn = ' ', + info = ' ', + hint = ' ', + } + } }, lualine_c = { },