From 75bbc8c44b88499d826786cfece3c1e3a5b102b6 Mon Sep 17 00:00:00 2001 From: Jules Herrmann Date: Wed, 22 Oct 2025 19:23:28 +0200 Subject: [PATCH] Load tidal boot script from tidal hackage In commit 46e40f2, `bin/tidal` was changed to use the boot script from tidal Haskell package. We can do the same in the vim plugin. To not break the setup of people who use local boot scripts, we only look for the Haskell package boot script if no local boot script was found. --- plugin/tidal.vim | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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.