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

Add actions to control the build tool throug hls #113

Open
juergenpf opened this issue May 16, 2020 · 7 comments
Open

Add actions to control the build tool throug hls #113

juergenpf opened this issue May 16, 2020 · 7 comments

Comments

@juergenpf
Copy link

I'm especially looking at the Visual Studio Code extension ghcide and comparing it to the intero based "older" Haskelly extension.

What I like with the Haskelly extension is its appeal for casual Haskell users or beginners. Haskelly has some smart detection of the project type, and then places proper action buttons in the status bar area that's reserved for that use, like you see in this screenshot

Haskelly

The casual user or beginner often looks for that kind of experience: having a visual editor and simple buttons to build, test and run.

Would be great if you can "borrow" that logic from https://github.com/haskelly-dev/Haskelly

@jneira jneira added the type: enhancement New feature or request label May 17, 2020
@poscat0x04
Copy link

I think this is out of the scope of this project (which is supposed to provide LSP support and some static analysis for Haskell).

@ndmitchell
Copy link
Collaborator

To me this is in scope. Although we'd probably want hie-bios to say what should be available, or what build/test/run look like. Having a one-click button to profile and view the results in a graphical profile viewer would be amazing.

@alanz
Copy link
Collaborator

alanz commented Jun 8, 2020

To me the server should be agnostic to the client, so these sorts of things should be provided via the standard protocol, in the first instance.

One way is to use a code lens, or code action.

Either of these would tie back to an execute command call, so if someone wanted to extend the client side to send the execute command based on some other UI affordance, they could do this, but as an extra enhancement, rather than being the only way to access it.

@jneira
Copy link
Member

jneira commented Jun 9, 2020

It seems that this could be a good application of the build-server-protocol. It aims to be a abstraction layer over build tools that can expose compile/run/test/repl actions to editors (see #9)

@alanz
Copy link
Collaborator

alanz commented Jun 9, 2020

There is a thread about BSP in vscode, and the consensus seems to be that it is better as a backend to a LSP server, where we are using hie-bios instead.

See build-server-protocol/build-server-protocol#120 (comment)

@ndmitchell
Copy link
Collaborator

I guess I'd see haskell-language-server as predominantly a LSP backend plus plugins, but where features weren't available to be wired through LSP, having them custom for just a few plugins doesn't seem unreasonable. I think adding custom commands for build/test/run, and not necessarily having them wired through as code-lens (unless we can find a good place to put it) would still be valuable.

But it's quite possibly a different philosophy. Are we best IDE for N specific editors (my view), or best LSP for all editors.

@alanz
Copy link
Collaborator

alanz commented Jun 9, 2020

But it's quite possibly a different philosophy. Are we best IDE for N specific editors (my view), or best LSP for all editors.

I think its possible to be both. If we follow the execute command approach for doing the actual work, then those can be implemented as custom commands in the client side.

But it leaves open the possibility of exposing them via code actions / code lenses too. If necessary turned off for VS Code, if they are directly provided via the plugin.

I am just worried about us starting on the path to being back in the bad old days of before LSP

@jneira jneira changed the title Feature Request for Editor extensions Add actions to control the build tool throug hls Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants