-
Notifications
You must be signed in to change notification settings - Fork 464
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: add FormatToggle
keymap (#750)
#751
Conversation
Functionally this should works, but I'm not sure how to feel about this. |
I'm a C/C++ developer, I do't need |
i don't think everything needs to be send to upstreams. in fact, most of the maintainers of this repo keeps their own forks/repos to cater their needs. u can fork this repo, create another branch, and cherry-pick the commits then merge into your own branch. |
i'm leaning towards to close this pr. |
This settings means that every project I need to disable auto format must add it‘s directory here, which is far less convenient than keymap. |
I agree with you, but I think this feature is more user-friendly. |
Personally I just put all my projects in a folder called But I'm fine with new keymaps. |
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.
Set a keymap for FormatToggle
is fine, but why need to modify formatting.lua
?
Because this is a bug, when I toggle to disable, nvim will not send a notification(toggle to enable wiil do this). modify |
Just add keymap works for me, never bug encountered. |
In fact this is intentional. If one disables a config entry (such as |
I'm also leaning towards closing this pr -
u might be interested in Clang-Format Style Options, and if you really want to disable code formatting for nvimdots/lua/modules/configs/completion/null-ls.lua Lines 12 to 15 in 0f79d01
FWIW adding too many keymaps that are "seemingly" rare can make the config too cumbersome and further limit customizability. For features that have strong practicality for specific groups of users, they should be left to the users to implement those features themselves, which is also one of the reasons why we use |
Thank you for explaining, it's up to you to merge the PR or not. |
lua/keymap/completion.lua
Outdated
local map_callback = bind.map_callback | ||
|
||
local plug_map = { | ||
-- LSP-related keymaps, work only when event = { "InsertEnter", "LspStart" } |
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.
Format functionality is related with formatter in fact, some lsp server support it but others not. So this note should be remove.
* feat: add `FormatToggle` keymap (ayamir#750) * remove reduntant note. --------- Co-authored-by: ayamir <[email protected]>
* feat: add `FormatToggle` keymap (ayamir#750) * remove reduntant note. --------- Co-authored-by: ayamir <[email protected]> (cherry picked from commit 41262de)
* feat: add `FormatToggle` keymap (ayamir#750) * remove reduntant note. --------- Co-authored-by: ayamir <[email protected]>
No description provided.