sublime-text-merlin
sublime-text-merlin copied to clipboard
SublimeText launched from GUI doesn't find ocamlmerlin
As mentioned in the SublimeREPL repo, "On POSIX system SublimeText launched from GUI does not inherit a proper environment. Often leading to problems with finding interpreters or not using the ones affected by changes in ~/.profile / *rc files".
Though this is a Sublime bug, it has the effect that Merlin often doesn't work for people who open their ml files using the Sublime GUI.... the ocamlmerlin binary often can't be found. The SublimeREPL folks have added a workaround to their plugin. It might be nice to do similar here.
Or, it might be worth documenting that users running into trouble when opening files from the GUI should manually set "ocamlmerlin_path" in their Merlin package user settings.
Hi @rebeccacremona, thanks for reporting this issue.
Indeed, manually setting ocamlmerlin_path
fixes this wrong behavior. I currently think that documenting the ocamlmerlin_path
variable is easier than starting to update environment variables provided by ST, but will have a look at the solution from SublimeREPL.
Meanwhile, if you want to provide a solution or update the README file, your contribution is welcome. :smile: