From 4d23c611f0a4b131dd384dbbaecedffc97e5ae21 Mon Sep 17 00:00:00 2001 From: Nick Zana Date: Sat, 16 Nov 2024 20:21:09 -0500 Subject: [PATCH] Add CSS LSP plugins --- lua/lsp.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lua/lsp.lua b/lua/lsp.lua index 9e9c1e4..dc736bc 100644 --- a/lua/lsp.lua +++ b/lua/lsp.lua @@ -78,6 +78,24 @@ lsp.configure('ruff', { } }) +-- CSS +lsp.configure('cssls', { + cmd = { "npx", "vscode-css-language-server", "--stdio" }, + filetypes = { "css", "scss", "less" } +}) + +-- Tailwind CSS +lsp.configure('tailwindcss', { + cmd = { "npx", "tailwindcss-language-server", "--stdio" }, + filetypes = { "html", "css", "scss", "javascript", "javascriptreact", "typescript", "typescriptreact" }, + init_options = { + userLanguages = { + eelixir = "html-eex", + eruby = "erb" + } + } +}) + vim.api.nvim_create_autocmd("LspAttach", { group = vim.api.nvim_create_augroup('lsp_attach_disable_ruff_hover', { clear = true }), callback = function(args)