chore: move plugins to init.lua or per-plugin files
This commit is contained in:
		
							
								
								
									
										7
									
								
								lua/plugins/circles.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								lua/plugins/circles.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
return {
 | 
			
		||||
  'projekt0n/circles.nvim',
 | 
			
		||||
  dependencies = { 'nvim-tree/nvim-web-devicons' },
 | 
			
		||||
  opts = {
 | 
			
		||||
    icons = { empty = '●', filled = '○', lsp_prefix = '●' },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
@@ -1,148 +0,0 @@
 | 
			
		||||
return {
 | 
			
		||||
  -- NOTE: Theme
 | 
			
		||||
  {
 | 
			
		||||
    'sainnhe/gruvbox-material',
 | 
			
		||||
    priority = 1000,
 | 
			
		||||
    lazy = false,
 | 
			
		||||
    config = function()
 | 
			
		||||
      vim.g.gruvbox_material_background = 'soft'
 | 
			
		||||
      vim.g.gruvbox_material_better_performance = 1
 | 
			
		||||
      vim.g.gruvbox_material_enable_italic = 1
 | 
			
		||||
 | 
			
		||||
      vim.cmd.colorscheme 'gruvbox-material'
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- NOTE: First, some plugins that don't require any configuration
 | 
			
		||||
 | 
			
		||||
  -- Git related plugins
 | 
			
		||||
  'tpope/vim-fugitive',
 | 
			
		||||
  'tpope/vim-rhubarb',
 | 
			
		||||
 | 
			
		||||
  -- Detect tabstop and shiftwidth automatically
 | 
			
		||||
  'tpope/vim-sleuth',
 | 
			
		||||
 | 
			
		||||
  -- NOTE: Second, plugins that require setup call (done via opts)
 | 
			
		||||
 | 
			
		||||
  -- Useful plugin to show you pending keybinds.
 | 
			
		||||
  { 'folke/which-key.nvim', opts = {} },
 | 
			
		||||
 | 
			
		||||
  -- "gc" to comment visual regions/lines
 | 
			
		||||
  { 'numToStr/Comment.nvim', opts = {} },
 | 
			
		||||
 | 
			
		||||
  -- colorize in files
 | 
			
		||||
  { 'norcalli/nvim-colorizer.lua', opts = {} },
 | 
			
		||||
 | 
			
		||||
  -- autopairs on newline
 | 
			
		||||
  { 'windwp/nvim-autopairs', opts = {} },
 | 
			
		||||
 | 
			
		||||
  -- highlighting for comments
 | 
			
		||||
  { 'folke/todo-comments.nvim', dependencies = 'nvim-lua/plenary.nvim', opts = {} },
 | 
			
		||||
 | 
			
		||||
  -- cargo crates
 | 
			
		||||
  { 'saecki/crates.nvim', dependencies = 'nvim-lua/plenary.nvim', opts = {} },
 | 
			
		||||
 | 
			
		||||
  --
 | 
			
		||||
  {
 | 
			
		||||
    'stevearc/oil.nvim',
 | 
			
		||||
    dependencies = { 'nvim-tree/nvim-web-devicons' },
 | 
			
		||||
    config = function()
 | 
			
		||||
      require('oil').setup()
 | 
			
		||||
      vim.keymap.set('n', '-', require('oil').open, { desc = 'Open parent directory' })
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- newage search plugin
 | 
			
		||||
  {
 | 
			
		||||
    'ggandor/leap.nvim',
 | 
			
		||||
    dependencies = { 'tpope/vim-repeat' },
 | 
			
		||||
    config = function()
 | 
			
		||||
      require('leap').add_default_mappings()
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- permanent links to fileranges
 | 
			
		||||
  {
 | 
			
		||||
    'ruifm/gitlinker.nvim',
 | 
			
		||||
    config = function()
 | 
			
		||||
      require('gitlinker').setup {
 | 
			
		||||
        callbacks = {
 | 
			
		||||
          ['git.aflabs.org'] = require('gitlinker.hosts').get_gitlab_type_url,
 | 
			
		||||
        },
 | 
			
		||||
      }
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  -- NOTE: Third, plugins that require some setup, but not enugh for separate file
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    -- Adds git releated signs to the gutter, as well as utilities for managing changes
 | 
			
		||||
    'lewis6991/gitsigns.nvim',
 | 
			
		||||
    opts = {
 | 
			
		||||
      -- See `:help gitsigns.txt`
 | 
			
		||||
      signs = {
 | 
			
		||||
        add = { text = '+' },
 | 
			
		||||
        change = { text = '~' },
 | 
			
		||||
        delete = { text = '_' },
 | 
			
		||||
        topdelete = { text = '‾' },
 | 
			
		||||
        changedelete = { text = '~' },
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    -- Set lualine as statusline
 | 
			
		||||
    'nvim-lualine/lualine.nvim',
 | 
			
		||||
    -- See `:help lualine.txt`
 | 
			
		||||
    opts = {
 | 
			
		||||
      options = {
 | 
			
		||||
        icons_enabled = false,
 | 
			
		||||
        theme = 'gruvbox-material',
 | 
			
		||||
        statusline_style = 'mix',
 | 
			
		||||
        component_separators = '|',
 | 
			
		||||
        section_separators = '',
 | 
			
		||||
      },
 | 
			
		||||
      sections = {
 | 
			
		||||
        lualine_c = {
 | 
			
		||||
          {
 | 
			
		||||
            'filename',
 | 
			
		||||
            file_status = true,
 | 
			
		||||
            path = 1,
 | 
			
		||||
          },
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    -- Add indentation guides even on blank lines
 | 
			
		||||
    'lukas-reineke/indent-blankline.nvim',
 | 
			
		||||
    -- Enable `lukas-reineke/indent-blankline.nvim`
 | 
			
		||||
    -- See `:help indent_blankline.txt`
 | 
			
		||||
    opts = {
 | 
			
		||||
      char = '┊',
 | 
			
		||||
      show_trailing_blankline_indent = false,
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    -- git blame annotations
 | 
			
		||||
    'f-person/git-blame.nvim',
 | 
			
		||||
    init = function()
 | 
			
		||||
      -- disable on startup
 | 
			
		||||
      vim.g.gitblame_enabled = 0
 | 
			
		||||
    end,
 | 
			
		||||
    config = function()
 | 
			
		||||
      vim.api.nvim_set_keymap('n', '<leader>gt', ':GitBlameToggle<CR>', { desc = '[G]it Blame [T]oggle', noremap = true })
 | 
			
		||||
      vim.api.nvim_set_keymap('n', '<leader>gu', ':GitBlameOpenCommitURL<CR>', { desc = '[G]it Blame Open Commit [U]rl', noremap = true })
 | 
			
		||||
    end,
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  {
 | 
			
		||||
    'projekt0n/circles.nvim',
 | 
			
		||||
    dependencies = { 'nvim-tree/nvim-web-devicons' },
 | 
			
		||||
    opts = {
 | 
			
		||||
      icons = { empty = '●', filled = '○', lsp_prefix = '●' },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										12
									
								
								lua/plugins/gitblame.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								lua/plugins/gitblame.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
return {
 | 
			
		||||
  -- git blame annotations
 | 
			
		||||
  'f-person/git-blame.nvim',
 | 
			
		||||
  init = function()
 | 
			
		||||
    -- disable on startup
 | 
			
		||||
    vim.g.gitblame_enabled = 0
 | 
			
		||||
  end,
 | 
			
		||||
  config = function()
 | 
			
		||||
    vim.api.nvim_set_keymap('n', '<leader>gt', ':GitBlameToggle<CR>', { desc = '[G]it Blame [T]oggle', noremap = true })
 | 
			
		||||
    vim.api.nvim_set_keymap('n', '<leader>gu', ':GitBlameOpenCommitURL<CR>', { desc = '[G]it Blame Open Commit [U]rl', noremap = true })
 | 
			
		||||
  end,
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										10
									
								
								lua/plugins/gitlinker.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								lua/plugins/gitlinker.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
return {
 | 
			
		||||
  'ruifm/gitlinker.nvim',
 | 
			
		||||
  config = function()
 | 
			
		||||
    require('gitlinker').setup {
 | 
			
		||||
      callbacks = {
 | 
			
		||||
        ['git.aflabs.org'] = require('gitlinker.hosts').get_gitlab_type_url,
 | 
			
		||||
      },
 | 
			
		||||
    }
 | 
			
		||||
  end,
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										14
									
								
								lua/plugins/gitsigns.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								lua/plugins/gitsigns.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
			
		||||
return {
 | 
			
		||||
  -- Adds git releated signs to the gutter, as well as utilities for managing changes
 | 
			
		||||
  'lewis6991/gitsigns.nvim',
 | 
			
		||||
  opts = {
 | 
			
		||||
    -- See `:help gitsigns.txt`
 | 
			
		||||
    signs = {
 | 
			
		||||
      add = { text = '+' },
 | 
			
		||||
      change = { text = '~' },
 | 
			
		||||
      delete = { text = '_' },
 | 
			
		||||
      topdelete = { text = '‾' },
 | 
			
		||||
      changedelete = { text = '~' },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										10
									
								
								lua/plugins/indent_blankline.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								lua/plugins/indent_blankline.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
return {
 | 
			
		||||
  -- Add indentation guides even on blank lines
 | 
			
		||||
  'lukas-reineke/indent-blankline.nvim',
 | 
			
		||||
  -- Enable `lukas-reineke/indent-blankline.nvim`
 | 
			
		||||
  -- See `:help indent_blankline.txt`
 | 
			
		||||
  opts = {
 | 
			
		||||
    char = '┊',
 | 
			
		||||
    show_trailing_blankline_indent = false,
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										7
									
								
								lua/plugins/leap.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								lua/plugins/leap.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
return {
 | 
			
		||||
  'ggandor/leap.nvim',
 | 
			
		||||
  dependencies = { 'tpope/vim-repeat' },
 | 
			
		||||
  config = function()
 | 
			
		||||
    require('leap').add_default_mappings()
 | 
			
		||||
  end,
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										21
									
								
								lua/plugins/lualine.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								lua/plugins/lualine.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
return {
 | 
			
		||||
  'nvim-lualine/lualine.nvim',
 | 
			
		||||
  opts = {
 | 
			
		||||
    options = {
 | 
			
		||||
      icons_enabled = false,
 | 
			
		||||
      theme = 'gruvbox-material',
 | 
			
		||||
      statusline_style = 'mix',
 | 
			
		||||
      component_separators = '|',
 | 
			
		||||
      section_separators = '',
 | 
			
		||||
    },
 | 
			
		||||
    sections = {
 | 
			
		||||
      lualine_c = {
 | 
			
		||||
        {
 | 
			
		||||
          'filename',
 | 
			
		||||
          file_status = true,
 | 
			
		||||
          path = 1,
 | 
			
		||||
        },
 | 
			
		||||
      },
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										8
									
								
								lua/plugins/oil.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								lua/plugins/oil.lua
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
return {
 | 
			
		||||
  'stevearc/oil.nvim',
 | 
			
		||||
  dependencies = { 'nvim-tree/nvim-web-devicons' },
 | 
			
		||||
  config = function()
 | 
			
		||||
    require('oil').setup()
 | 
			
		||||
    vim.keymap.set('n', '-', require('oil').open, { desc = 'Open parent directory' })
 | 
			
		||||
  end,
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user