fix: formatexpr with lsp changed

we need to adapt to it
This commit is contained in:
Jeremy Wall 2025-06-30 10:22:32 -05:00
parent b254617843
commit 398c2a8291

View File

@ -20,6 +20,10 @@ vim.opt.fileformats = "unix,dos"
-- Recommended by Avante docs
-- views can only be fully collapsed with the global statusline
vim.opt.laststatus = 3
-- formatexpr defaulted to the lsp provider by default recently
-- which breaks `gq` and company paragraph formatting in non lsp
-- contexts.
vim.opt.formatexpr = ""
vim.g.BASH_AuthorName = 'Jeremy Wall'
vim.g.BASH_AuthorRef = 'jw'
@ -256,6 +260,10 @@ vim.api.nvim_create_autocmd('LspAttach', {
if client and client.server_capabilities.codelens then
vim.lsp.codelens.refresh()
end
-- formatexpr defaulted to the lsp provider by default recently
-- which breaks `gq` and company paragraph formatting in non lsp
-- contexts.
vim.bo[args.buf].formatexpr = ""
end,
})