From 5e613535a6e209270fb54ee36fd13333adef58e9 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Thu, 1 May 2025 19:30:59 +0300 Subject: Added css vars lang server --- .config/nvim/lsp/css_variables.lua | 26 ++++++++++++++++++++++++++ .config/nvim/lua/lsp.lua | 1 + hosts/home.nix | 1 + 3 files changed, 28 insertions(+) create mode 100644 .config/nvim/lsp/css_variables.lua diff --git a/.config/nvim/lsp/css_variables.lua b/.config/nvim/lsp/css_variables.lua new file mode 100644 index 0000000..800d21c --- /dev/null +++ b/.config/nvim/lsp/css_variables.lua @@ -0,0 +1,26 @@ +-- https://github.com/vunguyentuan/vscode-css-variables/tree/master/packages/css-variables-language-server + +return { + cmd = { 'css-variables-language-server', '--stdio' }, + filetypes = { 'css', 'scss', 'less', 'astro' }, + root_markers = { 'package.json', '.git' }, + settings = { + cssVariables = { + blacklistFolders = { + '**/.cache', + '**/.DS_Store', + '**/.git', + '**/.hg', + '**/.next', + '**/.svn', + '**/bower_components', + '**/CVS', + '**/dist', + '**/node_modules', + '**/tests', + '**/tmp', + }, + lookupFiles = { '**/*.less', '**/*.scss', '**/*.sass', '**/*.css' }, + }, + }, +} diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua index 1e9cdec..89a474e 100644 --- a/.config/nvim/lua/lsp.lua +++ b/.config/nvim/lua/lsp.lua @@ -4,6 +4,7 @@ return { basedpyright = true, -- python bashls = true, clangd = true, + css_variables = true, cssls = true, gopls = true, html = true, diff --git a/hosts/home.nix b/hosts/home.nix index 1c73882..444412c 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -116,6 +116,7 @@ taplo typescript-language-server yaml-language-server + # npm i -g css-variables-language-server # Tools stylua -- cgit v1.3.1