Skip to content
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: allow disabling format on save per buffer #156

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

horriblename
Copy link
Collaborator

allows disabling format on save at runtime with let b:formatsave = v:false

@NotAShelf
Copy link
Owner

could be a good idea to have a (configurable) keybind instead of hoping the user remembers what the command is

@horriblename horriblename force-pushed the feat-disable-autoformat branch from c6c0425 to 1e4c96e Compare October 23, 2023 16:41
@horriblename horriblename force-pushed the feat-disable-autoformat branch from 1e4c96e to d43afa4 Compare October 23, 2023 16:50
@horriblename horriblename marked this pull request as ready for review October 23, 2023 16:54
@horriblename
Copy link
Collaborator Author

not sure if <leader>ltf is a sensible default

@NotAShelf
Copy link
Owner

the l key is usually reserved for LSP actions, not sure if it's the correct group.

Perhaps we can add a keybind such as <leader>s for saving and something else like <leader>sd for save-disable?

@horriblename
Copy link
Collaborator Author

it is an LSP thing tho is it not? since formatOnSave is defined in vim.lsp.formatOnSave

@NotAShelf
Copy link
Owner

it is, in all technicality, but to an end user formatting is something the editor should do on a whim

which is why I think it should be a single top level key

@NotAShelf
Copy link
Owner

though, lets not re-invent the wheel for now. I think the way things are right now are fine

@NotAShelf NotAShelf merged commit 2b48b6d into NotAShelf:main Oct 23, 2023
7 of 8 checks passed
@horriblename horriblename deleted the feat-disable-autoformat branch June 27, 2024 08:04
bloxx12 pushed a commit to bloxx12/nvf that referenced this pull request Sep 29, 2024
…ormat

feat: allow disabling format on save per buffer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants