Provide code action in hls-eval-plugin#4556
Conversation
There was a problem hiding this comment.
Eval code action works. However, this PR is not complete. As I said below, I need to fix tests and maybe do some refactoring. Since I am still new to HLS (this is my 3rd PR), I think it is better to request some review before doing the rest of the work. cc @fendor @michaelpj
|
Hi, thanks for the PR! Personally, I am not in favour of changing the long-standing behaviour of HLS for no real motivation. I quite like the The given issue argues that it should also be possible to use a tl;dr I don't think we should replace the |
|
Also, PR itself looks good :) |
ba290b0 to
14707ca
Compare
There was a problem hiding this comment.
Thanks for your review @fendor! Now code action and lens are provided at the same time. I also add some code action tests which are a bit tricky because getAllCodeActions cannot get any code action. PTAL.
Compared with code lens, inlay hint indeed has more functionalities. Some clients such as eglot do not support code lens but do support inlay hint. So providing inlay hint will improve discoverability for some users.
Maybe I will add inlay hint support in a future PR but it is not ranked high in my HLS TODO list because I have already "discovered" this plugin 😄.
14707ca to
7144e2f
Compare
22a9339 to
0c54684
Compare
Code action and lens are provided at the same time. In addition, a file is excluded from stylish-haskell pre-commit hook due to a CPP issue introduced in haskell#4527. Fix: haskell#496
0c54684 to
c6d66a4
Compare
I believe this is a useful feature for users whose LSP client does not support code lens and users who want to trigger eval plugin with a key binding. Hope it can be merged soon. |
Code action and lens are provided at the same time.
In addition, a file is excluded from stylish-haskell pre-commit hook due to a CPP issue introduced in #4527.
Fix: #496