Package

Language Server

The language server reference for Master CSS.


Main

The main body of this package is the class CSSLanguageServer, which is built on top of VSCode Language Server.

import CSSLanguageServer from '@master/css-language-server'
const languageServer = new CSSLanguageServer(connection, customSettings)

Check out the source code for arguments and properties.


Settings

The default language server settings. It inherits the language service settings.

import { settings } from '@master/css-language-server'

.workspaces

Specify the workspace where the independent CSSLanguageService should be created, always including the root workspace. See the Monorepo documentation to understand the purpose of this option.

Type
FastGlobPattern[] | 'auto'
Default
auto

By default auto, a new workspace is automatically created based on the location of the master.css.* configuration file.

Automatically create / and /apps/a workspaces.

root
|-- 🗂️ apps
| |-- 🗂️ a
| | `-- 📄 master.css.js
| `-- 🗂️ b
`-- 📄 master.css.js

A root workspace will still be automatically created without a root configuration.

root
|-- 🗂️ apps
| |-- 🗂️ a
| | `-- 📄 master.css.js
| `-- 🗂️ b

In most cases, keeping the default 'auto' is sufficient, but you can also manually specify the workspace.

Specify /apps/b as a workspace:

{
workspaces: ['apps/b']
}

It creates / and /apps/b workspaces.

root
|-- 🗂️ apps
| |-- 🗂️ a
| | `-- 📄 master.css.js
| `-- 🗂️ b
`-- 📄 master.css.js

.verbose

Print all console logs.

Type
boolean
Default
false
Design Token
Colors

Customizing color variables or starting with the crafted palette.

© Aoyue Design LLC.