You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When working with functions or classes that require callback functions, I rarely use all the possible arguments that a callback function may provide, which makes for really annoying pyright exceptions about unused varibables. A solution that I use in cases where the I do not need only one argument is putting _ as the name of the unused variable, which is not possible to be done for multiple variables.
Describe the solution you'd like
I suggest similarly to pylint to either support multiple underscore notations or underscore + number notations like so:
Pyright never generates diagnostics for unused function parameters. It only generates hints with a tag that tells an editor to display the text in a greyed-out manner. Neovim has chosen to request this hint from a language server but then display it as a normal diagnostic. I've tried to get the neovim maintainers to change the behavior, but they are not convinced. See this issue for details.
I recommend that you configure neovim not to display any "hints". Hints with the "Unnecessary code" tag are not intended to be displayed as diagnostics, and other editors (like VS Code) do not display them as such.
Is your feature request related to a problem? Please describe.
When working with functions or classes that require callback functions, I rarely use all the possible arguments that a callback function may provide, which makes for really annoying pyright exceptions about unused varibables. A solution that I use in cases where the I do not need only one argument is putting
_
as the name of the unused variable, which is not possible to be done for multiple variables.Describe the solution you'd like
I suggest similarly to
pylint
to either support multiple underscore notations or underscore + number notations like so:Tested on
nvim 0.9
The text was updated successfully, but these errors were encountered: