From 5bbe52c6977fb553fbf587d26fe10132678cc6fc Mon Sep 17 00:00:00 2001 From: cbosvik <132846580+cbosvik@users.noreply.github.com> Date: Mon, 1 Apr 2024 22:59:52 +0200 Subject: [PATCH 1/2] add jsonnet support --- lua/lazyvim/plugins/extras/lang/jsonnet.lua | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/lang/jsonnet.lua diff --git a/lua/lazyvim/plugins/extras/lang/jsonnet.lua b/lua/lazyvim/plugins/extras/lang/jsonnet.lua new file mode 100644 index 00000000..6a1f5e87 --- /dev/null +++ b/lua/lazyvim/plugins/extras/lang/jsonnet.lua @@ -0,0 +1,28 @@ +return { + { "google/vim-jsonnet" }, + { + "neovim/nvim-lspconfig", + opts = { + servers = { + -- Ensure mason installs the server + jsonnet_ls = {}, + }, + }, + }, + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "jsonnet" }) + end + end, + }, + { + "williamboman/mason.nvim", + opts = function(_, opts) + vim.list_extend(opts.ensure_installed, { + "jsonnet-language-server", + }) + end, + }, +} From 22e271deaa48a75a0924cca050abaad7720249de Mon Sep 17 00:00:00 2001 From: cbosvik <132846580+cbosvik@users.noreply.github.com> Date: Mon, 1 Apr 2024 23:34:07 +0200 Subject: [PATCH 2/2] Update jsonnet.lua --- lua/lazyvim/plugins/extras/lang/jsonnet.lua | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/jsonnet.lua b/lua/lazyvim/plugins/extras/lang/jsonnet.lua index 6a1f5e87..2f005b96 100644 --- a/lua/lazyvim/plugins/extras/lang/jsonnet.lua +++ b/lua/lazyvim/plugins/extras/lang/jsonnet.lua @@ -4,7 +4,6 @@ return { "neovim/nvim-lspconfig", opts = { servers = { - -- Ensure mason installs the server jsonnet_ls = {}, }, }, @@ -17,12 +16,4 @@ return { end end, }, - { - "williamboman/mason.nvim", - opts = function(_, opts) - vim.list_extend(opts.ensure_installed, { - "jsonnet-language-server", - }) - end, - }, }