-
Notifications
You must be signed in to change notification settings - Fork 462
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
feat: support formatting changed lines only #1028
Conversation
Signed-off-by: ayamir <[email protected]>
@jh244212647 checkout to this pr and test it. |
测了一下,能满足需求,大佬非常给力,另外这个pr如果合入,settings["format_modify"] = false会不会好一点 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🍉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. But I wonder if all LSP support rangeFormatting at this point. 🤔
Not all, just some support it: |
* feat: support format only for modidications. Signed-off-by: ayamir <[email protected]> * fixup:! correct the format logic. * fixup!: set `format_modify` = `false` by default. * fix: clarify `format_modify` & cleanup * fix: add missing `vim.notify` * fix CI * fix(settings): sort formatting-related entries --------- Signed-off-by: ayamir <[email protected]> Co-authored-by: Jint-lzxy <[email protected]>
* feat: support format only for modidications. Signed-off-by: ayamir <[email protected]> * fixup:! correct the format logic. * fixup!: set `format_modify` = `false` by default. * fix: clarify `format_modify` & cleanup * fix: add missing `vim.notify` * fix CI * fix(settings): sort formatting-related entries --------- Signed-off-by: ayamir <[email protected]> Co-authored-by: Jint-lzxy <[email protected]>
Propose it because this requirement is common as the readme of this plugin: https://github.com/joechrisellis/lsp-format-modifications.nvim#what-problem-does-this-solve
Additionally, it's inevitable to add this function by modifying the
formatting.lua
file, which isn't what we want to see.