Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Keywordprg returns not-found #79

Closed
Dmusulas opened this issue Apr 19, 2024 · 3 comments
Closed

Keywordprg returns not-found #79

Dmusulas opened this issue Apr 19, 2024 · 3 comments

Comments

@Dmusulas
Copy link

Dmusulas commented Apr 19, 2024

I have tried using DevdocsKeywordprg module and have set in my options via vim.opt.keywordprg=":DevdocsKeywordprg". It correctly calls it but it never finds documentation even though I have tested on function such as useState, which entry definitely exists in React docs. Can be verified by opening Devdocs and searching for it. Calling it as a command i.e. DevdocsKeywordprg useState does not return results either.

Furthermore, I am sure LSP is not overwriting it because I get notified by devdocs and my mapping for calling it is:

map("n", "<leader>K", "<cmd>norm! K<cr>", { desc = "Keywordprg" })

Steps to reproduce:

  1. Set keywordprg to ":DevdocsKeywordprg"
  2. Go to any textobject which should have documentation for it
  3. Execute `:DevdocsKeywordprg" on it
  4. ERROR [nvim-devdocs] No documentation found for <textobject>
@luckasRanarison
Copy link
Owner

If you've tried using it in actual code then it's not yet implemented, see #61.
But it should work in the docs preview and you don't have to set the mappings yourself, it will replace K by default.

@Dmusulas
Copy link
Author

Thank you for answer @luckasRanarison I saw the issue #61 but I though the limitation is that LSPHover is overriding it. With different keymap this doesn't seem to be a problem. But I guess issue is somewhere else as well. I am closing the issue.

@luckasRanarison
Copy link
Owner

luckasRanarison commented Apr 20, 2024

The tricky part of that is the re-implementation of the K key functionalities. So using the command by itself won't do something useful.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants