You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open Haskell project and check that there's only one HLS instance:
Create a new standalone file (Ctrl+N) and paste some Haskell code from your project. Check that the number of haskell* processes is the same (i.e. extension haven't spawned any additional processes for this standalone file)
@KolesnichenkoDS hi, thanks for the pr, what would be the behaviour if you open directly a haskell file that does not belong to any project (with code MyStandloneModule.hs f. e.)?
I see how that may be a problem since you'll be forced to open the folder instead of simply opening the file.
Maybe could work around that by checking (in activateServerForFolder) if there is any opened folder, if so — then ignore files that don't belong to the folder, otherwise spawn HLS as usual.
Also, the option can be enabled per project, in that case if you do code Foo.hs then the option would not be enabled and HLS would spawn.
The thing is, right now spawning HLS for standalone files while working on project often causes problems if you often open scratch files with some snippets (for example I do that for snippets to paste into repl after :r). Would be probably better to fix those problems (like HLS instance remaining after standalone file is closed, or duplicated of hints on project files when 2+ instances are spawned) but even then I personally would prefer to have this option since I really don't need it's functionality on scratch files and that allows to reduce memory consumption by limiting HLS to only one instance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses issue #300
How to test:
Set "Haskell: Ignore Standalone" option to
trueOpen Haskell project and check that there's only one HLS instance:
Create a new standalone file (
Ctrl+N) and paste some Haskell code from your project. Check that the number ofhaskell*processes is the same (i.e. extension haven't spawned any additional processes for this standalone file)