windicss-intellisense
windicss-intellisense copied to clipboard
Does this work with Vim as an LSP?
Basically, I want to be able to do this:
windicss = {
cmd = { "windicss-language-server", "--stdio" },
filetypes = { "aspnetcorerazor", "astro", "astro-markdown", "blade", "django-html", "edge", "eelixir", "ejs", "erb", "eruby", "gohtml", "haml", "handlebars", "hbs", "html", "html-eex", "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" },
init_options = {
userLanguages = {
eelixir = "html-eex",
eruby = "erb"
},
},
on_new_config = function(new_config)
if not new_config.settings then
new_config.settings = {}
end
if not new_config.settings.editor then
new_config.settings.editor = {}
end
if not new_config.settings.editor.tabSize then
-- set tab size for hover
new_config.settings.editor.tabSize = vim.lsp.util.get_effective_tabstop()
end
end,
root_dir = util.root_pattern('windi.config.js', 'windi.config.cjs', 'windi.config.ts', 'tailwind.config.js', 'tailwind.config.cjs', 'tailwind.config.ts', 'postcss.config.js', 'postcss.config.ts', 'package.json', 'node_modules', '.git'),
settings = {
tailwindCSS = {
lint = {
cssConflict = "warning",
invalidApply = "error",
invalidConfigPath = "error",
invalidScreen = "error",
invalidTailwindDirective = "error",
invalidVariant = "error",
recommendedVariantOrder = "warning"
},
validate = true
},
},
},
require'lspconfig'.windicss.setup{}
...and then for it to work with Neovim via https://github.com/neovim/nvim-lspconfig
I would also love to see this in neovim, as the tailwindcss language server doesn't seem to work with this. 👍🏼
I would also welcome a windi lsp support in neovim!
updates?
Any news? It would be awesome to use this in my projects.
You would need to split the backend part from the extension and then make the extension call the backend while allowing the backend to run as its own thing