starlark-lsp
starlark-lsp copied to clipboard
Hover support for custom symbols (variables, constants, functions)
Hover Support for custom symbols would be great, e.g. in the following snippet I would like to hover main and say_hello and get the docstring and function definution, like for builtin symbols.
"""
say something
"""
def say_hello(what):
print("hello", what)
"""
main func
"""
def main():
say_hello("name")
main()
I think this works already -- in Python, and consequently, Starlark, the docstrings go after the declared thing. Try again with
def say_hello(what):
"""
say something
"""
print("hello", what)
def main():
"""
main func
"""
say_hello("name")
@nicksieger you're right concerning the docstring. Obviously I'm too much in Go and Typescript :-). So the only improvement here were if the symbol definition could also be provided in the hover.