@cinea4678/unocss-language-server

0.0.15 • Public • Published

UnoCSS Language Server

A language server for unocss

Features

  • Simple completion
  • Hover
  • Loading config from root dir

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 -.

TODO

  • [ ] Highlight matched classes

Related information

Readme

Keywords

none

Package Sidebar

Install

npm i @cinea4678/unocss-language-server

Weekly Downloads

1

Version

0.0.15

License

MIT

Unpacked Size

11.2 kB

Total Files

6

Last publish

Collaborators

  • cinea