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 { return {
"rmagatti/auto-session", "rmagatti/auto-session",
config = function () config = function ()
vim.o.sessionoptions="blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
require('auto-session').setup({ require('auto-session').setup({
log_level = 'warning',
auto_restore_enabled = false, auto_restore_enabled = false,
}) })
local keymap = vim.keymap 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) -- Change the Diagnostic symbols in the sign column (gutter)
-- (not in youtube nvim video) -- (not in youtube nvim video)
local signs = { Error = "", Warn = "", Hint = "󰠠 ", Info = "" } vim.diagnostic.config({
for type, icon in pairs(signs) do virtual_text = false, -- diagflow handles display
local hl = "DiagnosticSign" .. type float = {
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = "" }) style = 'minimal',
end },
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 -- default handler for installed servers
function(server_name) function(server_name)
lspconfig[server_name].setup({ lspconfig[server_name].setup({

View file

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