From 2ee343b23b5fa207d7fe75acc57008194bc8c9b4 Mon Sep 17 00:00:00 2001 From: mitermayer Date: Fri, 4 May 2018 22:13:23 -0700 Subject: Adding support for neovim --- autoload/prettier/job/async/neovim.vim | 2 -- autoload/prettier/job/runner.vim | 6 +----- plugin/prettier.vim | 3 --- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/autoload/prettier/job/async/neovim.vim b/autoload/prettier/job/async/neovim.vim index c324f17..1d3531d 100644 --- a/autoload/prettier/job/async/neovim.vim +++ b/autoload/prettier/job/async/neovim.vim @@ -37,8 +37,6 @@ endfunction " 2. extract common functionality either above to the runner or to some other module " " to test this it rellies on using nvim and having the flag -" g:prettier#nvim_unstable_async=1 - enabled -" " " note that somehow we exectuing both async and sync on nvim when using the autoformat function! s:onExit(status, info, out, err) abort diff --git a/autoload/prettier/job/runner.vim b/autoload/prettier/job/runner.vim index 92a27b9..60cb8a5 100644 --- a/autoload/prettier/job/runner.vim +++ b/autoload/prettier/job/runner.vim @@ -1,11 +1,7 @@ " TODO " move the bellow vim checks to UTILS -" -" TODO -" we are currently feature protecting async on NVIM with g:prettier#nvim_unstable_async -" we should remove this once its fully supported let s:isLegacyVim = v:version < 800 -let s:isNeoVim = has('nvim') && g:prettier#nvim_unstable_async +let s:isNeoVim = has('nvim') let s:isAsyncVim = !s:isLegacyVim && exists('*job_start') function! prettier#job#runner#run(cmd, startSelection, endSelection, async) abort diff --git a/plugin/prettier.vim b/plugin/prettier.vim index f70cadb..5de9caf 100644 --- a/plugin/prettier.vim +++ b/plugin/prettier.vim @@ -20,9 +20,6 @@ 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) -- cgit v1.3