From 91a5fc10e69cd601a800c5cf0b07b5213952b8fc Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Thu, 6 Jun 2024 12:24:00 +0200 Subject: [PATCH] feat(extras): added new `git` extra with treesitter and issue/pr support --- lua/lazyvim/plugins/extras/lang/git.lua | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lua/lazyvim/plugins/extras/lang/git.lua diff --git a/lua/lazyvim/plugins/extras/lang/git.lua b/lua/lazyvim/plugins/extras/lang/git.lua new file mode 100644 index 00000000..3c8b8fdd --- /dev/null +++ b/lua/lazyvim/plugins/extras/lang/git.lua @@ -0,0 +1,25 @@ +return { + -- Treesitter git support + { + "nvim-treesitter/nvim-treesitter", + opts = function(_, opts) + opts.ensure_installed = opts.ensure_installed or {} + vim.list_extend(opts.ensure_installed, { "git_config", "gitcommit", "git_rebase", "gitignore", "gitattributes" }) + end, + }, + + { + "nvim-cmp", + dependencies = { + { + "petertriho/cmp-git", + opts = {}, + }, + }, + ---@module 'cmp' + ---@param opts cmp.ConfigSchema + opts = function(_, opts) + table.insert(opts.sources, { name = "git" }) + end, + }, +}