-
Notifications
You must be signed in to change notification settings - Fork 90
Introduce the StatusBarItem
#1237
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
Open
fendor
wants to merge
13
commits into
haskell:master
Choose a base branch
from
fendor:enhance/refactor
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
Includes the arguments passed to the server, the logging configuration, working directory, anything that is supposed to stay constant during the execution of a single HLS instance. Note, it is not promised to stay constant over restarts.
I don't know how to review this huge patch, the best way is probably to check it out and trying to understand how the extension is now structured. The commits themselves are somewhat self containing, at least I tried to make sure they are. Happy for any feedback, otherwise I will just merge it in a couple of weeks and deal with any fallout. |
This 'StatusBarItem' improves the discoverability of the most important interactions between the user and the extension. This includes debug information, such as the version of the extension, showing the output panel to find the logs more easily, but also to restart all running Haskell Language Server binaries and the extension itself.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The primary motivation for this PR is to make the vscode-haskell extension much friendlier for newcomers.
My idea to improve this is a
StatusBarItem
that looks like this:The
StatusBarItem
offers the following actions:serverExecutablePath
is not picked up byRestart HLS
)My goal would be for the future to extend the features presented here, for example:
red
and display options to help the user understand what went wrong. For example, it could offer to re-display the error message, or some kind of "debug this error" functionality.That's the main motivation.
Initially, I felt it was tricky to do the kinds of changes I wanted to implement, so I went on a complete tangent and started refactoring the extension to avoid side effects, ad-hoc logic, non-uniform accesses to configuration and similar.
Thus, large parts of this PR are about improving the extension to make it easier to maintain and extend. The main refactorings are:
ghcup
process management into dedicated classI am still unhappy with the code path for finding HLS binaries using GHCup. This is rather complicated logic, for which I couldn't extract or find a pattern, yet.
Even without it, I think I am overall improving the readability of most of the extension.