coc-css


Ⅰ. 插件描述

Css language server extension for coc.nvim

Ⅱ. 基本信息

创建日期:  2018-09-06
使用用户:  26
Github星:  40
插件作者:  neoclide

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'neoclide/coc-css'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'neoclide/coc-css'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'neoclide/coc-css'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/neoclide/coc-css

Ⅳ. 文档说明

# coc-css

Css language server extension for coc.nvim.

Uses vscode-css-languageservice inside.

Install

In your vim/neovim, run the command:

:CocInstall coc-css

Features

Coc has support for all features that vscode-css-languageservice has.

  • doValidation analyzes an input string and returns syntax and lint errros.
  • doComplete provides completion proposals for a given location.
  • doHover provides a hover text for a given location.
  • findDefinition finds the definition of the symbol at the given location.
  • findReferences finds all references to the symbol at the given location.
  • findDocumentHighlights finds all symbols connected to the given location.
  • findDocumentSymbols provides all symbols in the given document
  • doCodeActions evaluates code actions for the given location, typically to fix a problem.
  • findColorSymbols evaluates all color symbols in the given document
  • doRename renames all symbols connected to the given location.
  • getFoldingRanges returns folding ranges in the given document.

Configuration options

  • css.filetypes defauts to ['css', 'less', 'wxss', 'scss'].
  • css.trace.server trace LSP traffic in output channel.
  • css.execArgv add execArgv to child_process.spawn
  • css.validate enables validation for css files, default true.
  • css.lint.[rulename] set rule for css lint, to get list of rules, trigger
    completion in your css-settings.json
  • less.validate less.lint.[rulename] same as css, but for less.
  • wxss.validate wxss.lint.[rulename] same as css, but for wxss.
  • scss.validate scss.lint.[rulename] same as css, but for scss.

License

MIT

添加新评论