Page 1 of 1

CSS/LESS/SASS Language Server

Posted: 12 May 2021 13:39
by Rickard Johansson
CSS Language Server
Support CSS, LESS and SASS and provide diagnostics, hover information, completion...

Install
* Install Nodejs for Windows https://nodejs.org/en/download/
* Install server

Code: Select all

>npm install --global vscode-css-languageserver-bin
Add the server in project/site settings

Server name
CSS Language Server

Command
css-languageserver.cmd

Command line arguments
--stdio

Initial folder
<AppData>\Roaming\npm

File extension and language id
.css=css
.less=less
.scss=scss

Communication channel
* Command line (stdio)

Source folders
<Main site folder>

Initialize options
{"css":{"validate":true},"less":{"validate":true},"scss":{"validate":true}}

You can also use socket communication. Just replace the argument --stdio with --socket={number} e.g. --socket=5000.