-
Notifications
You must be signed in to change notification settings - Fork 918
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: formatting.lua sets formatexpr unconditionally #1759
Labels
bug
Something isn't working
Comments
Here's the workaround I'm using for the moment: local Formatting = require('lazyvim.plugins.formatting')
return {
{
'stevearc/conform.nvim',
init = function()
Formatting[1].init() -- call the original init func
vim.opt.formatexpr = '' -- reset formatexpr
end,
},
} |
You can now override it in |
Thank you! |
Gasol
added a commit
to Gasol/dotfiles
that referenced
this issue
Oct 19, 2023
andros21
added a commit
to andros21/dotfiles
that referenced
this issue
Oct 24, 2023
so `gq` can be used to manually wrap text as before see LazyVim/LazyVim#1759
Zilanlann
pushed a commit
to Zilanlann/neovim
that referenced
this issue
Nov 15, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Did you check docs and existing issues?
Neovim version (nvim -v)
v0.10.0-dev+1344-g712adacdf
Operating system/version
Fedora 38
Describe the bug
Since lazyvim switched to conform,
formatexpr
is set in a way that is hard to override:LazyVim/lua/lazyvim/plugins/formatting.lua
Line 53 in fef0b3f
I've tried setting it in
config/options.lua
back to the defaultvim.opt.formatexpr = ''
(so thatgq
wraps text rather than calling conform) but the plugin overrides. I also tried various hacks such asbut that only works on the second invocation of
gq
, and it's obviously hacky besides.Seems like this should be an optional setting, but I'm not sure if you'd rather do it in the opts for that plugin, or a different way. Thoughts?
Steps To Reproduce
gql
doesn't wrap lines:set formatexpr=''
gql
wraps linesExpected Behavior
I want
gq
to work the normal vim way, instead of callingconform
Repro
The text was updated successfully, but these errors were encountered: