Releases: wkillerud/some-sass
2.6.2
What's Changed
- fix: avoid call stack overflow if the current file links to itself
- fix: code completion in string interpolations with preceding non-space characters (
--negative-font-size: -#{ns.$font-size-1}
) - fix: code completion in
@return
statements with expressions (@return $var * math.$pi
) - fix: code completion on the right side of a multiplication
- fix: include any parameter SassDoc in function/mixin signature helper popup
Full Changelog: 2.6.1...2.6.2
2.6.1
What's Changed
- fix: root imports for scoped npm packages by @wkillerud in #17, reported by @GrimLink in #16
Full Changelog: 2.6.0...2.6.1
Web Extension
What's Changed
- feat: web extension support
- fix: display bug for SassDoc
@see
Web Extension
Big changes under the hood made it possible to have Some Sass run as a web extension. In short, you can now use Some Sass on vscode.dev, github.dev, or anywhere else you might find Visual Studio Code in the browser.
Here we can see a familiar SassDoc preview while browsing through code over at github.dev/fylgja/fylgja.
web_extension.mp4
What's shipping
Almost everything should work as you expect from the desktop version:
- Full support for
@use
and@forward
. - Smart module-based code completion.
- SassDoc previews and authoring tools (generate SassDoc blocks, annotation completions and hover info).
- Go to Definition.
- Documentation and completions for Sass built-in modules.
- And probably more that I'm forgetting.
One known limitation is that since node_modules
is not available in the browser, these features will only work on code in the project.
How to get it
Depending on your setup (whether you are logged in with Setting Sync or not), you may need to go to the Extension Marketplace and install Some Sass manually. Once installed, you may need to:
- Close and reopen an SCSS-file (or a Vue, Svelte, or Astro file)
- Reload the browser window
Depending on the workspace size as well, Some Sass may need a few seconds to initialize.
Other changes
This release doesn't have that much new for users of the regular desktop version.
If you use the @see
annotation in SassDoc, this release fixes a bug where it would show as [object Object]
on hover. (21b359a)
Full Changelog: 2.5.0...2.6.0
2.5.0 - Astro
What's Changed
Here's a quick summary of the changes in this version:
- feat: add support for SCSS in Astro
- feat: suggest choices for parameters documented with SassDoc where the parameter type is a TypeScript-like string literal union type
- fix: code suggestions no longer include optional parameters by default
- fix: code suggestions now work inside
#{interpolation}
when using namespaces - fix: code suggestions inside Vue and Svelte (and now Astro) no longer add a duplicate
$
for variables, or.
when using namespaces - docs: add tip about configuring Emmet when using Vue, Svelte or Astro
Add support for Astro
Now you can get all the niceties of Some Sass when you write your styles in Astro.
Along with support for this somewhat familiar component syntax, this version ships bugfixes for some pretty annoying details in code completion when inside a Vue or Svelte file. The number of extra $
and .
signs should now be greatly reduced.
astro_demo.mp4
Use SassDoc to suggest choices
If you use SassDoc (which I wholeheartedly recommend), this version adds a new feature to code suggestions.
Let's say you have a function or mixin that expects only a set of string values. You might document it this way with a string literal union type.
/// Get a timing value for use in animations.
/// @param {"sonic" | "link" | "homer" | "snorlax"} $mode - The timing you want
/// @return {String} - the timing value in ms
@function timing($mode) {
@if map.has-key($_timings, $mode) {
@return map.get($_timings, $mode);
} @else {
@error 'Unable to find a mode for #{$mode}';
}
}
Now Some Sass understands that type annotation and uses it to give the user of the function or mixin a list of choices from that type.
choices_demo.mp4
Other changes
When a function or mixin has optional parameters Some Sass now suggests two variations in code completion:
- Higher ranked: the function or mixin without optional parameters.
- Lower ranked: the function or mixin with all parameters.
If you want the full parameter list, hit Arrow key down.
Finally, this version fixes a bug in #{interpolation}
. Now namespaces work as you would expect, so you can finally get suggestions when you make CSS variables from SCSS constants.
Full Changelog: 2.4.0...2.5.0
2.4.0 - Find All References
New features
- Find all references to variables, mixins and functions. (in #11)
- Find all references to Sass built-in functions and variables. (in #11)
find_all_references.mp4
- For mixins with
@content
SassDoc annotation, add and prefer a suggestion without brackets. The one with brackets now needs an Arrow Down keypress to use. (in #11)
two_suggestions.mp4
Bugfixes
- Don't give signature help for CSS functions with the same name, for instance
scale()
. (in #11) - Don't give hover information for CSS functions with the same name, for instance
scale()
. (in #11) - Fix default exclude patterns so they work as expected when used with
micromatch
. (in #11)
Housekeeping
- Update dependencies (in #10)
Full Changelog: 2.3.0...2.4.0
2.3.0 - Sass docs
What's Changed
- Completions, hover info and signature suggestions for Sass built-in modules in
@use
by @wkillerud in #7
sass_docs_demo.mp4
Full Changelog: 2.2.0...2.3.0
2.2.0 - Improvements to SassDoc editing
What's Changed
- Improvements to SassDoc editing, and some housekeeping by @wkillerud in #6
JSDoc-style experience suggests SassDoc comment block based on parameters
Code suggestions for SassDoc annotations when in a block comment, and hover-information for SassDoc annotations with links to docs.
Full Changelog: 2.1.1...2.2.0
2.1.1
What's Changed
- Fix a bug when namespace file is
_index.scss
by @wkillerud in #5
Full Changelog: 2.1.0...2.1.1
2.1.0 - Support for namespaces and more
What's Changed
- Adds namespace support to code suggestions, diagnostics, hover, signature help, and go to definition. Supports aliases (including wildcard), prefixes, hiding.
- Marks deprecated items in code suggestions.
- Gives mixins a different icon (snippet-icon) from functions (methods and functions-icon). See IntelliSense in Visual Studio Code for examples on how they look.
- Fixes snippet syntax when completing mixins and functions with parameters, so the (dollarless) parameter names get shown as placeholders.
- Adds a setting to only suggest symbols from the current document, or when in a namespace context (stop suggesting every public symbol everywhere).
- Adds a setting to control whether the extension suggests symbols from the current document. Turned off by default to avoid duplicates from built-in SCSS language support.
- Adds a note to readme about maybe turning off word-based suggestions for the best experience, for now.
by @wkillerud in #4
Full Changelog: 2.0.0...2.1.0
2.0.0
What's Changed
- breaking: the setting
implicitlyLabel
has been removed - feat: diagnostics for deprecated variables, functions and mixins by @wkillerud in #3
Full Changelog: 1.0.1...2.0.0