neovim: fix lsp error display using diagflow and some deprecated api stuff

This commit is contained in:
Mark Riedesel 2025-05-09 10:11:45 -05:00
parent a441122b9a
commit 302a0a06ba
4 changed files with 26 additions and 7 deletions

View file

@ -1,7 +1,9 @@
return {
"rmagatti/auto-session",
config = function ()
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
require('auto-session').setup({
log_level = 'warning',
auto_restore_enabled = false,
})
local keymap = vim.keymap

View file

@ -0,0 +1,8 @@
return {
"dgagn/diagflow.nvim",
config = function ()
require('diagflow').setup({
placement = 'top',
})
end,
}

View file

@ -74,13 +74,22 @@ return {
-- Change the Diagnostic symbols in the sign column (gutter)
-- (not in youtube nvim video)
local signs = { Error = "", Warn = "", Hint = "󰠠 ", Info = "" }
for type, icon in pairs(signs) do
local hl = "DiagnosticSign" .. type
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" })
end
vim.diagnostic.config({
virtual_text = false, -- diagflow handles display
float = {
style = 'minimal',
},
signs = {
text = {
[vim.diagnostic.severity.ERROR] = '',
[vim.diagnostic.severity.WARN] = '',
[vim.diagnostic.severity.HINT] = '󰠠 ',
[vim.diagnostic.severity.INFO] = '',
},
},
})
mason_lspconfig.setup_handlers({
mason_lspconfig.setup({
-- default handler for installed servers
function(server_name)
lspconfig[server_name].setup({

View file

@ -45,7 +45,7 @@ return {
"tsx",
"typescript",
"vim",
"yaml",
-- "yaml",
"gitignore",
"query",
"vimdoc",