From 5e9c28e42ba4e1f68d3e9940a2d3253c88ea30ea Mon Sep 17 00:00:00 2001 From: Edoardo Viviani Date: Thu, 29 Aug 2024 11:39:41 +0200 Subject: [PATCH] feat: add plugins, enable relative numbers add barbar, git-blame and nvim-web-devicons plugins. enable both absolute and relative line numbers --- init.lua | 7 +++++-- lua/custom/plugins/barbar.lua | 12 ++++++++++++ lua/custom/plugins/git-blame.lua | 10 ++++++++++ lua/custom/plugins/nvim-web-devicons.lua | 4 ++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 lua/custom/plugins/barbar.lua create mode 100644 lua/custom/plugins/git-blame.lua create mode 100644 lua/custom/plugins/nvim-web-devicons.lua diff --git a/init.lua b/init.lua index 13c8143d..e3eb3aff 100644 --- a/init.lua +++ b/init.lua @@ -102,7 +102,10 @@ vim.g.have_nerd_font = false vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true + +-- Display both absolute and relative line number +vim.o.statuscolumn = '%s %l %r ' -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -929,7 +932,7 @@ require('lazy').setup({ -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the diff --git a/lua/custom/plugins/barbar.lua b/lua/custom/plugins/barbar.lua new file mode 100644 index 00000000..6e4c0755 --- /dev/null +++ b/lua/custom/plugins/barbar.lua @@ -0,0 +1,12 @@ +return { + 'romgrk/barbar.nvim', + dependencies = { + 'lewis6991/gitsigns.nvim', + 'nvim-tree/nvim-web-devicons', + }, + init = function() + vim.g.barbar_auto_setup = false + end, + opts = {}, + version = '^1.0.0', +} diff --git a/lua/custom/plugins/git-blame.lua b/lua/custom/plugins/git-blame.lua new file mode 100644 index 00000000..7c282090 --- /dev/null +++ b/lua/custom/plugins/git-blame.lua @@ -0,0 +1,10 @@ +return { + 'f-person/git-blame.nvim', + event = 'VeryLazy', + opts = { + enabled = true, + message_template = ' , ', + date_format = '%d/%m/%y %H:%M', + virtual_text_column = 1, + }, +} diff --git a/lua/custom/plugins/nvim-web-devicons.lua b/lua/custom/plugins/nvim-web-devicons.lua new file mode 100644 index 00000000..cf591465 --- /dev/null +++ b/lua/custom/plugins/nvim-web-devicons.lua @@ -0,0 +1,4 @@ +return { + 'nvim-tree/nvim-web-devicons', + enabled = true, +}