From c7bf7d4bf9065c6f01edb325c6e8dcfa732ebb3d Mon Sep 17 00:00:00 2001 From: Zach Leslie Date: Mon, 15 Nov 2021 02:11:52 -0700 Subject: feat: add jsonnet-language-server (#1372) --- lua/lspconfig/jsonnet_ls.lua | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 lua/lspconfig/jsonnet_ls.lua (limited to 'lua/lspconfig/jsonnet_ls.lua') diff --git a/lua/lspconfig/jsonnet_ls.lua b/lua/lspconfig/jsonnet_ls.lua new file mode 100644 index 00000000..d467429b --- /dev/null +++ b/lua/lspconfig/jsonnet_ls.lua @@ -0,0 +1,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")]], + }, + }, +} -- cgit v1.2.3-70-g09d2