diff --git a/nix/base-system/init.lua b/nix/base-system/init.lua index 92b1f84..56ba4cd 100644 --- a/nix/base-system/init.lua +++ b/nix/base-system/init.lua @@ -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, })