From 9301595e2b19da37250f2a349253bc96fbdd48b4 Mon Sep 17 00:00:00 2001 From: tronglt Date: Sun, 22 Oct 2023 23:20:59 +0700 Subject: [PATCH] Config tailwincss LSP to support Rust as HTML template so the suggestion can work with rust files. --- init.lua | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index ea0057a4..a3d30faa 100644 --- a/init.lua +++ b/init.lua @@ -84,7 +84,7 @@ require('lazy').setup({ -- Useful status updates for LSP -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` - { 'j-hui/fidget.nvim', opts = {} }, + { 'j-hui/fidget.nvim', tag = 'legacy', opts = {} }, -- Additional lua configuration, makes nvim stuff amazing! 'folke/neodev.nvim', @@ -120,7 +120,7 @@ require('lazy').setup({ -- See `:help lualine.txt` opts = { options = { - icons_enabled = false, + icons_enabled = true, theme = 'kanagawa', component_separators = '|', section_separators = '', @@ -131,6 +131,7 @@ require('lazy').setup({ { -- Add indentation guides even on blank lines 'lukas-reineke/indent-blankline.nvim', + main = "ibl", -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help indent_blankline.txt` opts = { @@ -475,6 +476,21 @@ mason_lspconfig.setup_handlers { settings = servers[server_name], } end, + ["tailwindcss"] = function() + require("lspconfig").tailwindcss.setup { + filetypes = { "aspnetcorerazor", "astro", "astro-markdown", "blade", "clojure", "django-html", "htmldjango", + "edge", "eelixir", "elixir", "ejs", "erb", "eruby", "gohtml", "gohtmltmpl", "haml", "handlebars", "hbs", "html", + "html-eex", "heex", "jade", "leaf", "liquid", "markdown", "mdx", "mustache", "njk", "nunjucks", "php", "razor", + "slim", "twig", "css", "less", "postcss", "sass", "scss", "stylus", "sugarss", "javascript", "javascriptreact", + "reason", "rescript", "typescript", "typescriptreact", "vue", "svelte", "rust" }, + init_options = { + userLanguages = { + rust = "html" + }, + + } + } + end } -- nvim-cmp setup