Skip to content

Commit

Permalink
Merge pull request #32 from wader/completion-show-args
Browse files Browse the repository at this point in the history
Show args not arity when completing
  • Loading branch information
wader authored Nov 19, 2024
2 parents cd4787c + 2673fb9 commit 82ae8be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lsp/lsp.jq
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,8 @@ def handle($state):
| select(.str | startswith($prefix))
| . as $func
| if .args and (.args | length) > 0 then
{ label: "\(.str)/\(.args | length)",
insertText: "\(.str)($1)",
{ label: env_func_signature,
insertText: "\(.str)($0)",
insertTextFormat: TextFormatSnippet,
}
else
Expand Down
4 changes: 2 additions & 2 deletions lsp/testdata/completion_def.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@
"kind": "markdown",
"value": "```jq\ndef fromstream(f):\n```\nOutputs values corresponding to the stream expression's\noutputs."
},
"insertText": "fromstream($1)",
"insertText": "fromstream($0)",
"insertTextFormat": 2,
"kind": 3,
"label": "fromstream/1"
"label": "fromstream(f)"
}
]
}
Expand Down

0 comments on commit 82ae8be

Please sign in to comment.