refactor(nvim): use Lazy package manager instead of packer
This commit is contained in:
parent
e6d158f54e
commit
485c8024f6
@ -1,5 +1 @@
|
|||||||
local loaded, impatient = pcall(require, 'impatient')
|
|
||||||
if loaded then
|
|
||||||
impatient.enable_profile()
|
|
||||||
end
|
|
||||||
require('main')
|
require('main')
|
||||||
|
@ -29,20 +29,18 @@ local header = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Subheader, plugin count
|
-- Subheader, plugin count
|
||||||
local get_plugins = function()
|
local get_plugin_info = function()
|
||||||
local num_plugins_loaded = #vim.fn.globpath(vim.fn.stdpath('data') .. '/site/pack/packer/start', '*', 0, 1)
|
if require("lazy.status").has_updates() then
|
||||||
local num_plugins_total = #vim.tbl_keys(packer_plugins)
|
return "Plugin updates available, check :Lazy"
|
||||||
if num_plugins_total <= 1 then
|
|
||||||
return num_plugins_loaded .. ' / ' .. num_plugins_total .. ' plugin loaded'
|
|
||||||
else
|
else
|
||||||
return num_plugins_loaded .. ' / ' .. num_plugins_total .. ' plugins loaded'
|
return "All plugins up to date"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local plugin_count = {
|
local plugin_info = {
|
||||||
type = 'text',
|
type = 'text',
|
||||||
val = {
|
val = {
|
||||||
get_plugins(),
|
get_plugin_info()
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
hl = 'Comment',
|
hl = 'Comment',
|
||||||
@ -87,7 +85,7 @@ local buttons = {
|
|||||||
button('f', ' Find File', ':Telescope find_files<CR>'),
|
button('f', ' Find File', ':Telescope find_files<CR>'),
|
||||||
button('r', ' Recent', ':Telescope oldfiles<CR>'),
|
button('r', ' Recent', ':Telescope oldfiles<CR>'),
|
||||||
button('s', ' Settings', ':e ~/.config/nvim/<CR>'),
|
button('s', ' Settings', ':e ~/.config/nvim/<CR>'),
|
||||||
button('u', ' Update Plugins', ':PackerSync<CR>'),
|
button('u', ' Update Plugins', ':Lazy sync<CR>'),
|
||||||
button('q', ' Quit', ':qa<CR>'),
|
button('q', ' Quit', ':qa<CR>'),
|
||||||
},
|
},
|
||||||
opts = {
|
opts = {
|
||||||
@ -113,7 +111,7 @@ local opts = {
|
|||||||
padding(),
|
padding(),
|
||||||
header,
|
header,
|
||||||
padding(),
|
padding(),
|
||||||
plugin_count,
|
plugin_info,
|
||||||
padding(),
|
padding(),
|
||||||
buttons,
|
buttons,
|
||||||
padding(),
|
padding(),
|
||||||
|
@ -130,7 +130,12 @@ lualine.setup({
|
|||||||
},
|
},
|
||||||
|
|
||||||
-- Right
|
-- Right
|
||||||
lualine_x = {},
|
lualine_x = {
|
||||||
|
{
|
||||||
|
require("lazy.status").updates,
|
||||||
|
cond = require("lazy.status").has_updates,
|
||||||
|
},
|
||||||
|
},
|
||||||
lualine_y = {
|
lualine_y = {
|
||||||
{
|
{
|
||||||
"buffers",
|
"buffers",
|
||||||
|
@ -183,34 +183,6 @@ vim.keymap.set(
|
|||||||
{ silent = true, desc = "Gitsigns: Unstage Hunk" }
|
{ silent = true, desc = "Gitsigns: Unstage Hunk" }
|
||||||
)
|
)
|
||||||
|
|
||||||
-- Packer Mappings
|
|
||||||
local packer = require("packer")
|
|
||||||
local packer_sync = function()
|
|
||||||
vim.notify("Syncing packer.", "info", {
|
|
||||||
title = "Packer",
|
|
||||||
})
|
|
||||||
local snap_shot_time = tostring(os.date("!%Y-%m-%dT%TZ"))
|
|
||||||
packer.snapshot(snap_shot_time)
|
|
||||||
packer.sync()
|
|
||||||
end
|
|
||||||
|
|
||||||
local packer_compile = function()
|
|
||||||
vim.notify("Compiling packer.", "info", {
|
|
||||||
title = "Packer",
|
|
||||||
})
|
|
||||||
packer.compile()
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>ps", packer_sync, {
|
|
||||||
silent = true,
|
|
||||||
desc = "Packer: Sync",
|
|
||||||
})
|
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>pc", packer_compile, {
|
|
||||||
silent = true,
|
|
||||||
desc = "Packer: Compile",
|
|
||||||
})
|
|
||||||
|
|
||||||
-- Hop Mappings
|
-- Hop Mappings
|
||||||
local hop = require("hop")
|
local hop = require("hop")
|
||||||
|
|
||||||
|
@ -1,61 +1,49 @@
|
|||||||
local fn = vim.fn
|
|
||||||
local utils = require("utils.funcs")
|
|
||||||
|
|
||||||
-- Packer strap, install packer automatically and configure plugins
|
-- Packer strap, install packer automatically and configure plugins
|
||||||
-- See the end of this file for how the variable `packer_strap` gets used
|
-- See the end of this file for how the variable `packer_strap` gets used
|
||||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
PACKER_STRAP = fn.system({
|
vim.notify("Installing Lazy plugin manager, please wait...")
|
||||||
|
vim.fn.system({
|
||||||
"git",
|
"git",
|
||||||
"clone",
|
"clone",
|
||||||
"--depth",
|
"--filter=blob:none",
|
||||||
"1",
|
"--single-branch",
|
||||||
"https://github.com/wbthomason/packer.nvim",
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
install_path,
|
lazypath,
|
||||||
})
|
})
|
||||||
-- Update the runtime so packer can be used
|
|
||||||
vim.o.runtimepath = vim.fn.stdpath("data") .. "/site/pack/*/start/*," .. vim.o.runtimepath
|
|
||||||
end
|
end
|
||||||
|
vim.opt.runtimepath:prepend(lazypath)
|
||||||
|
|
||||||
local packer = require("packer")
|
local lazy = require("lazy")
|
||||||
|
|
||||||
packer.init({
|
|
||||||
max_jobs = 20,
|
|
||||||
})
|
|
||||||
|
|
||||||
return packer.startup({
|
|
||||||
function(use)
|
|
||||||
-- Performance boost on startup
|
|
||||||
-- keep at top of plugins
|
|
||||||
use({ "lewis6991/impatient.nvim" })
|
|
||||||
|
|
||||||
|
lazy.setup({
|
||||||
-- Packer Itself
|
-- Packer Itself
|
||||||
use({ "wbthomason/packer.nvim" })
|
{ "wbthomason/packer.nvim" },
|
||||||
|
|
||||||
-- Commonly used library
|
-- Commonly used library
|
||||||
use({
|
{
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Much nicer ui, integrates cmdheight = 0 wella
|
-- Much nicer ui, integrates cmdheight = 0 wella
|
||||||
use({
|
{
|
||||||
"folke/noice.nvim",
|
"folke/noice.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
-- NOTE: Might be redundant, to check later
|
-- NOTE: Might be redundant, to check later
|
||||||
require("plugins.configs.nvim-notify")
|
require("plugins.configs.nvim-notify")
|
||||||
require("plugins.configs.noice")
|
require("plugins.configs.noice")
|
||||||
end,
|
end,
|
||||||
requires = {
|
dependencies = {
|
||||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
"rcarriga/nvim-notify",
|
"rcarriga/nvim-notify",
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Color schemes
|
-- Color schemes
|
||||||
use({ "folke/tokyonight.nvim" })
|
{ "folke/tokyonight.nvim" },
|
||||||
use({
|
{
|
||||||
"EdenEast/nightfox.nvim",
|
"EdenEast/nightfox.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("nightfox").setup({
|
require("nightfox").setup({
|
||||||
@ -65,42 +53,42 @@ return packer.startup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
use({
|
{
|
||||||
"rebelot/kanagawa.nvim",
|
"rebelot/kanagawa.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs.kanagawa")
|
require("plugins.configs.kanagawa")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Icons for folders, files, etc.
|
-- Icons for folders, files, etc.
|
||||||
use({
|
{
|
||||||
"kyazdani42/nvim-web-devicons",
|
"kyazdani42/nvim-web-devicons",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Statusline.
|
-- Statusline.
|
||||||
use({
|
{
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs.statusline")
|
require("plugins.configs.statusline")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Indentation Guides
|
-- Indentation Guides
|
||||||
use({
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs.indent-blankline")
|
require("plugins.configs.indent-blankline")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Treesitter
|
-- Treesitter
|
||||||
use({
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
run = ":TSUpdate",
|
build = ":TSUpdate",
|
||||||
requires = {
|
dependencies = {
|
||||||
"p00f/nvim-ts-rainbow",
|
"p00f/nvim-ts-rainbow",
|
||||||
"nvim-treesitter/nvim-treesitter-context",
|
"nvim-treesitter/nvim-treesitter-context",
|
||||||
},
|
},
|
||||||
@ -108,9 +96,9 @@ return packer.startup({
|
|||||||
require("plugins.configs.treesitter")
|
require("plugins.configs.treesitter")
|
||||||
end,
|
end,
|
||||||
before = "folke/noice.nvim",
|
before = "folke/noice.nvim",
|
||||||
})
|
},
|
||||||
|
|
||||||
use({
|
{
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
after = { "nvim-treesitter" },
|
after = { "nvim-treesitter" },
|
||||||
config = function()
|
config = function()
|
||||||
@ -167,10 +155,10 @@ return packer.startup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Highlight given color codes
|
-- Highlight given color codes
|
||||||
use({
|
{
|
||||||
"brenoprata10/nvim-highlight-colors",
|
"brenoprata10/nvim-highlight-colors",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
config = function()
|
config = function()
|
||||||
@ -179,43 +167,43 @@ return packer.startup({
|
|||||||
render = "background",
|
render = "background",
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Dashboard when no file is given to nvim
|
-- Dashboard when no file is given to nvim
|
||||||
|
|
||||||
use({
|
{
|
||||||
"goolord/alpha-nvim",
|
"goolord/alpha-nvim",
|
||||||
requires = { "kyazdani42/nvim-web-devicons" },
|
dependencies = { "kyazdani42/nvim-web-devicons" },
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs.alpha")
|
require("plugins.configs.alpha")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Telescope
|
-- Telescope
|
||||||
use({
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
requires = {
|
dependencies = {
|
||||||
"nvim-telescope/telescope-media-files.nvim",
|
"nvim-telescope/telescope-media-files.nvim",
|
||||||
"nvim-telescope/telescope-file-browser.nvim",
|
"nvim-telescope/telescope-file-browser.nvim",
|
||||||
"artart222/telescope_find_directories",
|
"artart222/telescope_find_directories",
|
||||||
"nvim-telescope/telescope-ui-select.nvim",
|
"nvim-telescope/telescope-ui-select.nvim",
|
||||||
{ "nvim-telescope/telescope-smart-history.nvim", requires = "tami5/sqlite.lua" },
|
{ "nvim-telescope/telescope-smart-history.nvim", dependencies = "tami5/sqlite.lua" },
|
||||||
{ "nvim-telescope/telescope-fzf-native.nvim", run = "make" },
|
{ "nvim-telescope/telescope-fzf-native.nvim", build = "make" },
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs.telescope-nvim")
|
require("plugins.configs.telescope-nvim")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
use({
|
{
|
||||||
"stevearc/dressing.nvim",
|
"stevearc/dressing.nvim",
|
||||||
})
|
},
|
||||||
|
|
||||||
-- File Tree
|
-- File Tree
|
||||||
use({
|
{
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
branch = "v2.x",
|
branch = "v2.x",
|
||||||
requires = {
|
dependencies = {
|
||||||
"kyazdani42/nvim-web-devicons",
|
"kyazdani42/nvim-web-devicons",
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
@ -224,12 +212,12 @@ return packer.startup({
|
|||||||
require("plugins.configs.neotree")
|
require("plugins.configs.neotree")
|
||||||
end,
|
end,
|
||||||
cmd = "Neotree",
|
cmd = "Neotree",
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Lspconfig
|
-- Lspconfig
|
||||||
use({
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
requires = {
|
dependencies = {
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"folke/neodev.nvim",
|
"folke/neodev.nvim",
|
||||||
"Decodetalkers/csharpls-extended-lsp.nvim",
|
"Decodetalkers/csharpls-extended-lsp.nvim",
|
||||||
@ -241,62 +229,63 @@ return packer.startup({
|
|||||||
"b0o/schemastore.nvim",
|
"b0o/schemastore.nvim",
|
||||||
},
|
},
|
||||||
after = "noice.nvim",
|
after = "noice.nvim",
|
||||||
|
event = "BufEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("mason").setup({})
|
require("mason").setup({})
|
||||||
require("plugins.configs.lsp")
|
require("plugins.configs.lsp")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Incremental rename, easier to view renames
|
-- Incremental rename, easier to view renames
|
||||||
use({
|
{
|
||||||
"https://github.com/smjonas/inc-rename.nvim.git",
|
"smjonas/inc-rename.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("inc_rename").setup({})
|
require("inc_rename").setup({})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Better LSP Virtual Text Lines
|
-- Better LSP Virtual Text Lines
|
||||||
use({
|
{
|
||||||
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("lsp_lines").setup()
|
require("lsp_lines").setup()
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Lsp From Null LS
|
-- Lsp From Null LS
|
||||||
use({
|
{
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs.null_ls")
|
require("plugins.configs.null_ls")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Autopairs
|
-- Autopairs
|
||||||
use({
|
{
|
||||||
"windwp/nvim-autopairs",
|
"windwp/nvim-autopairs",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-autopairs").setup()
|
require("nvim-autopairs").setup()
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Snippets
|
-- Snippets
|
||||||
use({
|
{
|
||||||
"rafamadriz/friendly-snippets",
|
"rafamadriz/friendly-snippets",
|
||||||
config = function()
|
config = function()
|
||||||
require("luasnip.loaders.from_vscode").lazy_load()
|
require("luasnip.loaders.from_vscode").lazy_load()
|
||||||
end,
|
end,
|
||||||
requires = {
|
dependencies = {
|
||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
"https://github.com/saadparwaiz1/cmp_luasnip",
|
"saadparwaiz1/cmp_luasnip",
|
||||||
},
|
},
|
||||||
after = "LuaSnip",
|
after = "LuaSnip",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Code completion
|
-- Code completion
|
||||||
use({
|
{
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
requires = {
|
dependencies = {
|
||||||
"hrsh7th/cmp-nvim-lsp",
|
"hrsh7th/cmp-nvim-lsp",
|
||||||
"hrsh7th/cmp-path",
|
"hrsh7th/cmp-path",
|
||||||
"hrsh7th/cmp-cmdline",
|
"hrsh7th/cmp-cmdline",
|
||||||
@ -314,80 +303,80 @@ return packer.startup({
|
|||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs._cmp")
|
require("plugins.configs._cmp")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
use({
|
{
|
||||||
"tzachar/cmp-fuzzy-buffer",
|
"tzachar/cmp-fuzzy-buffer",
|
||||||
requires = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" },
|
dependencies = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" },
|
||||||
})
|
},
|
||||||
use({ "tzachar/cmp-fuzzy-path", requires = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } })
|
{ "tzachar/cmp-fuzzy-path", dependencies = { "hrsh7th/nvim-cmp", "tzachar/fuzzy.nvim" } },
|
||||||
use({
|
{
|
||||||
"saecki/crates.nvim",
|
"saecki/crates.nvim",
|
||||||
event = { "BufRead Cargo.toml" },
|
event = { "BufRead Cargo.toml" },
|
||||||
requires = { { "nvim-lua/plenary.nvim" } },
|
dependencies = { { "nvim-lua/plenary.nvim" } },
|
||||||
config = function()
|
config = function()
|
||||||
require("crates").setup()
|
require("crates").setup()
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- DAP, debugger
|
-- DAP, debugger
|
||||||
use({
|
{
|
||||||
"mfussenegger/nvim-dap",
|
"mfussenegger/nvim-dap",
|
||||||
config = function()
|
config = function()
|
||||||
require("dap.ext.vscode").load_launchjs()
|
require("dap.ext.vscode").load_launchjs()
|
||||||
require("plugins.configs._dap")
|
require("plugins.configs._dap")
|
||||||
end,
|
end,
|
||||||
after = "nvim-notify",
|
after = "nvim-notify",
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Python debugger, dapinstall does not play nice with debugpy
|
-- Python debugger, dapinstall does not play nice with debugpy
|
||||||
use({
|
{
|
||||||
"mfussenegger/nvim-dap-python",
|
"mfussenegger/nvim-dap-python",
|
||||||
after = "nvim-dap",
|
after = "nvim-dap",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs.python-dap")
|
require("plugins.configs.python-dap")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Virtual Text for DAP
|
-- Virtual Text for DAP
|
||||||
use({
|
{
|
||||||
"theHamsta/nvim-dap-virtual-text",
|
"theHamsta/nvim-dap-virtual-text",
|
||||||
after = "nvim-dap",
|
after = "nvim-dap",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-dap-virtual-text").setup({})
|
require("nvim-dap-virtual-text").setup({})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Fancy ui for dap
|
-- Fancy ui for dap
|
||||||
use({
|
{
|
||||||
"rcarriga/nvim-dap-ui",
|
"rcarriga/nvim-dap-ui",
|
||||||
after = "nvim-dap",
|
after = "nvim-dap",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs.dap-ui")
|
require("plugins.configs.dap-ui")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Code formatting
|
-- Code formatting
|
||||||
use({
|
{
|
||||||
"sbdchd/neoformat",
|
"sbdchd/neoformat",
|
||||||
cmd = "Neoformat",
|
cmd = "Neoformat",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs.neoformat")
|
require("plugins.configs.neoformat")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
use({
|
{
|
||||||
"anuvyklack/pretty-fold.nvim",
|
"anuvyklack/pretty-fold.nvim",
|
||||||
requires = "anuvyklack/nvim-keymap-amend",
|
dependencies = "anuvyklack/nvim-keymap-amend",
|
||||||
config = function()
|
config = function()
|
||||||
require("pretty-fold").setup({
|
require("pretty-fold").setup({
|
||||||
fill_char = " ",
|
fill_char = " ",
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Git signs
|
-- Git signs
|
||||||
use({
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("gitsigns").setup({
|
require("gitsigns").setup({
|
||||||
@ -397,52 +386,51 @@ return packer.startup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Highlight certain comments, TODO, BUG, etc.
|
-- Highlight certain comments, TODO, BUG, etc.
|
||||||
use({
|
{
|
||||||
"folke/todo-comments.nvim",
|
"folke/todo-comments.nvim",
|
||||||
event = "BufEnter",
|
event = "BufEnter",
|
||||||
config = function()
|
config = function()
|
||||||
require("todo-comments").setup({})
|
require("todo-comments").setup({})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Show possible key bindings during typing
|
-- Show possible key bindings during typing
|
||||||
use({
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("which-key").setup({})
|
require("which-key").setup({})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Create full path if not existing on write
|
-- Create full path if not existing on write
|
||||||
use({
|
{
|
||||||
"jghauser/mkdir.nvim",
|
"jghauser/mkdir.nvim",
|
||||||
cmd = "new",
|
|
||||||
config = function()
|
config = function()
|
||||||
require("mkdir")
|
require("mkdir")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Text commenting
|
-- Text commenting
|
||||||
use({
|
{
|
||||||
"terrortylor/nvim-comment",
|
"terrortylor/nvim-comment",
|
||||||
cmd = "CommentToggle",
|
cmd = "CommentToggle",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim_comment").setup()
|
require("nvim_comment").setup()
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Move selections with alt+movement key
|
-- Move selections with alt+movement key
|
||||||
use({
|
{
|
||||||
"matze/vim-move",
|
"matze/vim-move",
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Register support in telescope with persistent save
|
-- Register support in telescope with persistent save
|
||||||
use({
|
{
|
||||||
"AckslD/nvim-neoclip.lua",
|
"AckslD/nvim-neoclip.lua",
|
||||||
requires = {
|
dependencies = {
|
||||||
{ "tami5/sqlite.lua", module = "sqlite" },
|
{ "tami5/sqlite.lua", module = "sqlite" },
|
||||||
{ "nvim-telescope/telescope.nvim" },
|
{ "nvim-telescope/telescope.nvim" },
|
||||||
},
|
},
|
||||||
@ -451,21 +439,21 @@ return packer.startup({
|
|||||||
enable_persistent_history = true,
|
enable_persistent_history = true,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Markdown Previewer
|
-- Markdown Previewer
|
||||||
use({
|
{
|
||||||
"iamcco/markdown-preview.nvim",
|
"iamcco/markdown-preview.nvim",
|
||||||
run = "cd app && npm install",
|
build = "cd app && npm install",
|
||||||
setup = function()
|
init = function()
|
||||||
vim.g.mkdp_filetypes = { "markdown" }
|
vim.g.mkdp_filetypes = { "markdown" }
|
||||||
vim.g.mkdp_browser = "firefox-developer-edition"
|
vim.g.mkdp_browser = "firefox-developer-edition"
|
||||||
end,
|
end,
|
||||||
ft = { "markdown" },
|
ft = { "markdown" },
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Better Git integration
|
-- Better Git integration
|
||||||
use({
|
{
|
||||||
"TimUntersberger/neogit",
|
"TimUntersberger/neogit",
|
||||||
config = function()
|
config = function()
|
||||||
require("neogit").setup({
|
require("neogit").setup({
|
||||||
@ -476,68 +464,68 @@ return packer.startup({
|
|||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
event = "BufWinEnter",
|
event = "BufWinEnter",
|
||||||
requires = {
|
dependencies = {
|
||||||
"sindrets/diffview.nvim",
|
"sindrets/diffview.nvim",
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Ansible Syntax Highlighting
|
-- Ansible Syntax Highlighting
|
||||||
use({
|
{
|
||||||
"pearofducks/ansible-vim",
|
"pearofducks/ansible-vim",
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Better search display
|
-- Better search display
|
||||||
use({
|
{
|
||||||
"kevinhwang91/nvim-hlslens",
|
"kevinhwang91/nvim-hlslens",
|
||||||
module = "hlslens",
|
module = "hlslens",
|
||||||
keys = "/",
|
keys = "/",
|
||||||
config = function()
|
config = function()
|
||||||
require("hlslens").setup()
|
require("hlslens").setup()
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Note Taking
|
-- Note Taking
|
||||||
use({
|
{
|
||||||
"nvim-neorg/neorg",
|
"nvim-neorg/neorg",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs._neorg")
|
require("plugins.configs._neorg")
|
||||||
end,
|
end,
|
||||||
requires = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-neorg/neorg-telescope",
|
"nvim-neorg/neorg-telescope",
|
||||||
},
|
},
|
||||||
after = "nvim-treesitter",
|
after = "nvim-treesitter",
|
||||||
ft = "norg",
|
ft = "norg",
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Log Syntax Highlighting
|
-- Log Syntax Highlighting
|
||||||
use({
|
{
|
||||||
"MTDL9/vim-log-highlighting",
|
"MTDL9/vim-log-highlighting",
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Lots of small modules pulled into
|
-- Lots of small modules pulled into
|
||||||
-- one git repository
|
-- one git repository
|
||||||
use({
|
{
|
||||||
"echasnovski/mini.nvim",
|
"echasnovski/mini.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("mini.cursorword").setup({})
|
require("mini.cursorword").setup({})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Smoother Scrolling
|
-- Smoother Scrolling
|
||||||
use({
|
{
|
||||||
"karb94/neoscroll.nvim",
|
"karb94/neoscroll.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("neoscroll").setup({
|
require("neoscroll").setup({
|
||||||
easing_function = "circular",
|
easing_function = "circular",
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Generate function/class/etc annotations
|
-- Generate function/class/etc annotations
|
||||||
use({
|
{
|
||||||
"danymat/neogen",
|
"danymat/neogen",
|
||||||
requires = "nvim-treesitter/nvim-treesitter",
|
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||||
config = function()
|
config = function()
|
||||||
require("neogen").setup({
|
require("neogen").setup({
|
||||||
snippet_engine = "luasnip",
|
snippet_engine = "luasnip",
|
||||||
@ -550,20 +538,20 @@ return packer.startup({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Multiple cursor/multiple visual selection support
|
-- Multiple cursor/multiple visual selection support
|
||||||
use({
|
{
|
||||||
"mg979/vim-visual-multi",
|
"mg979/vim-visual-multi",
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Editorconfig support
|
-- Editorconfig support
|
||||||
use({
|
{
|
||||||
"gpanders/editorconfig.nvim",
|
"gpanders/editorconfig.nvim",
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Maintain last cursor position in files
|
-- Maintain last cursor position in files
|
||||||
use({
|
{
|
||||||
"ethanholz/nvim-lastplace",
|
"ethanholz/nvim-lastplace",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-lastplace").setup({
|
require("nvim-lastplace").setup({
|
||||||
@ -572,25 +560,25 @@ return packer.startup({
|
|||||||
lastplace_open_folds = true,
|
lastplace_open_folds = true,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Diagnose startup time
|
-- Diagnose startup time
|
||||||
use({ "dstein64/vim-startuptime" })
|
{ "dstein64/vim-startuptime" },
|
||||||
|
|
||||||
-- More codeactions
|
-- More codeactions
|
||||||
use({
|
{
|
||||||
"ThePrimeagen/refactoring.nvim",
|
"ThePrimeagen/refactoring.nvim",
|
||||||
requires = {
|
dependencies = {
|
||||||
{ "nvim-lua/plenary.nvim" },
|
{ "nvim-lua/plenary.nvim" },
|
||||||
{ "nvim-treesitter/nvim-treesitter" },
|
{ "nvim-treesitter/nvim-treesitter" },
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Http Request Support
|
-- Http Request Support
|
||||||
use({
|
{
|
||||||
"NTBBloodbath/rest.nvim",
|
"NTBBloodbath/rest.nvim",
|
||||||
requires = {
|
dependencies = {
|
||||||
"https://github.com/nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local rest_nvim = require("rest-nvim")
|
local rest_nvim = require("rest-nvim")
|
||||||
@ -599,12 +587,12 @@ return packer.startup({
|
|||||||
skip_ssl_verification = true,
|
skip_ssl_verification = true,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Allows repeating actions and more
|
-- Allows repeating actions and more
|
||||||
use({
|
{
|
||||||
"anuvyklack/hydra.nvim",
|
"anuvyklack/hydra.nvim",
|
||||||
requires = {
|
dependencies = {
|
||||||
"anuvyklack/keymap-layer.nvim",
|
"anuvyklack/keymap-layer.nvim",
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
"jbyuki/venn.nvim",
|
"jbyuki/venn.nvim",
|
||||||
@ -613,27 +601,27 @@ return packer.startup({
|
|||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs.hydra")
|
require("plugins.configs.hydra")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Faster motions
|
-- Faster motions
|
||||||
use({
|
{
|
||||||
"phaazon/hop.nvim",
|
"phaazon/hop.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
-- you can configure Hop the way you like here; see :h hop-config
|
-- you can configure Hop the way you like here; see :h hop-config
|
||||||
require("hop").setup({ keys = "etovxqpdygfblzhckisuran" })
|
require("hop").setup({ keys = "etovxqpdygfblzhckisuran" })
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Surround actions
|
-- Surround actions
|
||||||
use({
|
{
|
||||||
"kylechui/nvim-surround",
|
"kylechui/nvim-surround",
|
||||||
config = function()
|
config = function()
|
||||||
require("nvim-surround").setup({})
|
require("nvim-surround").setup({})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Better list continuation
|
-- Better list continuation
|
||||||
use({
|
{
|
||||||
"gaoDean/autolist.nvim",
|
"gaoDean/autolist.nvim",
|
||||||
ft = {
|
ft = {
|
||||||
"markdown",
|
"markdown",
|
||||||
@ -644,10 +632,10 @@ return packer.startup({
|
|||||||
config = function()
|
config = function()
|
||||||
require("autolist").setup({})
|
require("autolist").setup({})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Tint inactive windows
|
-- Tint inactive windows
|
||||||
use({
|
{
|
||||||
"levouh/tint.nvim",
|
"levouh/tint.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("tint").setup({
|
require("tint").setup({
|
||||||
@ -656,28 +644,28 @@ return packer.startup({
|
|||||||
saturation = 0.8,
|
saturation = 0.8,
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Highlight argument definitions and usages
|
-- Highlight argument definitions and usages
|
||||||
use({
|
{
|
||||||
"m-demare/hlargs.nvim",
|
"m-demare/hlargs.nvim",
|
||||||
requires = { "nvim-treesitter/nvim-treesitter" },
|
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||||
config = function()
|
config = function()
|
||||||
require("hlargs").setup({})
|
require("hlargs").setup({})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Vim Latex Support
|
-- Vim Latex Support
|
||||||
use({
|
{
|
||||||
"lervag/vimtex",
|
"lervag/vimtex",
|
||||||
ft = "tex",
|
ft = "tex",
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.vimtext_view_method = "zathura"
|
vim.g.vimtext_view_method = "zathura"
|
||||||
vim.g.vimtex_view_general_viewer = "zathura"
|
vim.g.vimtex_view_general_viewer = "zathura"
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
use({
|
{
|
||||||
"akinsho/toggleterm.nvim",
|
"akinsho/toggleterm.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("toggleterm").setup({
|
require("toggleterm").setup({
|
||||||
@ -700,19 +688,19 @@ return packer.startup({
|
|||||||
"ToggleTermSendVisualLines",
|
"ToggleTermSendVisualLines",
|
||||||
"ToggleTermSendVisualSelection",
|
"ToggleTermSendVisualSelection",
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Take a screenshot of code selected
|
-- Take a screenshot of code selected
|
||||||
use({
|
{
|
||||||
"NarutoXY/silicon.lua",
|
"NarutoXY/silicon.lua",
|
||||||
requires = { "nvim-lua/plenary.nvim" },
|
dependencies = { "nvim-lua/plenary.nvim" },
|
||||||
config = function()
|
config = function()
|
||||||
require("silicon").setup({})
|
require("silicon").setup({})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Nice sidebar cursor goodies
|
-- Nice sidebar cursor goodies
|
||||||
use({
|
{
|
||||||
"gen740/SmoothCursor.nvim",
|
"gen740/SmoothCursor.nvim",
|
||||||
after = "kanagawa.nvim",
|
after = "kanagawa.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
@ -733,10 +721,10 @@ return packer.startup({
|
|||||||
disabled_filetypes = { "NeogitNotification" },
|
disabled_filetypes = { "NeogitNotification" },
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Color Picker
|
-- Color Picker
|
||||||
use({
|
{
|
||||||
"uga-rosa/ccc.nvim",
|
"uga-rosa/ccc.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.configs.ccc")
|
require("plugins.configs.ccc")
|
||||||
@ -748,52 +736,57 @@ return packer.startup({
|
|||||||
"CccHighlighterToggle",
|
"CccHighlighterToggle",
|
||||||
"CccHighlighterDisable",
|
"CccHighlighterDisable",
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Task runner & job management
|
-- Task runner & job management
|
||||||
use({
|
{
|
||||||
"stevearc/overseer.nvim",
|
"stevearc/overseer.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("overseer").setup()
|
require("overseer").setup()
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Better buffer deletion
|
-- Better buffer deletion
|
||||||
use({
|
{
|
||||||
"famiu/bufdelete.nvim",
|
"famiu/bufdelete.nvim",
|
||||||
})
|
},
|
||||||
|
|
||||||
-- Leave at end!!!
|
-- Leave at end!!!
|
||||||
-- Install and deploy packer plugins
|
-- Install and deploy packer plugins
|
||||||
-- automatically
|
-- automatically
|
||||||
if PACKER_STRAP then
|
-- if PACKER_STRAP then
|
||||||
vim.notify("Syncing packer from bootstrap")
|
-- vim.notify("Syncing packer from bootstrap")
|
||||||
|
--
|
||||||
function _G.NotifyRestartNeeded()
|
-- function _G.NotifyRestartNeeded()
|
||||||
local notify_available, _ = require("notify")
|
-- local notify_available, _ = require("notify")
|
||||||
local message = "Neovim Restart Required to Finish Installation!"
|
-- local message = "Neovim Restart Required to Finish Installation!"
|
||||||
if notify_available then
|
-- if notify_available then
|
||||||
vim.notify(message, vim.lsp.log_levels.WARN, {
|
-- vim.notify(message, vim.lsp.log_levels.WARN, {
|
||||||
title = "Packer Strap",
|
-- title = "Packer Strap",
|
||||||
keep = function()
|
-- keep = function()
|
||||||
return true
|
-- return true
|
||||||
end,
|
-- end,
|
||||||
})
|
-- },
|
||||||
else
|
-- else
|
||||||
vim.notify(message)
|
-- vim.notify(message)
|
||||||
end
|
-- end
|
||||||
end
|
-- end
|
||||||
|
--
|
||||||
vim.api.nvim_exec(
|
-- vim.api.nvim_exec(
|
||||||
[[
|
-- [[
|
||||||
autocmd User PackerCompileDone lua NotifyRestartNeeded()
|
-- autocmd User PackerCompileDone lua NotifyRestartNeeded()
|
||||||
]],
|
-- ]],
|
||||||
false
|
-- false
|
||||||
)
|
-- )
|
||||||
require("packer").sync()
|
-- require("packer").sync()
|
||||||
end
|
-- end
|
||||||
end,
|
-- end,
|
||||||
config = {
|
-- config = {
|
||||||
compile_path = vim.fn.stdpath("config") .. "/lua/packer_compiled.lua",
|
-- compile_path = vim.fn.stdpath("config") .. "/lua/packer_compiled.lua",
|
||||||
},
|
-- },
|
||||||
|
}, {
|
||||||
|
checker = {
|
||||||
|
enabled = true,
|
||||||
|
concurrency = 20
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user