refactor: unify syntax langs

This commit is contained in:
2025-10-22 17:17:24 +03:00
parent bcbd5c9faa
commit 77d4250057
6 changed files with 107 additions and 72 deletions

View File

@@ -50,9 +50,9 @@ end
map('n', ']b', cmd('bnext'))
map('n', '[b', cmd('bprevious'))
map('n', '<leader>bl', cmd('ls'))
map('n', '<leader>bb', '<C-^>') -- toggle between buffers
map('n', '<leader>bd', cmd('bdelete'))
map('n', '<leader>bd', cmd(':bp | bd #'))
map('n', '<leader>bo', cmd('%bd|e#')) -- close all except current
map('n', '<leader>bb', '<C-^>') -- toggle between buffers
-- Terminal
map('n', '<leader>xx', cmd('TermDefault'))

View File

@@ -87,3 +87,25 @@ vim.opt.timeout = true
vim.opt.ttimeout = true
vim.opt.timeoutlen = 500
vim.opt.ttimeoutlen = 10
vim.keymap.set('n', '<leader>d', vim.diagnostic.open_float, { noremap = true, silent = true })
vim.diagnostic.config({
update_in_insert = false,
virtual_text = {
prefix = '', -- remove annoying ▎ etc
format = function(diagnostic)
if diagnostic.source then
return string.format('[%s] %s', diagnostic.source, diagnostic.message)
end
return diagnostic.message
end,
},
float = {
border = 'rounded',
source = true, -- show source in floating window too
},
severity_sort = true,
})
vim.opt.foldmethod = 'expr'
vim.opt.foldexpr = 'nvim_treesitter#foldexpr()'