General purpose Language Server
Branch: master
Clone or download
mattn Use Replace
Fixes #5
Latest commit 6b1bd29 Feb 7, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/efm-langserver Nest configuration languages Feb 7, 2019
langserver Use Replace Feb 7, 2019
README.md add coc.nvim config support and fix params name Feb 7, 2019
screenshot.png Add screenshot Feb 5, 2019

README.md

efm-langserver

General purpose Language Server that can use specified error message format generated from specified command. This is useful for editing code with linter.

efm

Usage

Usage of efm-langserver:
  -c string
        path to config.yaml
  -log string
        logfile

Example for config.yaml

Location of config.yaml is:

  • UNIX: $HOME/.config/efm-langserver/config.yaml
  • Windows: %APPDATA%\efm-langserver\config.yaml

Below is example for config.yaml .

languages:
  eruby:
    lint-command: 'erb -x -T - | ruby -c'
    lint-stdin: true
    lint-offset: 1
    format-command: 'htmlbeautifier'

  vim:
    lint-command: 'vint -'
    lint-stdin: true

  markdown:
    lint-command: 'markdownlint -s'
    lint-stdin: true
    lint-formats:
      - '%f: %l: %m'

Configuration for vim-lsp

augroup LspEFM
  au!
  autocmd User lsp_setup call lsp#register_server({
      \ 'name': 'efm-langserver-erb',
      \ 'cmd': {server_info->['efm-langserver', '-c=/path/to/your/config.yaml']},
      \ 'whitelist': ['eruby', 'markdown'],
      \ })
augroup END

Configuration for coc.nvim

coc-settings.json

  // languageserver
  "languageserver": {
    "efm": {
      "command": "efm-langserver",
      "args": [],
      // custom config path
      // "args": ["-c", "/path/to/your/config.yaml"],
      "filetypes": ["vim", "eruby", "markdown"]
    }
  },

Supported Lint tools

Installation

$ go get github.com/mattn/efm-langserver/cmd/efm-langserver

License

MIT

Author

Yasuhiro Matsumoto (a.k.a. mattn)