diff options
| author | mitermayer <mitermayer.reis@gmail.com> | 2018-01-15 09:16:37 -0800 |
|---|---|---|
| committer | mitermayer <mitermayer.reis@gmail.com> | 2018-01-15 09:18:20 -0800 |
| commit | 1e2a63bbda85ac6fc713f3651de603aedffc012b (patch) | |
| tree | 358e5800e5e9c3bd24768d2d982aad99402ff3c3 | |
| parent | 9e4fb5a9c9eafff143f32a655218052127b5ccc8 (diff) | |
| download | vim-prettier-1e2a63bbda85ac6fc713f3651de603aedffc012b.tar.xz | |
Disabling nvim async by default under feature flag
- The new nvim async had some bugs reported, while we are still investigating fixes for it we will then disable it by default, users should be able to still use it by enabling the flag on their .vimrc in the meantime `g:prettier#nvim_unstable_async`
| -rw-r--r-- | autoload/prettier.vim | 2 | ||||
| -rw-r--r-- | plugin/prettier.vim | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/autoload/prettier.vim b/autoload/prettier.vim index 680d661..a7c167e 100644 --- a/autoload/prettier.vim +++ b/autoload/prettier.vim @@ -55,7 +55,7 @@ function! prettier#Prettier(...) abort if l:async && v:version >= 800 && exists('*job_start') call s:Prettier_Exec_Async(l:cmd, l:startSelection, l:endSelection) - elseif l:async && has('nvim') + elseif l:async && has('nvim') && g:prettier#nvim_unstable_async call s:Prettier_Exec_Async_Nvim(l:cmd, l:startSelection, l:endSelection) else call s:Prettier_Exec_Sync(l:cmd, l:startSelection, l:endSelection) diff --git a/plugin/prettier.vim b/plugin/prettier.vim index bd33cd2..bd02c3c 100644 --- a/plugin/prettier.vim +++ b/plugin/prettier.vim @@ -20,6 +20,9 @@ let g:loaded_prettier = 1 " autoformating enabled by default upon saving let g:prettier#autoformat = get(g:, 'prettier#autoformat', 1) +" experimental async flag will be disabled by default until is stable +let g:prettier#nvim_unstable_async = get(g:,'prettier#nvim_unstable_async', 0) + " path to prettier cli let g:prettier#exec_cmd_path = get(g:, 'prettier#exec_cmd_path', 0) |
