sgwilym / nova-deno

A Deno extension for Nova.
https://extensions.panic.com/extensions/co.gwil/co.gwil.deno/
MIT License
13 stars 1 forks source link

fix: format on save issue applying workspace configuration #16

Closed stexxart closed 2 years ago

stexxart commented 2 years ago

The language server, linting, and unstable APIs can be enabled at a workspace level, but formatting on save can only be configured at the global level. This causes issues when you've got other formatters enabled. I think this was a simple fix, as the workspace configuration was not being applied when formatting on save. I've used the available getOverridableBoolean function to override the global setting if the workspace setting has been configured.

sgwilym commented 2 years ago

Oh, thanks for catching this! Looks good.

While we're here, it's worth mentioning that in Nova 7.2 this feature will cause the app to crash. This seems to be happening with every extension which uses TextEditorEdit.replace, and I've logged it with them and am waiting for a fix, as it's super annoying.