Skip to content

Commit ae8bd7a

Browse files
committed
better technique for plugin-relative path
1 parent dbe3057 commit ae8bd7a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

autoload/codefmt/juliaformatter.vim

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ let s:checkedInstall = 0
2121
" Formatter: JuliaFormatter
2222
function! codefmt#juliaformatter#GetFormatter() abort
2323
let l:installer =
24-
\ maktaba#path#Join([expand('<sfile>:p:h:h'), 'bin', 'julia', 'install'])
24+
\ maktaba#path#Join([s:plugin.location, 'bin', 'julia', 'install'])
2525
let l:formatter = {
2626
\ 'name': 'JuliaFormatter', 'setup_instructions': 'Run ' . l:installer}
2727

@@ -59,7 +59,8 @@ function! codefmt#juliaformatter#GetFormatter() abort
5959
endfor
6060
let l:exec = s:plugin.Flag('julia_format_executable')
6161
if empty(l:exec)
62-
let l:cmd = [expand('<sfile>:h:h/bin/formatjulia.jl')]
62+
let l:cmd = [maktaba#path#Join(
63+
\ [s:plugin.location, 'bin', 'julia', 'formatjulia.jl'])]
6364
else
6465
" Split the command on spaces, unless preceeded by a backslash
6566
let l:cmd = split(l:exec, '\\\@<! ')

0 commit comments

Comments
 (0)