nushell / vscode-nushell-lang

A Nushell grammar for Visual Studio Code with IDE support
https://www.nushell.sh/
MIT License
122 stars 27 forks source link

Completion on const variable #171

Closed suimong closed 9 months ago

suimong commented 9 months ago

Since const variables are evaluated at parse time, it should be possible to add completion support for those variables (showing fields on hover / typing). Ideally the completion should work even when such const variable is "used" in other nu files.

This is particularly useful when such variables are defined with some static but nested data that are intended to be used in other places of a nu file.

fdncred commented 9 months ago

this extension doesn't generate the completions, just shows them. for completion generation you'd need to look at modifying nushell's --ide parameters or the nu-lsp crate, which isn't integrated yet.

suimong commented 9 months ago

Thanks for the info @fdncred. Moving this to the nushell repo.