fix: formatexpr with lsp changed
we need to adapt to it
This commit is contained in:
parent
b254617843
commit
398c2a8291
@ -20,6 +20,10 @@ vim.opt.fileformats = "unix,dos"
|
|||||||
-- Recommended by Avante docs
|
-- Recommended by Avante docs
|
||||||
-- views can only be fully collapsed with the global statusline
|
-- views can only be fully collapsed with the global statusline
|
||||||
vim.opt.laststatus = 3
|
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_AuthorName = 'Jeremy Wall'
|
||||||
vim.g.BASH_AuthorRef = 'jw'
|
vim.g.BASH_AuthorRef = 'jw'
|
||||||
@ -256,6 +260,10 @@ vim.api.nvim_create_autocmd('LspAttach', {
|
|||||||
if client and client.server_capabilities.codelens then
|
if client and client.server_capabilities.codelens then
|
||||||
vim.lsp.codelens.refresh()
|
vim.lsp.codelens.refresh()
|
||||||
end
|
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,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user