From 3f24417060cc951faf311ccd421621b7725cb25c Mon Sep 17 00:00:00 2001 From: Dennis Chan Date: Fri, 25 Apr 2025 16:01:20 +0800 Subject: [PATCH] move git blame plugin to custom plugins --- init.lua | 23 ++++------------------- lua/custom/plugins/init.lua | 24 +++++++++++++++++++----- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/init.lua b/init.lua index 8fa70c7a..4ecb710b 100644 --- a/init.lua +++ b/init.lua @@ -154,6 +154,7 @@ vim.opt.rtp:prepend(lazypath) -- -- NOTE: Here is where you install your plugins. require('lazy').setup({ + -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically 'github/copilot.vim', -- GitHub Copilot @@ -372,25 +373,6 @@ require('lazy').setup({ end, }, - -- Git Blame Plugin - { - 'f-person/git-blame.nvim', - -- load the plugin at startup - event = 'VeryLazy', - -- Because of the keys part, you will be lazy loading this plugin. - -- The plugin will only load once one of the keys is used. - -- If you want to load the plugin at startup, add something like event = "VeryLazy", - -- or lazy = false. One of both options will work. - opts = { - -- your configuration comes here - -- for example - enabled = true, -- if you want to enable the plugin - message_template = ' ', -- template for the blame message, check the Message template section for more options - date_format = '%Y-%m-%d %H:%M', -- template for the date, check Date format section for more options - virtual_text_column = 1, -- virtual text start column, check Start virtual text at column section for more options - }, - }, - -- LSP Plugins { -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins @@ -934,6 +916,9 @@ require('lazy').setup({ -- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart -- + + require 'custom.plugins', + -- Here are some example plugins that I've included in the Kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8..958e1477 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -1,5 +1,19 @@ --- You can add your own plugins here or in other files in this directory! --- I promise not to create any merge conflicts in this directory :) --- --- See the kickstart.nvim README for more information -return {} +return { -- Git Blame Plugin + { + 'f-person/git-blame.nvim', + -- load the plugin at startup + event = 'VeryLazy', + -- Because of the keys part, you will be lazy loading this plugin. + -- The plugin will only load once one of the keys is used. + -- If you want to load the plugin at startup, add something like event = "VeryLazy", + -- or lazy = false. One of both options will work. + opts = { + -- your configuration comes here + -- for example + enabled = true, -- if you want to enable the plugin + message_template = ' ', -- template for the blame message, check the Message template section for more options + date_format = '%Y-%m-%d %H:%M', -- template for the date, check Date format section for more options + virtual_text_column = 1, -- virtual text start column, check Start virtual text at column section for more options + }, + }, +}