From c1f1003dc4ebc31dc859c654d574bcc491700f48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20La=C3=ADn?= Date: Thu, 16 Nov 2023 14:57:26 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor(nvim):=20treesitt?= =?UTF-8?q?er=20modules=20extracted=20into=20extras?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lua/plugins/extras/coding/endwise.lua | 4 ++++ .../lua/plugins/extras/coding/puppeteer.lua | 5 ++++ .../lua/plugins/extras/editor/rest-client.lua | 8 +++++++ .config/nvim/lua/plugins/treesitter.lua | 23 ------------------- 4 files changed, 17 insertions(+), 23 deletions(-) create mode 100644 .config/nvim/lua/plugins/extras/coding/endwise.lua create mode 100644 .config/nvim/lua/plugins/extras/coding/puppeteer.lua delete mode 100644 .config/nvim/lua/plugins/treesitter.lua diff --git a/.config/nvim/lua/plugins/extras/coding/endwise.lua b/.config/nvim/lua/plugins/extras/coding/endwise.lua new file mode 100644 index 00000000..416b1d91 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/coding/endwise.lua @@ -0,0 +1,4 @@ +return { + "RRethy/nvim-treesitter-endwise", + event = "BufRead", +} diff --git a/.config/nvim/lua/plugins/extras/coding/puppeteer.lua b/.config/nvim/lua/plugins/extras/coding/puppeteer.lua new file mode 100644 index 00000000..d06759e6 --- /dev/null +++ b/.config/nvim/lua/plugins/extras/coding/puppeteer.lua @@ -0,0 +1,5 @@ +return { + "chrisgrieser/nvim-puppeteer", + dependencies = "nvim-treesitter/nvim-treesitter", + lazy = false, +} diff --git a/.config/nvim/lua/plugins/extras/editor/rest-client.lua b/.config/nvim/lua/plugins/extras/editor/rest-client.lua index c7519163..d66bb0ee 100644 --- a/.config/nvim/lua/plugins/extras/editor/rest-client.lua +++ b/.config/nvim/lua/plugins/extras/editor/rest-client.lua @@ -1,4 +1,12 @@ return { + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + if type(opts.ensure_installed) == "table" then + vim.list_extend(opts.ensure_installed, { "http" }) + end + end, + }, { "rest-nvim/rest.nvim", dependencies = { diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua deleted file mode 100644 index 42f2119e..00000000 --- a/.config/nvim/lua/plugins/treesitter.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - { - "nvim-treesitter/nvim-treesitter", - ---@type TSConfig - ---@diagnostic disable-next-line: missing-fields - opts = { - endwise = { enable = true }, - ensure_installed = { - "http", - "ini", - }, - }, - }, - { - "RRethy/nvim-treesitter-endwise", - event = "BufRead", - }, - { - "chrisgrieser/nvim-puppeteer", - dependencies = "nvim-treesitter/nvim-treesitter", - lazy = false, - }, -}