Feature Request: Docs for word under cursor #26
Comments
@bmulholland this is a great idea. I think what makes the most sense is just to pre-populate the word under the cursor into the Telescope picker. It might be possible to get a sort of "fully qualified name" using Treesitter or LSP, but I'd have to do some research on how to use both of those APIs. As a sort of "minimum viable product", I might start with just pre-filling the word into the prompt so you can tweak from there. Does that sound alright? |
Possibly related: #25 |
Not sure if this is possible but would the filetype help with narrowing down the different search options ? For example - if in typescript file, if I trigger dash.nvim on a word it should trigger a query like this: |
@hsheikhali1 yeah I think that would sorta "come for free" with the current implementation of keyword searching |
Yeah the MVP of current word would work well (alliteration!) :). And that will bring it closer to feature parity with dash.vim. |
@bmulholland I've pushed a basic change adding a |
DashWord is working well :) |
@bmulholland I split off a new issue from this one, #38, so I can close this issue. |
I'm coming from dash.vim, which has a feature to search for the word under the cursor. (Optionally?) Having the telescope window auto-populate with that word would be helpful.
However, I found that this didn't always work as well as one would like, because the method searched could sometimes belong to quite a few different types of classes. For example,
open
in Ruby, which in Dash gives results for 36 objects. So my dream feature would be to use the LSP and/or Treesitter to lookup the docs for the method on the correct object type. In other words,var_that_is_a_tempfile.[o]pen
(with the cursor on the o) would open the docs for specifically Tempfile.open.The text was updated successfully, but these errors were encountered: