sbdchd / neoformat

:sparkles: A (Neo)vim plugin for formatting code.
BSD 2-Clause "Simplified" License
1.99k stars 189 forks source link

Configuring enabled formatters doesn't seem to take effect #372

Open itmecho opened 3 years ago

itmecho commented 3 years ago

I have g:neoformat_enabled_typescript = ['prettier'] in my config to stop neoformat from using clang-format when prettier fails but it doesn't seem to be working.

I can see that the setting is configured properly but the enabled formatters don't seem to be affected?

:echo g:neoformat_enabled_typescript
['prettier']

:echo neoformat#formatters#typescript#enabled()
['tsfmt', 'prettier', 'prettiereslint', 'tslint', 'eslint_d', 'clangformat', 'denofmt']
elliotdavies commented 2 years ago

@itmecho It's not an answer to your question, but if you're formatting a TSX file you may need to configure the typescriptreact filetype too:

let g:neoformat_enabled_typescriptreact = ['prettier']

Tripped me up for a while!