Skip to content
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

'No Documentation found' popup is shown(instead of the docs) when Ctrl + Q is pressed for well-known functions #3636

Open
SergeyMosin opened this issue Aug 17, 2024 · 3 comments

Comments

@SergeyMosin
Copy link

Describe the bug
No Documentation found. popup is shown(instead of the docs) when Ctrl + Q is pressed while a function such as IO.inspect("foo") is under the caret.

To Reproduce
Steps to reproduce the behavior:

  1. Create a project
  2. Insert/type IO.inspect("foo") where it is allowed
  3. Place cursor/caret inside the inspect function name
  4. Press Ctrl + Q
  5. No Documentation found. popup is shown

Expected behavior
When Ctrl + Q is pressed while cursor/caret is place inside a function name, documentation for that function should be shown.

Screenshots
Ctrl + Q when inside inspect
image

Ctrl + Left Click
image

Ctrl + Q when inside IO (works as expected)
image

Logs
N/A

Desktop:

IntelliJ IDEA 2024.2.0.1 (Community Edition)
Build #IC-242.20224.387, built on August 13, 2024
Runtime version: 21.0.3+13-b509.4 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.X11.XToolkit
Linux 6.8.0-40-generic
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 3968M
Cores: 8
Registry:
  ide.experimental.ui=true
Non-Bundled Plugins:
  com.intellij.plugins.watcher (242.20224.155)
  org.elixir_lang (19.0.0)
Kotlin: 242.20224.387-IJ
Current Desktop: ubuntu:GNOME

Erlang:

  • Installer: ASDF
  • Version: Erlang/OTP 26 [erts-14.2.5] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [jit:ns]

Elixir:

  • Installer: ASDF
  • Version: Elixir 1.15.7 (compiled with Erlang/OTP 26)

Plugin:

  • Version 19.0.0

Additional context
I have not used this plugin prior to v19.0.0 (IntelliJ IDEA 2024.2.0.1) , so I don't know if it worked in previous versions or if this is specific to v19.0.0 / IDEA 2024.2.0.1

@joshuataylor
Copy link
Collaborator

Reader mode works, so it must be parsing somehow.

Thanks for the report, it's definitely a very useful feature so let's get it sorted.

@joshuataylor
Copy link
Collaborator

I believe this might be due to having multiple definitions for functions, and it isn't sure which it should use.

Perhaps we could have a way of determining if there are multiple definitions, and if there is only one docblock, show that? Or we could have a "known good" list for inbuilt, as we don't want to show the wrong docs as well.

Eg Enum.sort can display the docs, when within the module:
SCR-20240820-udwq

And it works for within the same module:
SCR-20240820-uejw

But Enum.map autocomplete DOES work:

SCR-20240820-ufzd SCR-20240820-ufmj

Just not when multiple definitions.
SCR-20240820-ugex

I'll dig into it, would be great to get this solved.

@SergeyMosin
Copy link
Author

I see now. I did not realize that I can get the docs by pressing Ctrl + Q while inside the drop-down, like the Enum.map example above. This is perfectly fine for me. Thank you for the great plugin.

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

No branches or pull requests

2 participants