Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion plugin/tidal.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,20 @@ let s:parent_path = fnamemodify(expand("<sfile>"), ":p:h:s?/plugin??")
" Default config
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" Attempts to find a tidal boot file in this or any parent directory.
" Attempts to find a tidal boot file in this, any parent directory or from the
" tidal package.
function s:FindTidalBoot()
for name in ["BootTidal.hs", "Tidal.ghci", "boot.tidal"]
let tidal_boot_file = findfile(name, ".".';')
if !empty(tidal_boot_file)
return tidal_boot_file
endif
endfor
let tidal_data_dir = substitute(substitute(system("ghci -e Paths_tidal.getDataDir"),'"','',"g"),"\n","","g")
let tidal_boot_file = findfile("BootTidal.hs",tidal_data_dir)
if !empty(tidal_boot_file)
return tidal_boot_file
endif
endfunction

" Attempts to find a supercollider startup file in this or any parent dir.
Expand Down