aboutsummaryrefslogtreecommitdiff
path: root/autoload/prettier/resolver
diff options
context:
space:
mode:
Diffstat (limited to 'autoload/prettier/resolver')
-rw-r--r--autoload/prettier/resolver/executable.vim7
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