-
I love HLS of course and naturally it's a huge boon to have it. However, for whatever reason, I find that I very regularly have to restart VSCode to have HLS rescan my project because after a while it seems to lose synchronization or otherwise be unable to operate in some modules. I'm not exactly sure what kinds of changes are responsible, but of course I'm doing all the usual things - occasional additions to my hpack package.yaml dependencies, making new modules, moving files, renaming things etc. Transient 'brokenness' of course something that an IDE has to cope with - a project under edit will be 'broken' most of the time. HLS seems o cope with local brokenness, but it looks like there are some kinds of states from which it never recovers until restarted. I probably should start trying to pay attention to what sort of operations cause HLS to break or partially break in my project and that might be a useful report. In the meantime however, I'm simply wondering whether there's a simple operation (perhaps bindable to a key) that would just cause HLS to rescan everything, much as it does when it starts up. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This misbehavior is most likely caused by the lack of support for multiple home units (which is going to land soon hopefully, but will probably require switching to latest version of cabal). In the meantime there are two commands in vscode can do what you describe.
|
Beta Was this translation helpful? Give feedback.
This misbehavior is most likely caused by the lack of support for multiple home units (which is going to land soon hopefully, but will probably require switching to latest version of cabal).
HLS can start misbehaving if you work across multiple components of a cabal project (e.g. editing both library / executable / test suite etc).
In the meantime there are two commands in vscode can do what you describe.
You can find them in the command menu (after pressing ctrl+shift+P)