onivim / oni

Oni: Modern Modal Editing - powered by Neovim
https://www.onivim.io
MIT License
11.34k stars 298 forks source link

Prettier status icon should toggle the plugin as opposed to calling format #2201

Open akinsho opened 6 years ago

akinsho commented 6 years ago

Having recently been working on a codebase that doesn't allow for prettier everywhere I've realised that the plugin is a little unwieldy re. selective use of the plugin its either on and runs everywhere or off and cant be used till the config file is reloaded.

I think a good change would be to actually have clicking the status icon toggle the plugin and also introducing a command like prettier.toggle so a user can easily turn in off to work in some parts of a code base and not in others

CrossR commented 6 years ago

Does the project specific config work for it?

Ie, the config.js in /myproject/.oni/config.js. That at least gives people a way right now that disables it for that project.

akinsho commented 6 years ago

@CrossR that was my first thought/attempt which ended up in me raising #2166 i.e. it didn't seem to be correctly picking up my config.tsx so I created a config.js but that ended up with some overriding issues I logged in there which make that route less feasible.

samhh commented 6 years ago

Is there any reason why the button at the bottom is still visible even if "oni.plugins.prettier".enabled is false?