From 68885e2cb0787d82d13620f6202767e358998dc4 Mon Sep 17 00:00:00 2001 From: Souravpakhira Date: Tue, 9 May 2023 15:04:22 +0530 Subject: [PATCH 1/5] feat: added docker pack --- lua/astrocommunity/pack/docker/README.md | 6 ++++++ lua/astrocommunity/pack/docker/docker.lua | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 lua/astrocommunity/pack/docker/README.md create mode 100644 lua/astrocommunity/pack/docker/docker.lua diff --git a/lua/astrocommunity/pack/docker/README.md b/lua/astrocommunity/pack/docker/README.md new file mode 100644 index 000000000..c334c6d61 --- /dev/null +++ b/lua/astrocommunity/pack/docker/README.md @@ -0,0 +1,6 @@ +# Docker Language Pack + +This plugin pack does the following: + +- Adds `dockerfile-language-server` and `docker-compose-language-service` language servers +- Adds `hadolint` linter diff --git a/lua/astrocommunity/pack/docker/docker.lua b/lua/astrocommunity/pack/docker/docker.lua new file mode 100644 index 000000000..e6892aac3 --- /dev/null +++ b/lua/astrocommunity/pack/docker/docker.lua @@ -0,0 +1,12 @@ +local utils = require "astronvim.utils" +return { + { + "williamboman/mason-lspconfig.nvim", + opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, + "docker-compose-language-service", "dockerfile-language-server") end, + }, + { + "jay-babu/mason-null-ls.nvim", + opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "hadolint") end, + }, +} From ea078aa8e1731b2503b92d26d75283f0fa9a25ea Mon Sep 17 00:00:00 2001 From: Souravpakhira Date: Tue, 9 May 2023 15:15:57 +0530 Subject: [PATCH 2/5] feat: added docker pack feat: added docker pack --- lua/astrocommunity/pack/docker/docker.lua | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lua/astrocommunity/pack/docker/docker.lua b/lua/astrocommunity/pack/docker/docker.lua index e6892aac3..e9873f396 100644 --- a/lua/astrocommunity/pack/docker/docker.lua +++ b/lua/astrocommunity/pack/docker/docker.lua @@ -1,12 +1,15 @@ local utils = require "astronvim.utils" return { - { - "williamboman/mason-lspconfig.nvim", - opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, - "docker-compose-language-service", "dockerfile-language-server") end, - }, - { - "jay-babu/mason-null-ls.nvim", - opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "hadolint") end, - }, + { + "williamboman/mason-lspconfig.nvim", + opts = function(_, opts) + opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "docker-compose-language-service", "dockerfile-language-server") + end, + }, + { + "jay-babu/mason-null-ls.nvim", + opts = function(_, opts) + opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "hadolint") + end, + }, } From 73e105b0e918a9c511d8e4321be0dd2abdb3694d Mon Sep 17 00:00:00 2001 From: Sourav Pakhira Date: Tue, 9 May 2023 21:25:45 +0530 Subject: [PATCH 3/5] feat: added docker pack --- lua/astrocommunity/pack/docker/docker.lua | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/lua/astrocommunity/pack/docker/docker.lua b/lua/astrocommunity/pack/docker/docker.lua index e9873f396..f7a9c91a8 100644 --- a/lua/astrocommunity/pack/docker/docker.lua +++ b/lua/astrocommunity/pack/docker/docker.lua @@ -1,15 +1,14 @@ local utils = require "astronvim.utils" return { - { - "williamboman/mason-lspconfig.nvim", - opts = function(_, opts) - opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "docker-compose-language-service", "dockerfile-language-server") - end, - }, - { - "jay-babu/mason-null-ls.nvim", - opts = function(_, opts) - opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "hadolint") - end, - }, + { + "williamboman/mason-lspconfig.nvim", + opts = function(_, opts) + opts.ensure_installed = + utils.list_insert_unique(opts.ensure_installed, "docker-compose-language-service", "dockerfile-language-server") + end, + }, + { + "jay-babu/mason-null-ls.nvim", + opts = function(_, opts) opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "hadolint") end, + }, } From af447ed3234be2402c8e9003aa41a4a6a448c716 Mon Sep 17 00:00:00 2001 From: Sourav Pakhira Date: Tue, 9 May 2023 21:36:05 +0530 Subject: [PATCH 4/5] feat: added docker pack --- lua/astrocommunity/pack/docker/docker.lua | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lua/astrocommunity/pack/docker/docker.lua b/lua/astrocommunity/pack/docker/docker.lua index f7a9c91a8..7f3e097f7 100644 --- a/lua/astrocommunity/pack/docker/docker.lua +++ b/lua/astrocommunity/pack/docker/docker.lua @@ -1,10 +1,20 @@ local utils = require "astronvim.utils" return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if opts.ensure_installed ~= "all" then + opts.ensure_installed = utils.list_insert_unique(opts.ensure_installed, "dockerfile") + end + end, + }, { "williamboman/mason-lspconfig.nvim", opts = function(_, opts) - opts.ensure_installed = - utils.list_insert_unique(opts.ensure_installed, "docker-compose-language-service", "dockerfile-language-server") + opts.ensure_installed = utils.list_insert_unique( + opts.ensure_installed, + { "docker-compose-language-service", "dockerfile-language-server" } + ) end, }, { From e20f659d029342635e64d62bf11d62d3f38f8930 Mon Sep 17 00:00:00 2001 From: Sourav Pakhira Date: Tue, 9 May 2023 21:44:35 +0530 Subject: [PATCH 5/5] feat: added docker pack --- lua/astrocommunity/pack/docker/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/astrocommunity/pack/docker/README.md b/lua/astrocommunity/pack/docker/README.md index c334c6d61..e52547008 100644 --- a/lua/astrocommunity/pack/docker/README.md +++ b/lua/astrocommunity/pack/docker/README.md @@ -2,5 +2,6 @@ This plugin pack does the following: +- Adds `dockerfile` Treesitter parser - Adds `dockerfile-language-server` and `docker-compose-language-service` language servers - Adds `hadolint` linter