From ebd899d3d35bfe6eb8626bcadcc78c2cb45dee8b Mon Sep 17 00:00:00 2001 From: Christoph Wagner Date: Tue, 26 Mar 2024 20:55:35 +0100 Subject: [PATCH] init basic packages --- init.lua | 5 +++-- lua/basic/plugins/colorizer.lua | 5 +++++ lua/basic/plugins/lazygit.lua | 15 +++++++++++++++ lua/basic/plugins/oil.lua | 22 ++++++++++++++++++++++ lua/basic/plugins/tabular.lua | 3 +++ lua/basic/plugins/todo.lua | 11 +++++++++++ lua/basic/plugins/trouble.lua | 12 ++++++++++++ 7 files changed, 71 insertions(+), 2 deletions(-) create mode 100644 lua/basic/plugins/colorizer.lua create mode 100644 lua/basic/plugins/lazygit.lua create mode 100644 lua/basic/plugins/oil.lua create mode 100644 lua/basic/plugins/tabular.lua create mode 100644 lua/basic/plugins/todo.lua create mode 100644 lua/basic/plugins/trouble.lua diff --git a/init.lua b/init.lua index 013fcc29..162f618f 100644 --- a/init.lua +++ b/init.lua @@ -540,7 +540,7 @@ require('lazy').setup({ local servers = { -- clangd = {}, -- gopls = {}, - -- pyright = {}, + pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -836,7 +836,8 @@ 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' }, + { import = 'basic.plugins' }, }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the diff --git a/lua/basic/plugins/colorizer.lua b/lua/basic/plugins/colorizer.lua new file mode 100644 index 00000000..8824ea3b --- /dev/null +++ b/lua/basic/plugins/colorizer.lua @@ -0,0 +1,5 @@ +return { + { + 'norcalli/nvim-colorizer.lua', + }, +} diff --git a/lua/basic/plugins/lazygit.lua b/lua/basic/plugins/lazygit.lua new file mode 100644 index 00000000..497c3fea --- /dev/null +++ b/lua/basic/plugins/lazygit.lua @@ -0,0 +1,15 @@ +return { + 'kdheepak/lazygit.nvim', + cmd = { + 'LazyGit', + 'LazyGitConfig', + 'LazyGitCurrentFile', + 'LazyGitFilter', + 'LazyGitFilterCurrentFile', + }, + -- optional for floating window border decoration + dependencies = { + 'nvim-lua/plenary.nvim', + }, + vim.keymap.set('n', 'lg', 'LazyGit'), +} diff --git a/lua/basic/plugins/oil.lua b/lua/basic/plugins/oil.lua new file mode 100644 index 00000000..5cf3f4b6 --- /dev/null +++ b/lua/basic/plugins/oil.lua @@ -0,0 +1,22 @@ +return { + { + 'stevearc/oil.nvim', + opts = {}, + -- Optional dependencies + dependencies = { 'nvim-tree/nvim-web-devicons' }, + config = function() + require('oil').setup { + columns = { + { 'mtime', format = '%y-%m-%d %T' }, + { 'size', highlight = 'Special' }, + 'icon', + }, + view_options = { + show_hidden = true, + }, + } + end, + }, + + vim.keymap.set('n', 'so', ':Oil'), +} diff --git a/lua/basic/plugins/tabular.lua b/lua/basic/plugins/tabular.lua new file mode 100644 index 00000000..ad477397 --- /dev/null +++ b/lua/basic/plugins/tabular.lua @@ -0,0 +1,3 @@ +return { + 'godlygeek/tabular', +} diff --git a/lua/basic/plugins/todo.lua b/lua/basic/plugins/todo.lua new file mode 100644 index 00000000..f9c3faff --- /dev/null +++ b/lua/basic/plugins/todo.lua @@ -0,0 +1,11 @@ +return { + { + 'folke/todo-comments.nvim', + dependencies = { 'nvim-lua/plenary.nvim' }, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + }, + }, +} diff --git a/lua/basic/plugins/trouble.lua b/lua/basic/plugins/trouble.lua new file mode 100644 index 00000000..e5db1a9d --- /dev/null +++ b/lua/basic/plugins/trouble.lua @@ -0,0 +1,12 @@ +return { + 'folke/trouble.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons' }, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + }, + vim.keymap.set('n', 'xx', function() + require('trouble').toggle() + end), +}