Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This removes
/
and\
from thewordPattern
value in thelanguage-configuration.json
, which fixes #185, allowing path completion to work properly.https://code.visualstudio.com/api/language-extensions/language-configuration-guide#word-pattern
I'm not entirely sure this is the best possible fix, but everything I tested seems to work the way I expected and I can auto-complete paths now. For example, I tried creating a variable with a slash in the name, but it still doesn't treat that as a valid variable name.
Two thoughts according to my limited understanding of how this works:
wordPattern
comes straight from the official example. My best guess is that a typical language server doesn't implement path completion, so usually you wouldn't want directory separators included in your word pattern. Nushell's language server does appear to do path completion, though, so it seems to make sense to allow those characters when trying to auto-complete.wordPattern
defined, so maybe this field isn't even needed most of the time?