diff options
| author | Rogin Farrer <rogin@roginfarrer.com> | 2024-03-03 22:04:32 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-04 14:04:32 +0800 |
| commit | f6b87017588b148937d3989f13a3c90b4650034e (patch) | |
| tree | a72ca5bc0f4d3af64453150a621f07f8b2524781 /lua | |
| parent | docs: update server_configurations.md (diff) | |
| download | nvim-lspconfig-f6b87017588b148937d3989f13a3c90b4650034e.tar nvim-lspconfig-f6b87017588b148937d3989f13a3c90b4650034e.tar.gz nvim-lspconfig-f6b87017588b148937d3989f13a3c90b4650034e.tar.bz2 nvim-lspconfig-f6b87017588b148937d3989f13a3c90b4650034e.tar.lz nvim-lspconfig-f6b87017588b148937d3989f13a3c90b4650034e.tar.xz nvim-lspconfig-f6b87017588b148937d3989f13a3c90b4650034e.tar.zst nvim-lspconfig-f6b87017588b148937d3989f13a3c90b4650034e.zip | |
fix(css_variable_lsp): improve default settings (#3046)
* fix: CSS Variables LSP default settings
* fix docs
---------
Co-authored-by: Rogin Farrer <rfarrer@wayfair.com>
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/css_variables.lua | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lua/lspconfig/server_configurations/css_variables.lua b/lua/lspconfig/server_configurations/css_variables.lua index f8abd20e..1c667ff1 100644 --- a/lua/lspconfig/server_configurations/css_variables.lua +++ b/lua/lspconfig/server_configurations/css_variables.lua @@ -5,6 +5,27 @@ return { cmd = { 'css-variables-language-server', '--stdio' }, filetypes = { 'css', 'scss', 'less' }, root_dir = util.root_pattern('package.json', '.git'), + -- Same as inlined defaults that don't seem to work without hardcoding them in the lua config + -- https://github.com/vunguyentuan/vscode-css-variables/blob/763a564df763f17aceb5f3d6070e0b444a2f47ff/packages/css-variables-language-server/src/CSSVariableManager.ts#L31-L50 + settings = { + cssVariables = { + lookupFiles = { '**/*.less', '**/*.scss', '**/*.sass', '**/*.css' }, + blacklistFolders = { + '**/.cache', + '**/.DS_Store', + '**/.git', + '**/.hg', + '**/.next', + '**/.svn', + '**/bower_components', + '**/CVS', + '**/dist', + '**/node_modules', + '**/tests', + '**/tmp', + }, + }, + }, }, docs = { description = [[ @@ -22,6 +43,25 @@ npm i -g css-variables-language-server ]], default_config = { root_dir = [[root_pattern("package.json", ".git") or bufdir]], + settings = [[ +cssVariables = { + lookupFiles = { '**/*.less', '**/*.scss', '**/*.sass', '**/*.css' }, + blacklistFolders = { + '**/.cache', + '**/.DS_Store', + '**/.git', + '**/.hg', + '**/.next', + '**/.svn', + '**/bower_components', + '**/CVS', + '**/dist', + '**/node_modules', + '**/tests', + '**/tmp', + }, +}, + ]], }, }, } |
