-
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
base: master
Are you sure you want to change the base?
Conversation
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.
I just skimmed over it. I have no idea what's going on. What did you do to the code? 😭 Can we at least make a prerelease/alpha for this before hitting users with a brick? |
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.