restructure nvim plugins

main
Steffen Rademacker 1 year ago
parent 62316d2cbd
commit ebc69d3c19

@ -1,6 +1,12 @@
-- using folke/lazy.nvim as package manager
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
-- small helper function for loading external plugin config files
local function get_config (key)
return function() require('config/' .. key) end
end
-- ensure lazy being loaded
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
'git', 'clone', '--filter=blob:none',
@ -20,48 +26,24 @@ require('lazy').setup({
-- The colorscheme of choice
{ 'ellisonleao/gruvbox.nvim', priority = 1000 },
-- plugins that need no further config/dependencies, non-lua plugins
'AndrewRadev/splitjoin.vim',
'christoomey/vim-tmux-navigator',
'editorconfig/editorconfig-vim',
'tpope/vim-ragtag',
'tpope/vim-repeat',
'wincent/terminus',
-- lua plugins using just the plain default config
{ 'numToStr/Comment.nvim', config = true },
{ 'windwp/nvim-autopairs', config = true },
{ 'lewis6991/gitsigns.nvim', config = true },
{ -- Treesitter for nicer syntax-highlighting
-- TODO: telescope vs. fzf integration
-- modern neovim with treesitter, lsp, null-ls and cmp
-- remember to install all those tools since we do not use mason
-- see ../../install/3_vimux.sh
{ 'neovim/nvim-lspconfig', init = get_config('lspconfig') },
{
'nvim-treesitter/nvim-treesitter',
init = get_config('treesitter'),
build = ':TSUpdate',
init = function() require('config/treesitter') end,
},
{
'nvim-treesitter/nvim-treesitter-textobjects',
dependencies = { 'nvim-treesitter/nvim-treesitter' },
},
{ -- textobjects, surround, for stuff like cs", cib etc.
'ur4ltz/surround.nvim',
opts = { mappings_style = 'surround' },
},
{ -- lsp and null-ls for diagnostics and formatting (eslint_d, stylelint etc.)
-- remember to install all those tools in the cli, see ../../install/3_vimux.sh
'neovim/nvim-lspconfig',
init = function() require('config/lspconfig') end,
},
{
'jose-elias-alvarez/null-ls.nvim',
init = get_config('null-ls'),
dependencies = { 'nvim-lua/plenary.nvim' },
init = function() require('config/null-ls') end,
},
{ -- autocompletion and snippets
{
'hrsh7th/nvim-cmp',
init = get_config('cmp'),
dependencies = {
'andersevenrud/cmp-tmux',
'hrsh7th/cmp-buffer',
@ -69,32 +51,47 @@ require('lazy').setup({
'hrsh7th/cmp-calc',
'hrsh7th/cmp-nvim-lsp',
'hrsh7th/cmp-path',
'hrsh7th/cmp-vsnip',
},
init = function() require('config/cmp') end,
},
{
'hrsh7th/vim-vsnip',
init = function() require('config/vsnip') end,
},
{
'rafamadriz/friendly-snippets',
dependencies = {
'hrsh7th/vim-vsnip',
'hrsh7th/cmp-vsnip', -- see snippet engine of choice below
},
},
{ -- floating-terminal integration for nnn, lazygit etc.
'voldikss/vim-floaterm',
init = function() require('config/floaterm') end,
},
-- snippet engine of choice
{ 'hrsh7th/vim-vsnip', init = get_config('vsnip') },
{ 'rafamadriz/friendly-snippets', dependencies = { 'hrsh7th/vim-vsnip' } },
-- editing enhancements
{ 'AndrewRadev/splitjoin.vim' },
{ 'echasnovski/mini.ai', version = '*' },
{ 'numToStr/Comment.nvim', config = true },
{ 'tpope/vim-ragtag' },
{ 'tpope/vim-repeat' },
{ 'ur4ltz/surround.nvim', opts = { mappings_style = 'surround' } },
{ 'windwp/nvim-autopairs', config = true },
-- git and other external tools integration
{ 'christoomey/vim-tmux-navigator'},
{ 'editorconfig/editorconfig-vim' },
{ 'ibhagwan/fzf-lua', dependencies = { 'kyazdani42/nvim-web-devicons' }, init = get_config('fzf') },
{ 'lewis6991/gitsigns.nvim', config = true },
{ 'voldikss/vim-floaterm', init = get_config('floaterm') },
{ 'wincent/terminus' },
{ -- fzf integration
'ibhagwan/fzf-lua',
-- ui enhancements / navigation
{ -- nice popup messages
'rcarriga/nvim-notify',
init = function() vim.notify = require('notify') end
},
{ -- a nice status line
'nvim-lualine/lualine.nvim',
dependencies = { 'kyazdani42/nvim-web-devicons' },
init = function() require('config/fzf') end,
event = 'VimEnter',
opts = { options = { theme = 'gruvbox' } },
},
{ -- easy jump navigation
'ggandor/leap.nvim',
event = 'BufReadPre',
init = function() require('leap').set_default_keymaps() end,
},
{ -- colorizer for nice css-colors
'norcalli/nvim-colorizer.lua',
event = 'BufReadPre',
@ -107,28 +104,8 @@ require('lazy').setup({
},
},
{ -- nice status line
'nvim-lualine/lualine.nvim',
dependencies = { 'kyazdani42/nvim-web-devicons' },
event = 'VimEnter',
opts = { options = { theme = 'gruvbox' } },
},
{ -- leap for stupidly nice navigation
'ggandor/leap.nvim',
event = 'BufReadPre',
init = function() require('leap').set_default_keymaps() end,
},
-- Evaluating...
{
'rcarriga/nvim-notify',
init = function() vim.notify = require('notify') end,
},
{
'folke/trouble.nvim',
dependencies = { 'kyazdani42/nvim-web-devicons' },
},
{ 'folke/trouble.nvim', dependencies = { 'kyazdani42/nvim-web-devicons' } },
{
'nvim-neorg/neorg',
build = ':Neorg sync-parsers',

Loading…
Cancel
Save