1
0
Fork 0

nvim: migrate lsp lines to builtin

This commit is contained in:
Vladimír Dudr 2025-04-15 07:54:09 +02:00
parent 49303ddc19
commit e6f4dced59
3 changed files with 20 additions and 46 deletions

View file

@ -47,7 +47,7 @@ function M.setup()
local isfname = {}
for _, ch in ipairs(vim.opt.isfname:get()) do
if ch ~= "=" then
if ch ~= '=' then
table.insert(isfname, ch)
end
end
@ -122,17 +122,19 @@ function M.setup()
end,
})
local sev = vim.diagnostic.severity
vim.diagnostic.config({
virtual_text = false
-- virtual_text = {
-- format = function(diag)
-- local s = vim.diagnostic.severity
-- if diag.severity == s.E or diag.severity == s.W then
-- return diag.message
-- end
-- return nil
-- end,
-- },
virtual_text = false,
virtual_lines = { current_line = true },
signs = {
text = {
[sev.ERROR] = '',
[sev.WARN] = '',
[sev.INFO] = '',
[sev.HINT] = '󰌵',
},
},
})
if vim.g.neoray then -- {{{
@ -154,7 +156,7 @@ function M.reset(winids)
winids = api.nvim_tabpage_list_wins(0)
end
if type(winids) == number then
if type(winids) == 'number' then
winids = { winids }
end
@ -165,7 +167,7 @@ function M.reset(winids)
for _, win in pairs(winids) do
local buf = api.nvim_win_get_buf(win)
local ft = api.nvim_get_option_value('filetype', { buf = buf})
local ft = api.nvim_get_option_value('filetype', { buf = buf })
end
end

View file

@ -218,17 +218,6 @@ function M.config()
end,
})
vim.api.nvim_create_autocmd('ColorschemePre', {
group = augr,
pattern = '*',
callback = function()
vim.fn.sign_define('DiagnosticSignError', { text = '', texthl = 'DiagnosticSignError' })
vim.fn.sign_define('DiagnosticSignWarn', { text = '', texthl = 'DiagnosticSignWarn' })
vim.fn.sign_define('DiagnosticSignInfo', { text = '', texthl = 'DiagnosticSignInfo' })
vim.fn.sign_define('DiagnosticSignHint', { text = '󰌵', texthl = 'DiagnosticSignHint' })
end,
})
local term = vim.env.TERM
if (term ~= 'linux' or vim.g.neoray)
then

View file

@ -77,23 +77,6 @@ return {
},
{ 'dyng/ctrlsf.vim', cmd = 'CtrlSF' },
{
'https://git.sr.ht/~whynothugo/lsp_lines.nvim',
config = function()
local lines = require('lsp_lines')
lines.setup()
vim.diagnostic.config({
virtual_lines = function(_, bufnr)
local ft = vim.api.nvim_get_option_value('filetype', { buf = bufnr })
if ft == 'lazy' then
return false
else
return { only_current_line = true }
end
end,
})
end,
},
{
'andymass/vim-matchup',
@ -103,9 +86,9 @@ return {
end,
},
{ 'fpob/nette.vim', ft = 'nette' },
{ 'ziglang/zig.vim', ft = 'zig' },
{ 'chrisbra/csv.vim', ft = 'csv' },
{ 'fpob/nette.vim', ft = 'nette' },
{ 'ziglang/zig.vim', ft = 'zig' },
{ 'chrisbra/csv.vim', ft = 'csv' },
{ 'NoahTheDuke/vim-just' },
{ 'towolf/vim-helm' },
{ 'grafana/vim-alloy' },
@ -146,7 +129,7 @@ return {
{
'kristijanhusak/vim-dadbod-ui',
dependencies = {
{ 'tpope/vim-dadbod', lazy = true },
{ 'tpope/vim-dadbod', lazy = true },
{ 'kristijanhusak/vim-dadbod-completion', ft = { 'sql', 'mysql', 'plsql' }, lazy = true },
},
cmd = {
@ -159,5 +142,5 @@ return {
-- Your DBUI configuration
vim.g.db_ui_use_nerd_fonts = 1
end,
}
},
}