refactor
This commit is contained in:
@@ -4,152 +4,166 @@ local installPath = DATA_PATH..'/site/pack/packer/start/packer.nvim'
|
||||
-- install packer if it's not installed already
|
||||
local packerBootstrap = nil
|
||||
if fn.empty(fn.glob(installPath)) > 0 then
|
||||
packerBootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', installPath})
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
packerBootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', installPath})
|
||||
vim.cmd [[packadd packer.nvim]]
|
||||
end
|
||||
|
||||
local packer = require('packer').startup(function(use)
|
||||
-- Packer should manage itself
|
||||
use 'wbthomason/packer.nvim'
|
||||
-- Packer should manage itself
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
-- colorscheme
|
||||
use { 'catppuccin/nvim', as = 'catppuccin' }
|
||||
use 'rebelot/kanagawa.nvim'
|
||||
use 'nvim-tree/nvim-web-devicons'
|
||||
-- colorscheme
|
||||
use { 'catppuccin/nvim', as = 'catppuccin' }
|
||||
use 'rebelot/kanagawa.nvim'
|
||||
use 'nvim-tree/nvim-web-devicons'
|
||||
|
||||
-- QUALITY OF LIFE INTEGRATIONS
|
||||
-- QUALITY OF LIFE INTEGRATIONS
|
||||
|
||||
-- git integration
|
||||
use {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
requires = {
|
||||
'nvim-lua/plenary.nvim'
|
||||
-- git integration
|
||||
use {
|
||||
'lewis6991/gitsigns.nvim',
|
||||
requires = { 'nvim-lua/plenary.nvim' },
|
||||
config = require('plugin-config/gitsigns'),
|
||||
}
|
||||
}
|
||||
|
||||
use 'tpope/vim-fugitive'
|
||||
use 'tpope/vim-fugitive'
|
||||
|
||||
-- speedy searching
|
||||
use 'ggandor/leap.nvim'
|
||||
|
||||
-- telescope - searching / navigation
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = { {'nvim-lua/plenary.nvim'} }
|
||||
}
|
||||
|
||||
-- better hotfix window (for showing and searching through results in telescope's find usages)
|
||||
use 'kevinhwang91/nvim-bqf'
|
||||
|
||||
-- better highlighting
|
||||
use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
|
||||
use 'nvim-treesitter/nvim-treesitter-context'
|
||||
|
||||
-- better split navigation
|
||||
use 'mrjones2014/smart-splits.nvim'
|
||||
|
||||
-- gorbit's codewindow
|
||||
use {
|
||||
'gorbit99/codewindow.nvim',
|
||||
config = function()
|
||||
local codewindow = require('codewindow')
|
||||
codewindow.setup()
|
||||
codewindow.apply_default_keybinds()
|
||||
end,
|
||||
}
|
||||
|
||||
-- nerd commenter
|
||||
use 'scrooloose/nerdcommenter'
|
||||
|
||||
-- nice diagnostic pane on the bottom
|
||||
use 'folke/trouble.nvim'
|
||||
|
||||
-- better LSP UI (for code actions, rename etc.)
|
||||
use({
|
||||
"glepnir/lspsaga.nvim",
|
||||
branch = "main",
|
||||
config = function()
|
||||
require("lspsaga").setup({})
|
||||
end,
|
||||
})
|
||||
|
||||
-- better find and replace
|
||||
use 'windwp/nvim-spectre'
|
||||
|
||||
|
||||
-- VISUAL CHANGES
|
||||
|
||||
-- start page
|
||||
use 'echasnovski/mini.starter'
|
||||
|
||||
-- nicer looking tab display
|
||||
use 'lukas-reineke/indent-blankline.nvim'
|
||||
use 'echasnovski/mini.indentscope'
|
||||
|
||||
-- statusline
|
||||
use 'ojroques/nvim-hardline'
|
||||
|
||||
-- UX improvements
|
||||
use({
|
||||
"folke/noice.nvim",
|
||||
requires = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"rcarriga/nvim-notify",
|
||||
-- speedy searching
|
||||
use {
|
||||
'ggandor/leap.nvim',
|
||||
config = require('leap').add_default_mappings(),
|
||||
}
|
||||
})
|
||||
use 'stevearc/dressing.nvim'
|
||||
|
||||
use 'rcarriga/nvim-notify'
|
||||
-- telescope - searching / navigation
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = { 'nvim-lua/plenary.nvim' },
|
||||
config = require('plugin-config/telescope'),
|
||||
}
|
||||
|
||||
-- better hotfix window (for showing and searching through results in telescope's find usages)
|
||||
use 'kevinhwang91/nvim-bqf'
|
||||
|
||||
-- better highlighting
|
||||
use {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = ':TSUpdate',
|
||||
config = require('plugin-config/nvim-treesitter'),
|
||||
}
|
||||
use 'nvim-treesitter/nvim-treesitter-context'
|
||||
|
||||
-- better split navigation
|
||||
use {
|
||||
'mrjones2014/smart-splits.nvim',
|
||||
config = require('plugin-config/smart-splits'),
|
||||
}
|
||||
-- gorbit's codewindow
|
||||
use {
|
||||
'gorbit99/codewindow.nvim',
|
||||
config = function()
|
||||
local codewindow = require('codewindow')
|
||||
codewindow.setup()
|
||||
codewindow.apply_default_keybinds()
|
||||
end,
|
||||
}
|
||||
|
||||
-- nerd commenter
|
||||
use 'scrooloose/nerdcommenter'
|
||||
|
||||
-- nice diagnostic pane on the bottom
|
||||
use {
|
||||
'folke/trouble.nvim',
|
||||
config = require('plugin-config/lsp-trouble'),
|
||||
}
|
||||
|
||||
-- better LSP UI (for code actions, rename etc.)
|
||||
use {
|
||||
"glepnir/lspsaga.nvim",
|
||||
branch = "main",
|
||||
config = require('plugin-config/lspsaga'),
|
||||
}
|
||||
|
||||
-- better find and replace
|
||||
use 'windwp/nvim-spectre'
|
||||
|
||||
|
||||
-- FUNCTIONAL CODING STUFF
|
||||
-- VISUAL CHANGES
|
||||
|
||||
-- lsp config
|
||||
use {
|
||||
"williamboman/mason.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
}
|
||||
-- start page
|
||||
use {
|
||||
'echasnovski/mini.starter',
|
||||
config = require('plugin-config/ministarter'),
|
||||
}
|
||||
|
||||
-- for LSP autocompletion
|
||||
use 'hrsh7th/nvim-cmp'
|
||||
use 'hrsh7th/cmp-nvim-lsp'
|
||||
use 'hrsh7th/cmp-buffer'
|
||||
use 'hrsh7th/cmp-path'
|
||||
use 'hrsh7th/cmp-cmdline'
|
||||
-- nicer looking tab display
|
||||
use {
|
||||
'lukas-reineke/indent-blankline.nvim',
|
||||
config = require("indent_blankline").setup {
|
||||
char = "│",
|
||||
filetype_exclude = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy" },
|
||||
},
|
||||
}
|
||||
|
||||
-- this will automatically install listed dependencies
|
||||
-- only the first time NeoVim is opened, because that's when Packer gets installed
|
||||
if packerBootstrap then
|
||||
require('packer').sync()
|
||||
end
|
||||
use {
|
||||
'echasnovski/mini.indentscope',
|
||||
require('mini.indentscope').setup {
|
||||
symbol = "│",
|
||||
options = { try_as_border = true },
|
||||
},
|
||||
}
|
||||
|
||||
-- statusline
|
||||
use {
|
||||
'ojroques/nvim-hardline',
|
||||
require('hardline').setup({}),
|
||||
}
|
||||
|
||||
-- UX improvements
|
||||
use {
|
||||
"folke/noice.nvim",
|
||||
requires = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"rcarriga/nvim-notify",
|
||||
},
|
||||
config = require('plugin-config/noice')
|
||||
}
|
||||
|
||||
use {
|
||||
'stevearc/dressing.nvim',
|
||||
config = require('plugin-config/dressing'),
|
||||
}
|
||||
|
||||
use 'rcarriga/nvim-notify'
|
||||
|
||||
|
||||
-- FUNCTIONAL CODING STUFF
|
||||
|
||||
-- lsp config
|
||||
use {
|
||||
"williamboman/mason.nvim",
|
||||
requires = {
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
"neovim/nvim-lspconfig",
|
||||
},
|
||||
}
|
||||
|
||||
-- for LSP autocompletion
|
||||
use {
|
||||
'hrsh7th/nvim-cmp',
|
||||
requires = {
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-cmdline',
|
||||
},
|
||||
config = require('plugin-config/nvim-cmp'),
|
||||
}
|
||||
|
||||
-- this will automatically install listed dependencies
|
||||
-- only the first time NeoVim is opened, because that's when Packer gets installed
|
||||
if packerBootstrap then
|
||||
require('packer').sync()
|
||||
end
|
||||
end)
|
||||
|
||||
-- SIMPLE PLUGIN CONFIGURATION
|
||||
require('leap').add_default_mappings()
|
||||
require("indent_blankline").setup {
|
||||
char = "│",
|
||||
filetype_exclude = { "help", "alpha", "dashboard", "neo-tree", "Trouble", "lazy" },
|
||||
--show_current_context = true,
|
||||
--show_current_context_start = true,
|
||||
}
|
||||
require('mini.indentscope').setup({
|
||||
symbol = "│",
|
||||
options = { try_as_border = true },
|
||||
})
|
||||
require('hardline').setup {}
|
||||
|
||||
-- MORE VERBOSE PLUGIN CONFIGS
|
||||
require('plugin-config/nvim-cmp')
|
||||
require('plugin-config/telescope')
|
||||
require('plugin-config/nvim-treesitter')
|
||||
require('plugin-config/lsp-trouble')
|
||||
require('plugin-config/lspsaga')
|
||||
require('plugin-config/gitsigns')
|
||||
require('plugin-config/indent-guide-lines')
|
||||
require('plugin-config/dressing')
|
||||
require('plugin-config/noice')
|
||||
require('plugin-config/ministarter')
|
||||
require('plugin-config/smart-splits')
|
||||
|
||||
return packer
|
||||
|
||||
Reference in New Issue
Block a user