From 9d1bfea5a4bba45aca9ee35a1bde8ad6655038b5 Mon Sep 17 00:00:00 2001 From: gmcmillan82 Date: Mon, 13 May 2024 19:26:19 +0200 Subject: [PATCH] Add plugins and customizations --- init.lua | 6 +++--- lua/custom/plugins/catppuccin.lua | 7 +++++++ lua/custom/plugins/init.lua | 20 ++++++++++++++++++- lua/custom/plugins/neogit.lua | 18 +++++++++++++++++ lua/custom/plugins/noice.lua | 18 +++++++++++++++++ lua/custom/plugins/telescope-file-browser.lua | 6 ++++++ lua/custom/plugins/trouble.lua | 11 ++++++++++ 7 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 lua/custom/plugins/catppuccin.lua create mode 100644 lua/custom/plugins/neogit.lua create mode 100644 lua/custom/plugins/noice.lua create mode 100644 lua/custom/plugins/telescope-file-browser.lua create mode 100644 lua/custom/plugins/trouble.lua diff --git a/init.lua b/init.lua index 88658ef3..5a8287a6 100644 --- a/init.lua +++ b/init.lua @@ -566,8 +566,8 @@ require('lazy').setup({ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { -- clangd = {}, - -- gopls = {}, - -- pyright = {}, + gopls = {}, + pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -885,7 +885,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/catppuccin.lua b/lua/custom/plugins/catppuccin.lua new file mode 100644 index 00000000..a8f69156 --- /dev/null +++ b/lua/custom/plugins/catppuccin.lua @@ -0,0 +1,7 @@ +return { + { + 'catppuccin/nvim', + name = 'catppuccin', + priority = 1000, + }, +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8..e76a911a 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,22 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + vim.keymap.set('n', 'fb', ':Telescope file_browser path=%:p:h select_buffer=true'), + vim.keymap.set('n', 'ng', ':Neogit cwd=%:p:h'), + + require('mini.surround').setup(), + + require('mini.pairs').setup(), + + require('mini.indentscope').setup { + options = { try_as_border = true }, + symbol = '│', + draw = { + delay = 200, + animation = function() + return 1 + end, + }, + }, +} diff --git a/lua/custom/plugins/neogit.lua b/lua/custom/plugins/neogit.lua new file mode 100644 index 00000000..a85a48a3 --- /dev/null +++ b/lua/custom/plugins/neogit.lua @@ -0,0 +1,18 @@ +return { + { + 'NeogitOrg/neogit', + dependencies = { + 'nvim-lua/plenary.nvim', -- required + 'sindrets/diffview.nvim', -- optional - Diff integration + + -- Only one of these is needed, not both. + 'nvim-telescope/telescope.nvim', -- optional + }, + config = function() + require('neogit').setup { + kind = 'split', + integrations = { diffview = true }, + } + end, + }, +} diff --git a/lua/custom/plugins/noice.lua b/lua/custom/plugins/noice.lua new file mode 100644 index 00000000..7e3de12f --- /dev/null +++ b/lua/custom/plugins/noice.lua @@ -0,0 +1,18 @@ +return { + -- lazy.nvim + { + 'folke/noice.nvim', + event = 'VeryLazy', + opts = { + -- add any options here + }, + dependencies = { + -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries + 'MunifTanjim/nui.nvim', + -- OPTIONAL: + -- `nvim-notify` is only needed, if you want to use the notification view. + -- If not available, we use `mini` as the fallback + 'rcarriga/nvim-notify', + }, + }, +} diff --git a/lua/custom/plugins/telescope-file-browser.lua b/lua/custom/plugins/telescope-file-browser.lua new file mode 100644 index 00000000..e9b130a1 --- /dev/null +++ b/lua/custom/plugins/telescope-file-browser.lua @@ -0,0 +1,6 @@ +return { + { + 'nvim-telescope/telescope-file-browser.nvim', + dependencies = { 'nvim-telescope/telescope.nvim', 'nvim-lua/plenary.nvim' }, + }, +} diff --git a/lua/custom/plugins/trouble.lua b/lua/custom/plugins/trouble.lua new file mode 100644 index 00000000..97eb8e93 --- /dev/null +++ b/lua/custom/plugins/trouble.lua @@ -0,0 +1,11 @@ +return { + { + 'folke/trouble.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + lazy = true, + }, + }, +}