aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/jsonnet_ls.lua
blob: d467429badfa5cc31c1228e7452bf6258f12e372 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local configs = require 'lspconfig/configs'
local util = require 'lspconfig/util'

configs.jsonnet_ls = {
  default_config = {
    cmd = { 'jsonnet-language-server' },
    filetypes = { 'jsonnet', 'libsonnet' },
    root_dir = function(fname)
      return util.root_pattern 'jsonnetfile.json'(fname) or util.find_git_ancestor(fname)
    end,
  },
  docs = {
    description = [[
https://github.com/jdbaldry/jsonnet-language-server

A Language Server Protocol (LSP) server for Jsonnet.
]],
    default_config = {
      root_dir = [[root_pattern("jsonnetfile.json")]],
    },
  },
}