diff options
| author | Mitermayer Reis <mitermayer.reis@gmail.com> | 2020-09-07 19:36:23 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-07 19:36:23 +1000 |
| commit | 340182bbfedd18dd3eb3cac8adc62be0de90b3f4 (patch) | |
| tree | dd57b367910b336c7f7297cc5e2b0aa804a48cec /autoload/prettier/resolver/executable.vim | |
| parent | e12223182a51c85528159cb8baf4339998eb9797 (diff) | |
| parent | ec8dc2bc344985c09e34fd6a4aff73702e2b7967 (diff) | |
| download | vim-prettier-340182bbfedd18dd3eb3cac8adc62be0de90b3f4.tar.xz | |
Merge branch 'master' into issue/232-adding-support-for-prettier-2.x
Diffstat (limited to 'autoload/prettier/resolver/executable.vim')
| -rw-r--r-- | autoload/prettier/resolver/executable.vim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/autoload/prettier/resolver/executable.vim b/autoload/prettier/resolver/executable.vim index 8d233ab..0cb0b02 100644 --- a/autoload/prettier/resolver/executable.vim +++ b/autoload/prettier/resolver/executable.vim @@ -33,7 +33,12 @@ endfunction function! s:GetExecPath(...) abort let l:rootDir = a:0 > 0 ? a:1 : -1 let l:dir = l:rootDir != -1 ? l:rootDir . '/.bin/' : '' - return l:dir . 'prettier' + let l:path = l:dir . get(b:, 'prettier_exec_cmd', 'prettier') + if executable(l:path) + return l:path + else + return l:dir . 'prettier' + endif endfunction " Searches for the existence of a directory accross |
