-
Notifications
You must be signed in to change notification settings - Fork 90
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 applyrefact:applyAll command as hie.commands.applyall #168
Conversation
3de6510
to
0e9921f
Compare
@expipiplus1 can you rebase this against master, I think the tests may now be passing. Then we can see about merging and another release. |
done, thanks! |
0e9921f
to
cbf466c
Compare
@expipiplus1 Please resolve the conflict, sorry. |
@alanz, done, thanks |
8d1891d
to
5bda4f8
Compare
@expipiplus1 Sorry to do this to you, but it struck me that it might be more universal to add this as a command exposed by |
@alanz, sorry I think I'm missing something; isn't that already the case, and this change is just making the |
5bda4f8
to
1ef4d56
Compare
@expipiplus1 I think we can do this in a way that does not need specific code in the client to be able to use the feature. This is a desirable way of doing things, because then it will work across more different clients. |
Ah I see, I'm happy either way |
Hi, as i am translating the hlint plugin from hie to hls i would like to revisit this one. I think expose |
I think this should be closed, it's pretty out of date now. @jneira will |
@expipiplus1 yeah, it is being ported from hie and it will use apply.refact in the same way. |
1ef4d56
to
f888819
Compare
@expipiplus1 These commands are for the hlint code actions right? As long as the language server (HLS) is handling them then the vscode extension shouldn't need to register for them from what I understand |
@bubba That's what I would have assumed too, however @chemzqm (of coc.nvim) suggested writing an extension before when I had a similar query: neoclide/coc.nvim#1277 (comment) |
Hmm the specification doesn't really say much about |
The command to applyAll doesn't appear without this PR. The hints aren't applying either way at the moment, but that's a separate issue ;) |
Something to bear in mind. VsCode manages a single registry of commands available to execute. If you open more than one haskell project in vscode, it runs more than one LSP server. The commands they register go into a single table. To avoid ambiguity, when the haskell language server registers a command, it prefixes it with the process number. So statically registering a command in the extension won't work. And I once more note that I think this is the wrong thing to do. |
Alanz, agree entirely that if this is possible without logic on the extension then that's clearly the way to go. I just have no idea how to do that. This does however seem to work for me (in coc.nvim and vscode), at least for my simple 1 client 1 server setup. Perhaps it would be possible to merge (or merge if someone could help with the process number thing) and at a later date remove it when the server advertises the command properly. |
The hlint plugin is already offering an |
Yeah, happy to close this. Thanks for the thoughtful feedback all. |
I've never used typescript before today!