Skip to content

Commit

Permalink
better technique for plugin-relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
flwyd committed Nov 23, 2023
1 parent dbe3057 commit ae8bd7a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions autoload/codefmt/juliaformatter.vim
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ let s:checkedInstall = 0
" Formatter: JuliaFormatter
function! codefmt#juliaformatter#GetFormatter() abort
let l:installer =
\ maktaba#path#Join([expand('<sfile>:p:h:h'), 'bin', 'julia', 'install'])
\ maktaba#path#Join([s:plugin.location, 'bin', 'julia', 'install'])
let l:formatter = {
\ 'name': 'JuliaFormatter', 'setup_instructions': 'Run ' . l:installer}

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

0 comments on commit ae8bd7a

Please sign in to comment.