tweag / nickel

Better configuration for less
https://nickel-lang.org/
MIT License
2.23k stars 85 forks source link

Context-sensitive completion in match cases #1925

Closed thufschmitt closed 1 month ago

thufschmitt commented 1 month ago

Is your feature request related to a problem? Please describe.

Within the branch of a match case, the Lsp isn't aware of the new variables brought in scope by the match, so doesn't offer to complete them.

For instance,

match {
  'Foo bar => [CURSOR]
} baz

won't trigger a completion for bar.

Describe the solution you'd like

Have the LSP take into account the match branch it's in

Additional context

Observed in Nickel 1.5.0