move old nvim config

This commit is contained in:
Barrett Ruth 2026-02-10 18:44:55 -05:00
parent c9ae53e233
commit e7740e9989
27 changed files with 492 additions and 704 deletions

View file

@ -27,35 +27,7 @@ vim.lsp.config('*', {
flags = { debounce_text_changes = 0 },
})
vim.api.nvim_create_autocmd('LspAttach', {
callback = function(opts)
local client = vim.lsp.get_client_by_id(opts.data.client_id)
if
client
and (
client:supports_method('textDocument/formatting')
or client:supports_method('formatting')
)
then
local modes = { 'n' }
if
client:supports_method('textDocument/rangeFormatting')
or client:supports_method('rangeFormatting')
then
table.insert(modes, 'x')
end
bmap({
modes,
'gF',
lsp.format,
}, { buffer = opts.buf, silent = false })
end
end,
group = vim.api.nvim_create_augroup('ALspFormat', { clear = true }),
})
map({ { 'n', 'x' }, 'gF', lsp.format })
for _, server in ipairs({
'bashls',