soulis-1256 / eagle.nvim

Show diagnostics and lsp info inside a custom window
Apache License 2.0
245 stars 5 forks source link

How to open the window from just key mapping based on cursor position? #21

Closed searleser97 closed 2 weeks ago

searleser97 commented 3 weeks ago

I think you have done a great job here, just wanted to know how can I open this window based on cursor position ? basically just looking to combine all diagnostics, hover, ... related to particular issue under the cursor, I rarely use the mouse in nvim actually. Would love to just type K to open this window with LSP info + diagnostics

soulis-1256 commented 3 weeks ago

Hi, thank you for your interest. I have made a new branch specific to this request (called keyboard_workflow). It has been brought up in the past as you can see in discussion #12. This is an overview of what needs to be done:

  1. Improve the codebase to enable having a simple option for keybind invocation of eagle.
  2. Once that's done, merge with main and leave the branch open for other keyboard related ideas (which I may or may not implement, it depends).

In the coming days I will start implementing this. You can check the progress in the branch itself. Also, in the meantime, you can give trouble.nvim a try, if you haven't already. It seems it received a rework recently.

searleser97 commented 3 weeks ago

Thanks, looks like trouble does not solve the particular problem that is solved with eagle.nvim, it does some other bunch of stuff that I usually do with just telescope when I want to, without ending up with a super cluttered/overloaded UI, so I prefer not to use trouble.nvim

searleser97 commented 2 weeks ago

Hey @soulis-1256, I was able to achieve the desired behavior with this 82 lines of code https://github.com/searleser97/nvim_lua/blob/97571017d82bf90f1f137bb12dd8a9817dc75b87/lua/plugins.lua#L80-L161

missing to sort by severity and more fancy stuff but works just fine

soulis-1256 commented 2 weeks ago

@searleser97 I reworked the codebase on my local branch. It's almost ready to handle keybinds. It could be ready tomorrow.

soulis-1256 commented 2 weeks ago

@searleser97 I pushed some updates on the keyboard_workflow branch and I think it handles your request. The only thing is I noticed there is room for improvement on how I stylize markdown syntax, so I am going to hold off on the pull request. Anyway, until I figure out markdown, you can use that branch and inform me if you encounter any bugs. This is how to do it:

  1. Go to the plugin's directory.
    cd ~/.local/share/nvim/lazy/eagle.nvim

    If it's not there then you must search for it with the following command (assuming it's somewhere under the home directory):

    find ~ -type d -name "eagle.nvim"
  2. Fetch remote branches.
    git fetch origin
  3. Switch to the keyboard_workflow branch.
    git checkout -b keyboard_workflow origin/keyboard_workflow
  4. Make sure the branch is up to date:
    git pull
searleser97 commented 2 weeks ago

Thanks, I see the branch changes and one thing I can suggest is, enabling keyboard support should not disable the mouse feature you already have, a user should be able to have both features working at the same time if desired.

On my side, I may not use the plugin anymore since I already minimally implemented what I needed in my config, but appreciate the work you have done with this good plugin

soulis-1256 commented 2 weeks ago

That's probably a good idea. I am going to add a new option to disable mouse mode instead of auto disabling it. Thank you for your interest. I am going to leave this issue open until I sync the two branches.