
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
cssmodules-language-server
Advanced tools
Language server for autocompletion
and go-to-definition
functionality for css modules.
The supported languages are css
(postcss), sass
and scss
. styl
files are parsed as regular css
.
npm install --global cssmodules-language-server
See if your editor supports language servers or if there is a plugin to add support for language servers
Example uses nvim-lspconfig
local configs = require'lspconfig/configs'
if not configs.cssmodules then
configs.cssmodules = {
default_config = {
cmd = {'cssmodules-language-server'},
filetypes = {'javascript', 'javascriptreact', 'typescript', 'typescriptreact'},
init_options = {
camelCase = 'dashes',
},
root_dir = require('lspconfig.util').root_pattern('package.json')
},
docs = {
description = 'TODO description',
default_config = {
root_dir = '[[root_pattern("package.json")]]'
}
}
}
end
configs.cssmodules.setup {}
-- or
-- configs.cssmodules.setup {on_attach = custom_on_attach}
let cssmodules_config = {
\ "command": "cssmodules-language-server",
\ "initializationOptions": {"camelCase": "dashes"},
\ "filetypes": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
\ "requireRootPattern": 0,
\ "settings": {}
\ }
coc#config('languageserver.cssmodules', cssmodules_config)
camelCase
If you write kebab-case classes in css files, but want to get camelCase complete items, set following to true.
{
"camelCase": true
}
You can set the cssmodules.camelCase
option to true
, "dashes"
or false
(default).
Classname in css file | true | dashes | false (default) |
---|---|---|---|
.button | .button | .button | .button |
.btn__icon--mod | .btnIconMod | .btn__iconMod | .btn__icon--mod |
This plugin was extracted from coc-cssmodules
as a standalone language server.
FAQs
language server for cssmodules
We found that cssmodules-language-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.