-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Missing Code actions and code lenses (Haskell) #3005
Comments
Can you check again now that #3012 is merged? |
I have to build helix locally right? Or is there any other place I can get the new commits? |
Yeah you would have to checkout master and build locally. We don't have nightly releases yet. |
After building it, #3012 doesn't seem to have solved the issue. The problem persists: Untitled.mov |
take pull #3096, I checked in typescript that it works ok。 |
I have this same issue. Testing with |
I've managed to track down the issue, PR #3898 is my very quick pass at resolving the issue |
It seems PR #3898 has solved most of the issues. Nevertheless, some actions (at least adding type signatures, #3005 (comment)) aren't yet available in helix... |
Even after helix 23 I still have this problem, this is solved problem or not? |
@Esnos33 what do you mean you still have this problem but you ask if it is solved or it isn't? I'm pretty sure this is solved, but I had forgot about this issue. Will test later though. |
I mean it doesn't work for me, when I select a function and press space + a, then only meaningless actions shows up. |
@Esnos33 maybe it has to do with what helix version are you using? because, at least for the type signature, it works on helix 23.03 (4cdba7c). type-signature.movIn the case of other code actions maybe not working correctly ("outdated workspace edit ..."), check this issues: #6543 & haskell/haskell-language-server#3547 (comment) |
@0rphee For starters, thanks for response. EDIT: Uninstalled whole helix and installed it again from source, still having same issue. Other features, like code completion and going to definition still works, hx --health haskell still gives me same message. helix.mov |
@Esnos33 hmm that's unfortunate.... What do you mean you installed it again from source? did you uninstall and install it again with the package manager? have you tried building helix from source yourself? also, this maaaaaybe has to do with the version of hls and ghc you are using (i doubt it though), could you check their versions? if possible, i will try to reproduce the problem on my machine |
@Esnos33 I think I know what's happening. It seems that hls doesn't give as many code actions when it doesn't find a specific project's configuration file (package.yaml or *.cabal). I just tested it, and when I edit a standalone .hs file, it isn't possible to add type signatures, but when I edit a file inside a stack project this problem doesn't appear. hs.movI think you should file a separate issue in the hls repo, as it seems that this is an issue with the language server, not helix itself. |
@0rphee I just checked and you are right, it works for me on stack! I will later write issue in hls git, thanks for help, helix is best. |
I will close this, as the main issue has been resolved, code lenses are not being added into core #7957 (comment), and the issue with hls not working showing more code actions/diagnostics on files outside of a project seems to be an issue with hls itself |
Summary
Many code actions, and code lenses are not available compared to other text editors.
In this gist two functions with multiple code actions available in Kakoune and VS Code can't be done in Helix.
This issue might refer to the same problem as #2994
In the videos below I show the behavior in helix compared to 1. Kakoune, 2. VS Code.
HLS Code actions (apply hlint fixes)
Helix (left) - Kakoune (right)
code-actions.mov
HLS Code lens (add type signature)
Helix (left) - Kakoune (right)
code-lenses.mov
HLS Code lens and Code actions in VS Code
vscode.mov
Reproduction Steps
<space> + a
. Only some actions will be available but not all. Try with each token there.Helix log
~/.cache/helix/helix.log
Platform
macOS
Terminal Emulator
iTerm2 Build 3.4.16
Helix Version
helix 22.05 (27609f5)
The text was updated successfully, but these errors were encountered: