diff --git a/plugin/tidal.vim b/plugin/tidal.vim index 791615d..7635bbf 100644 --- a/plugin/tidal.vim +++ b/plugin/tidal.vim @@ -8,7 +8,8 @@ let s:parent_path = fnamemodify(expand(""), ":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, ".".';') @@ -16,6 +17,11 @@ function s:FindTidalBoot() 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.