Open parsonsmatt opened 7 years ago
I don't use a STACK_YAML env var (echo $STACK_YAML
doesn't print anything and I haven't set it myself), I assume stack just defaults to the global yaml file when run as a bare file.
That use case is working for me, oddly enough.
I'm not getting this issue on my other system using the exact same init.vim, editing same file on same operating system with same neovim version so I'm not getting any wiser. The systems are configured to be as identical as possible.
The weird thing about this is that we switched to using a tempfile instead of .stack-work
specifically because of Stack scripts. Looking at the output of tempname()
on the affected system could be interesting - I suspect the /tmp/nvimWuC10t
directory doesn't exist.
My previous analysis of this issue was incorrect.
The error happens when the line
#!/usr/bin/env stack
is either added then :wq
or removed then :wq
.
In either case you won't get it the second time the file is opened then :wq
(without editing anything) because in case 1 (line is present) intero won't start the second time around and in case 2 (line not present) intero seem to work correctly on bare files as @rdnetto mentioned.
When replicating these steps I also get this error on my other system.
It's for that reason that I think this issue is not Intero related. A while ago, I added this line to my vimrc:
au! BufRead,BufEnter *.hs setlocal filetype=haskell
This is more of a problem in the ftdetect files for haskell/conf than a problem with Intero. Maybe we should submit a bug report or a patch upstream, but I'm content merely adding this line to my vimrc. On Sat, Jul 22, 2017 at 11:23 AM tsoernes notifications@github.com wrote:
My previous analysis of this issue was incorrect.
The error happens when the line
!/usr/bin/env stack
is either added then file saved or removed then file saved. In either case you won't get it the second time the file is opened then saved (without editing anything) because in case 1 (line added) intero won't start the second time around.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/parsonsmatt/intero-neovim/issues/71#issuecomment-317194136, or mute the thread https://github.com/notifications/unsubscribe-auth/AFSaVD87F98EVTVDrghPE2kG_Ni9yu77ks5sQiIFgaJpZM4Of0kT .
Copied from #67 (thanks @tsoernes!):
When using
STACK_YAML
environment variable to specify astack.yaml
file, the neomake integration fails with following message: