aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/yamlls.lua
blob: f20ced67046ea29012f96b963f01c60ba645a20e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
local configs = require "lspconfig/configs"
local util = require "lspconfig/util"

local server_name = "yamlls"
local bin_name = "yaml-language-server"

configs[server_name] = {
  default_config = {
    cmd = { bin_name, "--stdio" },
    filetypes = { "yaml" },
    root_dir = util.root_pattern(".git", vim.fn.getcwd()),
  },
  docs = {
    package_json = "https://raw.githubusercontent.com/redhat-developer/vscode-yaml/master/package.json",
    description = [[
https://github.com/redhat-developer/yaml-language-server

`yaml-language-server` can be installed via `npm`:
```sh
npm install -g yaml-language-server
```
]],
    default_config = {
      root_dir = [[root_pattern(".git", vim.fn.getcwd())]],
    },
  },
}

-- vim:et ts=2 sw=2