mattn / efm-langserver

General purpose Language Server
MIT License
1.34k stars 61 forks source link

ERROR: can not read configuration: yaml: line 13: did not find expected key #40

Closed rafaelnp closed 4 years ago

rafaelnp commented 4 years ago

I have the following error when ttrying to use efm-langserver + cocn.vim + neovim on Arch Linux:

can not read configuration: yaml: line 13: did not find expected key

Version information:

cocn.vim configuration (~/.config/nvim/coc-settings.jso):

    // Viml, Yaml, Markdown
    "efm": {
      "command": "efm-langserver",
      "args": [],
      "filetypes": ["vim", "markdown", "yaml"]
    },

efm-langserver configuration (~/.config/efm-langserver/config.yaml):

version: 2

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

  markdown-markdownlint: &markdown-markdownlint
    lint-command: 'markdownlint -s -c /home/rnp/.config/markdownlint.json'
    lint-stdin: true
    lint-formats:
      - '%f: %l: %m'

   yaml-yamllint: &yaml-yamllint
    lint-command: 'yamllint -f parsable -'
    lint-stdin: true

languages:
  vim:
    - <<: *vim-lint

  markdown:
    - <<: *markdown-markdownlint

  yaml:
    - <<: *yaml-yamllint
mattn commented 4 years ago

Probably line 13 is bad indentation in your yaml file. (one needless whitespace before key)

rafaelnp commented 4 years ago

There was an extra space on line 14, before yaml-yamllint and I caught afterwards a typo on line 20, *vint-lint instead of *vim-vint.
Thanks for your reply.