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
Bash function calls with lots of arguments are hard to parse
somefunction()
{
local -r foo=$1local -r bar=$2local -r foo2=$3local -r bar2=$4# Do something useful
}
somefunction one two three four
What is the feature you are proposing to solve the problem?
Inlay Hints try to solve this problem by displaying a "virtual text" with the argument name. Here is a lua example:
With inlay hints it could be displayed in the IDE like this:
somefunction foo: one bar: two foo2: three bar2: four
This is obviously a little tougher with bash, as there is no strict function argument definition that could be parsed. Possible solutions would be parsing (and possibly establishing) a docstring format that explains the arguments, or reacting to the pattern where the first lines of the function are renaming $1 and so on.
What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered:
What is the problem this feature will solve?
Bash function calls with lots of arguments are hard to parse
What is the feature you are proposing to solve the problem?
Inlay Hints try to solve this problem by displaying a "virtual text" with the argument name. Here is a lua example:
With inlay hints it could be displayed in the IDE like this:
This is obviously a little tougher with bash, as there is no strict function argument definition that could be parsed. Possible solutions would be parsing (and possibly establishing) a docstring format that explains the arguments, or reacting to the pattern where the first lines of the function are renaming
$1
and so on.What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: