Giter Club home page Giter Club logo

lsp-tailwindcss's Introduction

https://melpa.org/packages/lsp-tailwindcss-badge.svg

lsp-tailwindcss

The lsp-mode client for tailwindcss, using language server from official vscode plugin.

images/autocomplete.png

Installation

Doom Emacs

in packages.el

(package! lsp-tailwindcss :recipe (:host github :repo "merrickluo/lsp-tailwindcss"))

in config.el

(use-package! lsp-tailwindcss)

straight.el

(straight-use-package
 '(lsp-tailwindcss :type git :host github :repo "merrickluo/lsp-tailwindcss"))

Language Server

Installation

  1. use M-x lsp-install-server, then select tailwindcss.
  2. use npm, npm install -g @tailwindcss/language-server.

Update

  1. use C-u M-x lsp-install-server, then select tailwindcss.
  2. use npm, npm install -g @tailwindcss/language-server.

Changelog

0.2

breaking changes

major changes

  • added lsp-tailwindcss-major-modes, see details in #Customization section.
  • allow global and workspace configuration for tailwindcss-language-server.
  • make variables lsp-tailwindcss-server-dir, lsp-tailwindcss-server-file, lsp-tailwindcss-auto-install-server, lsp-tailwindcss-server-version obsolete.

Customization

lsp-tailwindcss

lsp-tailwindcss-add-on-mode

Specify that if lsp-tailwindcss runs in add-on mode, see in lsp-mode’s documentation. This must be set before the package loads. default: nil.

lsp-tailwindcss-major-modes (since 0.2)

Specify lsp-tailwindcss should only starts when major-mode in the list or derived from them. default: rjsx-mode web-mode html-mode css-mode.

tailwindcss-language-server

All settings described in tailwindcss-intellisense except:

  • tailwindCSS.includeLanguages The activation of the language server is controlled by lsp-tailwindcss--activate-p, so this is not needed.
  • tailwindCSS.colorDecorators Emacs does not support color decorators.

Default value follows the default value in the documentation.

Global Configuration

Custom variable naming convention: tailwindCSS.emmetCompletions > =lsp-tailwindcss-emmet-completions.

Rustywind (class sorter)

There are two functions integrate the rustywind class sorter, lsp-tailwindcss-rustywind and lsp-tailwindcss-rustywind-before-save.

After install rustywind npm i -g rustywind, run lsp-tailwindcss-rustywind manually or add it to before-save-hook to use it.

(add-hook 'before-save-hook 'lsp-tailwindcss-rustywind-before-save)

lsp-tailwindcss's People

Contributors

merrickluo avatar cxa avatar jsmestad avatar lenic avatar syohex avatar xiankuncheng avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.