1
0
Fork 0
mirror of synced 2024-11-10 11:18:58 -05:00
ultimate-vim/sources_non_forked/ale/autoload/ale/node.vim
2021-05-31 22:30:26 +02:00

22 lines
779 B
VimL

" Author: w0rp <devw0rp@gmail.com>
" Description: Functions for working with Node executables.
call ale#Set('windows_node_executable_path', 'node.exe')
" Create a executable string which executes a Node.js script command with a
" Node.js executable if needed.
"
" The executable string should not be escaped before passing it to this
" function, the executable string will be escaped when returned by this
" function.
"
" The executable is only prefixed for Windows machines
function! ale#node#Executable(buffer, executable) abort
if has('win32') && a:executable =~? '\.js$'
let l:node = ale#Var(a:buffer, 'windows_node_executable_path')
return ale#Escape(l:node) . ' ' . ale#Escape(a:executable)
endif
return ale#Escape(a:executable)
endfunction