Skip to content

Add signature help provider #117

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MaartenStaa
Copy link
Contributor

Builds on top of #116
Fixes #87

Adds a signature help provider, which can show the signature of the function being called while typing the function call.

Example in starlark_syntax/testcases/parse/aspect.star:
Screenshot 2024-03-15 at 14 37 49

Also includes the parameter and function documentation, if present:
Screenshot 2024-03-15 at 14 39 11

This allows requesting a list/tree of symbols in the current document.
The following items are currently exposed:

- `load` statements:
    - The module path
    - The loaded symbol names
- `def` statements:
    - The function node
    - Argument names
- Closures, when assigned to a named variable
- Structs (calls to `struct`), when assigned to a named variable
- Build system targets (function calls containing a `name` argument)
Allow passing in an `--eager` flag to the LSP to make it eagerly load
all relevant files in the workspace. When this flag is provided, files
are not removed from the `last_valid_parse` cache when they are closed.

In addition, this flag enables the LSP to provide workspace symbol
information.
…}` and `starlark_lsp::symbol::{Symbol, SymbolKind}`
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 15, 2024
@MaartenStaa MaartenStaa force-pushed the signature-help-provider branch from 3b644ce to 401e180 Compare March 15, 2024 14:05
@alexlian alexlian added the lsp label Mar 25, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. lsp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lsp doesn't support parameter hints
3 participants