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

fixed bugs with options and the fmt command #8

Closed
wants to merge 1 commit into from
Closed

fixed bugs with options and the fmt command #8

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Jun 9, 2024

Fix for a couple of bugs.

Fixes #2, the README previously said to run set fmt-onsave false, which was missing the plugin prefix. The working command is set autofmt.fmt-onsave false

Fixes #4

There were a couple of small bugs causing the functionality not to work.

  • Having RegisterCommonOption inside the init() funtion stops the default value from taking effect.
  • Similar to the first fix, the tryFmt function was checking fmt-onsave instead of autofmt.fmt-onsave.
  • Previously MakeCommand was mapping fmt to tryFmt, which had the side effect that fmt would not work if the fmt-onsave option was disabled. I fixed this by adding a new function, fmtCmd, which is the same as tryFmt but without the config check.

@ghost ghost closed this by deleting the head repository Aug 11, 2024
This pull request was closed.
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.

Can't get it to work at all (?) set fmt-onsave false -- Invalid Option
0 participants