micro-autofmt icon indicating copy to clipboard operation
micro-autofmt copied to clipboard

set fmt-onsave false -- Invalid Option

Open dzalf opened this issue 2 years ago • 4 comments

Hi

I am facing issues with the plugin running on the wsl system for Windows (Ubuntu 20.04 LTS).

When typing the option to disable formatting on save I get this:

image

Running the command CTRL-E > fmt does nothing even when saving the file and reopening it

I am running the latest version of Micro:

image

Any ideas?

Cheers

dzalf avatar Oct 06 '23 19:10 dzalf

What is the result of plugin list within micro? How did you install autofmt?

a11ce avatar Oct 09 '23 18:10 a11ce

What is the result of plugin list within micro? How did you install autofmt?

Hi

Thanks for the prompt response

I installed it cloning the repo and running make

The list of installed plugins is this:

image

I am currently testing with this ugly code:

image

Doing CTRL+e >> fmt does NOTHING after saving the file.

Executing: CTRL+e >>set fmt-onsave false throws the invalid option error

EDIT: Corrected typo on command

dzalf avatar Oct 09 '23 21:10 dzalf

Hi @a11ce

Any ideas? 🤔

dzalf avatar Oct 27 '23 18:10 dzalf

Can confirm. This happens when the "fmt-onsave" option is not in the settings.json file. Once you add it manually, you can then change it with the command.

Edit: The real issue was just a typo, the setting is called autofmt.fmt-onsave. Adding fmt-onsave to the config file only works because of a similar typo in the tryFmt function

ghost avatar Jun 09 '24 16:06 ghost