question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does this work with Vim as an LSP?

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:8
  • Comments:5

github_iconTop GitHub Comments

13reactions
dedanicommented, Nov 18, 2021

I would also welcome a windi lsp support in neovim!

4reactions
Suyashtntcommented, Apr 23, 2022

updates?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vim and Language Server Protocol - Vim From Scratch
In this article, we'll quickly talk about what is a language server, why we need the LSP protocol, and how to set up...
Read more >
prabirshrestha/vim-lsp: async language server protocol plugin ...
vim -lsp supports the unofficial extension to the LSP protocol for semantic highlighting (microsoft/vscode-languageserver-node#367). This feature requires Neovim ...
Read more >
Which lsp plugin should I use? : r/vim - Reddit
The Language Server Protocol (LSP) defines the protocol used between an editor or IDE to talk to a language server that provides language ......
Read more >
Setting up LSP in Vim - ncona.com
In a previous article, I explained a little about how Language Server Protocol clients work. This time I'm going to explain how we...
Read more >
Lsp - Neovim docs
Nvim supports the Language Server Protocol (LSP), which means it acts as a client to LSP servers and includes a Lua framework vim.lsp...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found