Replies: 16 comments 5 replies
-
change this line in your lvim.format_on_save = true to lvim.format_on_save = false |
Beta Was this translation helpful? Give feedback.
-
hitting the |
Beta Was this translation helpful? Give feedback.
-
cc: @kylo252 what do you think? |
Beta Was this translation helpful? Give feedback.
-
It should be easy to undo tho, since both
I actually have it set only for lvim.format_on_save = {
---@usage pattern string pattern used for the autocommand (Default: '*')
pattern = "*.lua",
---@usage timeout number timeout in ms for the format request (Default: 1000)
timeout = 1000,
} |
Beta Was this translation helpful? Give feedback.
-
lvim.format_on_save = {
---@usage pattern string pattern used for the autocommand (Default: '*')
pattern = "*.lua",
---@usage timeout number timeout in ms for the format request (Default: 1000)
timeout = 1000,
} lets put this in the default config.lua |
Beta Was this translation helpful? Give feedback.
-
I think sticking to what most editors do is better. I think most editors do format on save, and I actually like this behaviour. |
Beta Was this translation helpful? Give feedback.
-
we should at least use this syntax lvim.format_on_save = {
---@usage pattern string pattern used for the autocommand (e.g: '*.lua')
pattern = "*",
---@usage timeout number timeout in ms for the format request (Default: 1000)
timeout = 1000,
} instead of LunarVim/utils/installer/config.example.lua Lines 13 to 14 in b4d5f09 in our default config file |
Beta Was this translation helpful? Give feedback.
-
I agree that putting it more accesible on the default config is the best thing to do |
Beta Was this translation helpful? Give feedback.
-
I did! My concern is that when I first tested lunarvim on my files, it auto formatted the file and I didn't know how to restore at first (you can't undo and save because saving triggers formatting). |
Beta Was this translation helpful? Give feedback.
-
The default
The vscode editor does not do this as default. Regarding what you wrote @abzcoding . |
Beta Was this translation helpful? Give feedback.
-
probably 😢 |
Beta Was this translation helpful? Give feedback.
-
Not everyone is a beast like you xD |
Beta Was this translation helpful? Give feedback.
-
We started with the autoformat setting as OFF. We set the example config to ON because we had so many open issues asking how to turn it on. Now that it's the default option, we don't get as many questions about it. |
Beta Was this translation helpful? Give feedback.
-
Relevant to this discussion is that, out of the box, editing Shell scripts with LunarVim is very annoying since every save results in the following popup.
Editing Shell scripts is, especially among Vim users, a fairly basic and common task, that I did not expect to require user configuration. Relevant: #3048 |
Beta Was this translation helpful? Give feedback.
-
I am using Lunarvim because of the strong opinions and so I want formatting on save to be the default. As long as it can be disabled easily I don't see the problem. I don't mind the pop up message when there is no language server install. My 2 cents. |
Beta Was this translation helpful? Give feedback.
-
Formatting on save is now disabled by default 08d3c05 |
Beta Was this translation helpful? Give feedback.
-
Feature Description
Formatting on save changes user's file with no easy way to undo. It should be disabled.
Reasons:
I know default configurations are opinions, but I don't think formatting on save is a good thing to enable by default. I installed LunarVim to try it out on my files and had to find ways to restore it because LunarVim formats it unexpectably.
Describe the alternatives you have considered
Support information
No response
Beta Was this translation helpful? Give feedback.
All reactions