套件

@master/css-language-server@master/css-language-server

NPM package ( download / month )NPM package ( download / month )NPM package size (gzipped size)NPM package size (gzipped size)Source codeSource code

Master CSS Language Server

Installation

npm i @master/css-language-server

Basic usage

Create a language server

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.


API Reference

settings

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

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

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

apps
a
master.css.js
b
master.css.js

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

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.

apps
a
master.css.js
b
master.css.js

settings.verbose

Print all console logs.

Type
boolean
Default
false

  • Master UI


© 2025 Aoyue Design LLC.MIT License
Trademark Policy