Skip to content

Commit

Permalink
plugin.ts-context-commentstring: Setup as standalone plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
fitrh committed Nov 24, 2023
1 parent ed5d1a5 commit 2eb7154
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions lua/config/plugin/packer.lua
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
vim.cmd.packadd("packer.nvim")

local function spec(name)
return require("config.plugin." .. name .. ".packerspec")
end

local plugins = {
{ "nvim-lua/plenary.nvim", module = "plenary" },
{ "ray-x/lsp_signature.nvim", module = "lsp_signature" },
{ "b0o/schemastore.nvim", ft = { "json", "jsonc" } },
require("config.plugin.treesitter.packerspec"),
require("config.plugin.treesitter-context.packerspec"),
spec("ts-context-commentstring"),
require("config.plugin.lspconfig.packerspec"),
require("config.plugin.clangd_extensions.packerspec"),
require("config.plugin.jdtls.packerspec"),
Expand Down
4 changes: 0 additions & 4 deletions lua/config/plugin/treesitter/packerspec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,5 @@ return {
"nvim-treesitter/nvim-treesitter-textobjects",
after = "nvim-treesitter",
},
{
"JoosepAlviste/nvim-ts-context-commentstring",
after = "nvim-treesitter",
},
{ "windwp/nvim-ts-autotag", after = "nvim-treesitter" },
}
3 changes: 0 additions & 3 deletions lua/config/plugin/treesitter/setup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ config.setup({
},
},

-- nvim-ts-context-commentstring
context_commentstring = { enable = true },

-- nvim-ts-autotag
autotag = { enable = true },
})
7 changes: 7 additions & 0 deletions lua/config/plugin/ts-context-commentstring/packerspec.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
return {
"JoosepAlviste/nvim-ts-context-commentstring",
after = "nvim-treesitter",
setup = function()
vim.api.nvim_set_var("skip_ts_context_commentstring_module", true)
end,
}

0 comments on commit 2eb7154

Please # to comment.