Skip to content

UnoCSS Language Server (compatible with UnoCSS v66)

License

Notifications You must be signed in to change notification settings

mdrv/unocss-language-server

 
 

Repository files navigation

UnoCSS Language Server

A language server for unocss

Features

Install

npm i unocss-language-server -g

Usage

nvim-lspconfig server_configuration

require 'lspconfig'.unocss.setup {
  on_attach = on_attach,
  capabilities = capabilities,
  filetypes = { ... },
  root_dir = function(fname)
    return require 'lspconfig.util'.root_pattern(...)(fname)
  end
}

If you are using nvim-cmp, you can add - to trigger_characters.

cmp.setup {
  sources = { { name = 'nvim_lsp', trigger_characters = { '-' } } }
}

Because @unocss/autocomplete suggest less before meeting -.

Related information

About

UnoCSS Language Server (compatible with UnoCSS v66)

Resources

License

Stars

Watchers

Forks

Languages

  • TypeScript 99.8%
  • JavaScript 0.2%