powerquery-language-services icon indicating copy to clipboard operation
powerquery-language-services copied to clipboard

[BUG] Quoted identifiers don't autocomplete as expected while typing

Open JordanBoltonMN opened this issue 1 year ago • 0 comments

Expected behavior I was testing some things in the language services layer. Take for example the following setup:

let
    foo.bar = 1,
    #"unneededQuote" = 2,
    #"quoted identifier" = 3
in
    |
  • With no text it has the following recommendations: foo.bar, unneededQuote, #"uneededQuote", and #"quoted identifier".
  • With foo. for text it has the following recommendations: foo.bar
  • With any subset of a quoted identifier (eg. #, #", #"", etc) it should recommend the quoted identifier.

Actual behavior

  • With no text it has the following recommendations: foo.bar, unneededQuote, #"uneededQuote", and #"quoted identifier".
  • With foo. for text it has the following recommendations: foo.bar
  • With any subset of a quoted identifier (eg. #, #", #"", etc) it does not recommend anything.

To Reproduce See the setup in expected behavior

Additional context The initial hurdle is the lexer will fail to lex if it encounters a trailing #, as it's attempting to read a keyword but fails. Instead I might want to attempt to read a keyword but fallback in starting a quoted identifier. Additionally we might need to tweak the trailing token logic to include quoted identifiers.

JordanBoltonMN avatar Feb 08 '23 19:02 JordanBoltonMN