nvim: migrate lsp lines to builtin
This commit is contained in:
parent
49303ddc19
commit
e6f4dced59
3 changed files with 20 additions and 46 deletions
|
@ -47,7 +47,7 @@ function M.setup()
|
||||||
|
|
||||||
local isfname = {}
|
local isfname = {}
|
||||||
for _, ch in ipairs(vim.opt.isfname:get()) do
|
for _, ch in ipairs(vim.opt.isfname:get()) do
|
||||||
if ch ~= "=" then
|
if ch ~= '=' then
|
||||||
table.insert(isfname, ch)
|
table.insert(isfname, ch)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -122,17 +122,19 @@ function M.setup()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local sev = vim.diagnostic.severity
|
||||||
vim.diagnostic.config({
|
vim.diagnostic.config({
|
||||||
virtual_text = false
|
virtual_text = false,
|
||||||
-- virtual_text = {
|
virtual_lines = { current_line = true },
|
||||||
-- format = function(diag)
|
|
||||||
-- local s = vim.diagnostic.severity
|
signs = {
|
||||||
-- if diag.severity == s.E or diag.severity == s.W then
|
text = {
|
||||||
-- return diag.message
|
[sev.ERROR] = '',
|
||||||
-- end
|
[sev.WARN] = '',
|
||||||
-- return nil
|
[sev.INFO] = '',
|
||||||
-- end,
|
[sev.HINT] = '',
|
||||||
-- },
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
if vim.g.neoray then -- {{{
|
if vim.g.neoray then -- {{{
|
||||||
|
@ -154,7 +156,7 @@ function M.reset(winids)
|
||||||
winids = api.nvim_tabpage_list_wins(0)
|
winids = api.nvim_tabpage_list_wins(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
if type(winids) == number then
|
if type(winids) == 'number' then
|
||||||
winids = { winids }
|
winids = { winids }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -218,17 +218,6 @@ function M.config()
|
||||||
end,
|
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
|
local term = vim.env.TERM
|
||||||
if (term ~= 'linux' or vim.g.neoray)
|
if (term ~= 'linux' or vim.g.neoray)
|
||||||
then
|
then
|
||||||
|
|
|
@ -77,23 +77,6 @@ return {
|
||||||
},
|
},
|
||||||
|
|
||||||
{ 'dyng/ctrlsf.vim', cmd = 'CtrlSF' },
|
{ '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',
|
'andymass/vim-matchup',
|
||||||
|
@ -159,5 +142,5 @@ return {
|
||||||
-- Your DBUI configuration
|
-- Your DBUI configuration
|
||||||
vim.g.db_ui_use_nerd_fonts = 1
|
vim.g.db_ui_use_nerd_fonts = 1
|
||||||
end,
|
end,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue