coc-diagnostic


Ⅰ. 插件描述

diagnostic-languageserver extension for coc.nvim

Ⅱ. 基本信息

创建日期:  2019-04-20
使用用户:  1
Github星:  43
插件作者:  年糕小豆汤

Ⅲ. 安装方法

使用Vundle管理器安装

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

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

使用NeoBundle管理器安装

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

使用VimPlug管理器安装

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

使用Pathogen管理器安装

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

Ⅳ. 文档说明

# Diagnostic Extension for CoC

diagnostic-languageserver
extension for CoC

Install

:CocInstall coc-diagnostic

image

Config

linters filetypes formatters formatFiletypes field config are same as diagnostic-languageserver.
this extension include all linters config at linters
therefor if you use the linter which have included then you don't need to config linters and formatters

To enable this plugin for filetypes you have to config diagnostic-languageserver.filetypes
for linters and diagnostic-languageserver.formatFiletypes for formatters.

example coc-settings.json:

{
  // diagnostic-languageserver
  "diagnostic-languageserver.filetypes": {
    "vim": "vint",
    "email": "languagetool",
    "markdown": [ "write-good", "markdownlint" ],
    "sh": "shellcheck",
    "elixir": ["mix_credo", "mix_credo_compile"],
    "eelixir": ["mix_credo", "mix_credo_compile"],
    "php": "phpstan"
    ...
  },
  "diagnostic-languageserver.formatFiletypes": {
    "dart": "dartfmt",
    "elixir": "mix_format",
    "eelixir": "mix_format"
    ...
  }
}

All Options:

"diagnostic-languageserver.enable": {
  "type": "boolean",
  "default": true,
  "description": "enable this extension?"
},
"diagnostic-languageserver.debug": {
  "type": "boolean",
  "default": true,
  "description": "enable this extension?"
},
"diagnostic-languageserver.trace.server": {
  "type": "string",
  "default": "off",
  "enum": [
    "off",
    "messages",
    "verbose"
  ],
  "description": "Trace level of diagnostic-languageserver"
},
"diagnostic-languageserver.linters": {
  "type": "object",
  "default": {},
  "description": "linters config same as diagnostic-languageserver's linters config"
},
"diagnostic-languageserver.filetypes": {
  "type": "object",
  "default": {},
  "description": "filetypes config same as diagnostic-languageserver's filetypes config"
},
"diagnostic-languageserver.formatters": {
  "type": "object",
  "default": {},
  "description": "formatters config same as diagnostic-languageserver's formatters config"
},
"diagnostic-languageserver.formatFiletypes": {
  "type": "object",
  "default": {},
  "description": "formatFiletypes config same as diagnostic-languageserver's formatFiletypes config"
}

Buy Me A Coffee ☕️

btc

image

添加新评论