When importing partials (e.g "mixins.scss"), it's unnecessary to explicitly include the underscore (`). Sass inherently understands and imports files with or without the underscore. Therefore,@import "mixins.scss"` is a valid way to import the partial.
Why has this change been made?
Navigating to a partial file using Command + Click or Control + Click without specifying the underscore was causing the language server to be unable to find the path.
Changes
Update toPathVariations function to consider partial files when the underscore has been omitted.
Add a new test case to ensure accurate resolution when the underscore is omitted when import partial files.
Context
When importing partials (e.g "mixins.scss"), it's unnecessary to explicitly include the underscore (`
). Sass inherently understands and imports files with or without the underscore. Therefore,
@import "mixins.scss"` is a valid way to import the partial.Why has this change been made?
Navigating to a partial file using
Command + Click
orControl + Click
without specifying the underscore was causing the language server to be unable to find the path.Changes
toPathVariations
function to consider partial files when the underscore has been omitted.Before
After