-
Notifications
You must be signed in to change notification settings - Fork 45
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
Filtering textDocument/hover results #147
Comments
@JulienPalard hmm, it should be possible to support this. That said, we should discuss the design before I implement. Probably the simplest way I can think to support this would be to force the hover LSP method to return
The user could pass, as an InitializationOption, a mapping of name types and values that they might want to return no responses for hover. For example, one example user configuration could look like this: {
"initializationOptions": {
"hover": {
"ignoreType": {
"keyword": ["class"],
"statement": true
}
}
}
} In this, all "statements" are ignored, and Python keywords with the name "class" are ignored. How does this design sound to you? |
I still never tried to pass initializationOptions, hope it's not too hard using emacs' lsp-mode :D Looks good to me. |
@JulienPalard for reference, see: https://github.com/pappasam/coc-jedi#jedihoverdisable Since you're not using Neovim, your initializationOption will look something like this (not sure how you'd configure that off the top of my head, but hopefully the emacs community has you covered!): {
"initializationOptions": {
"hover": {
"disable": {
"keyword": {
"names": ["class"]
}
}
}
}
} Alternatively, if you want to disable all keyword hovers: {
"initializationOptions": {
"hover": {
"disable": {
"keyword": {
"all": true
}
}
}
}
} Please let me know if you have any questions, and hope you enjoy the new feature! |
Sometimes I find the hover result usefull (on identifiers, for example), sometimes not, and depending on the zoom level it can become a burden. I often use a big font when I teach, for readability, so I often enconter those hovers:
I think it would be nice to be able to configure the verbosity here, and say "OK now I know about classes, don't show this huge tooltip again".
The text was updated successfully, but these errors were encountered: