Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quickfix location can't be set to arbitrary directory #367

Open
xave opened this issue Oct 31, 2022 · 4 comments
Open

quickfix location can't be set to arbitrary directory #367

xave opened this issue Oct 31, 2022 · 4 comments

Comments

@xave
Copy link

xave commented Oct 31, 2022

In a production codebase, it can be the case that one is working in multiple directories. Changes in a file in one directory could cause errors in many others across the codebase. At the moment, the quickfix file via the -o quickfix option can only be written to the directory in which ghcid is run.

It would be ideal to be able to place this file anywhere, such as ~/.quickfix. Then vim can always catch the quickfix file no matter where you were when you generated it or when you opened vim by simply configuring the vimrc with the custom location.

@ndmitchell
Copy link
Owner

If you write -o ~/.quickfix what happens? I don't foresee any reason for it not writing it whereever you ask? (but I haven't looked at this code in a while)

@xave
Copy link
Author

xave commented Nov 6, 2022

No file is written if you prepend a dot to it or if you provide a path to it.

This works:

quickfix
foobar

This does not work:

.quickfix
~/.quickfix
/any/other/path/quickfix

@ndmitchell
Copy link
Owner

All I do is call writeFile on it - https://github.com/ndmitchell/ghcid/blob/master/src/Ghcid.hs#L383-L387 - I have no idea why that wouldn't work. I guess this is a Linux machine? I only have a Windows to test on right now, but it seems to work fine there.

@xave
Copy link
Author

xave commented Nov 7, 2022

I guess this is a Linux machine?

Yes. I am on macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants