
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
coc-scssmodules
Advanced tools
css and scss modules autocompletion and go-to-definition coc.nvim plugin and hopefully supporting sass parent selectors
coc.nvim extension for autocompletion
and go-to-definition
functionality
for CSS Modules.
Note: If you have coc-tsserver
installed, the go-to-defininition
might show
a popup instead linking to type definition for *.module.s?css
instead. You'll
just need to select the .css
file for this case since I don't know how to fix
it.
:CocInstall coc-scssmodules
If you are using vim's plugin manager for coc-extensions, here's an example with vim-plug:
Plug 'mlaursen/coc-scssmodules', {'do': 'yarn install && yarn build'}
This extension supports two configuration properties:
{
"cssmodules.camelCase": {
"type": ["boolean", "string"],
"enum": [true, false, "dashes"],
"default": false,
"description": "Boolean if the suggestions should be converted to camelCase if you use kebab-case in css files. Should also work with sass parent selectors"
},
"cssmodules.hintMessage": {
"type": "string",
"default": "string (cssmodule)",
"description": "The hint message to display next to an autocomplete suggestion from a css module"
}
}
This extension is essentially a port of vscode-css-modules-plugin and coc-cssmodules.
The main reason I created this implementation was to support parent selectors
within scss since I still like BEM for describing different states. If parent
selectors (&
) are not a concern, you should use the "official"
coc-cssmodules instead.
Another small difference is that the configuration
will be correctly typed
when using :CocConfig
and show warnings when the camelCase
option is valid
or invalid. (This could get ported into the "official" module as well though)
Finally, there is another configuration setting that can be used to show hint
details when the autocompletion items if you do not like the default value of
string (cssmodule)
.
Need to look into a way to actually write tests for this. None of the other
coc-*
extensions have tests right now, so nothing really to reference. I could
write some tests for the utils and regexp at least.
Look into overriding/changing the coc-tsserver
plugin for go-to-definitions so
this one is the "default" so it doesn't require a selection.
Since I don't know a way to write automated tests yet with coc.nvim
, the best
way to do this is:
yarn build -w
.vimrc
to disable/remove the downloaded coc-scssmodules
and
use a local path with something like vim-plug to open up one of the test
files within the test
Plug '~/path/to/this-repo'
:CocOpenLog
this.logger
to log with this.logger.info
:CocRestart
and :CocOpenLog
to see changesIt's pretty ugly.
FAQs
css and scss modules autocompletion and go-to-definition coc.nvim plugin and hopefully supporting sass parent selectors
The npm package coc-scssmodules receives a total of 5 weekly downloads. As such, coc-scssmodules popularity was classified as not popular.
We found that coc-scssmodules demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.