Skip to content

Commit

Permalink
Add $ as a trigger character
Browse files Browse the repository at this point in the history
This makes string interpolation completions much more discoverable and I
haven't yet found any bad outcome for this.

At least in VS code

  * With default settings, `s"Hello $|"` with cursor at `|` triggers a
    completion

  * With (non-default) `"editor.quickSuggestions.strings": true`,
    `"Hello $|"` with cursor at `|` triggers a completion (and thanks to
    the interpolation logic, that completion will add in the `s` string
    interpolation context)
  • Loading branch information
harpocrates authored and tgodzik committed Jan 14, 2025
1 parent 262a892 commit 8377cbe
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ class WorkspaceLspService(
capabilities.setCompletionProvider(
new lsp4j.CompletionOptions(
clientConfig.isCompletionItemResolve(),
List(".", "*").asJava,
List(".", "*", "$").asJava,
)
)
capabilities.setCallHierarchyProvider(true)
Expand Down

0 comments on commit 8377cbe

Please sign in to comment.