mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2025-01-22 15:34:16 +00:00
Add snapshotting
This commit is contained in:
parent
08a50b1621
commit
53efd0ff51
@ -17,13 +17,26 @@ local function config_dark_notify()
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
return require("packer").startup({
|
local packer = require("packer")
|
||||||
function(use)
|
local packer_util = require("packer.util")
|
||||||
-- Load things faster!
|
local use = packer.use
|
||||||
use({ "lewis6991/impatient.nvim", config = [[require('impatient')]] })
|
|
||||||
|
|
||||||
-- Let Packer manage and lazyload itself
|
packer.init({
|
||||||
use({
|
-- Always load default
|
||||||
|
snapshot = "latest",
|
||||||
|
snapshot_path = packer_util.join_paths(vim.fn.stdpath("config"), "packer_snapshots"),
|
||||||
|
display = {
|
||||||
|
open_fn = function()
|
||||||
|
return packer_util.float({ border = "single" })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Load things faster!
|
||||||
|
use({ "lewis6991/impatient.nvim", config = [[require('impatient')]] })
|
||||||
|
|
||||||
|
-- Let Packer manage and lazyload itself
|
||||||
|
use({
|
||||||
"wbthomason/packer.nvim",
|
"wbthomason/packer.nvim",
|
||||||
cmd = {
|
cmd = {
|
||||||
"PackerClean",
|
"PackerClean",
|
||||||
@ -36,10 +49,10 @@ return require("packer").startup({
|
|||||||
"PackerUpdate",
|
"PackerUpdate",
|
||||||
},
|
},
|
||||||
config = [[require("plugins")]],
|
config = [[require("plugins")]],
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Colorschemes
|
-- Colorschemes
|
||||||
use({
|
use({
|
||||||
"vim-scripts/wombat256.vim",
|
"vim-scripts/wombat256.vim",
|
||||||
{ "ViViDboarder/wombat.nvim", requires = "rktjmp/lush.nvim" },
|
{ "ViViDboarder/wombat.nvim", requires = "rktjmp/lush.nvim" },
|
||||||
{ "ViViDboarder/wombuddy.nvim", requires = "tjdevries/colorbuddy.vim" },
|
{ "ViViDboarder/wombuddy.nvim", requires = "tjdevries/colorbuddy.vim" },
|
||||||
@ -48,59 +61,59 @@ return require("packer").startup({
|
|||||||
"folke/tokyonight.nvim",
|
"folke/tokyonight.nvim",
|
||||||
run = 'fish -c \'echo "set --path --prepend fish_themes_path "(pwd)"/extras" > ~/.config/fish/conf.d/tokyonight.fish\' || true', -- luacheck: no max line length
|
run = 'fish -c \'echo "set --path --prepend fish_themes_path "(pwd)"/extras" > ~/.config/fish/conf.d/tokyonight.fish\' || true', -- luacheck: no max line length
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Auto and ends to some ifs and dos
|
-- Auto and ends to some ifs and dos
|
||||||
use("tpope/vim-endwise")
|
use("tpope/vim-endwise")
|
||||||
|
|
||||||
-- Unix commands from vim? Yup!
|
-- Unix commands from vim? Yup!
|
||||||
use("tpope/vim-eunuch")
|
use("tpope/vim-eunuch")
|
||||||
|
|
||||||
-- Adds repeats for custom motions
|
-- Adds repeats for custom motions
|
||||||
use("tpope/vim-repeat")
|
use("tpope/vim-repeat")
|
||||||
|
|
||||||
-- Readline shortcuts
|
-- Readline shortcuts
|
||||||
use("tpope/vim-rsi")
|
use("tpope/vim-rsi")
|
||||||
|
|
||||||
-- Surround motions
|
-- Surround motions
|
||||||
use("tpope/vim-surround")
|
use("tpope/vim-surround")
|
||||||
|
|
||||||
-- Better netrw
|
-- Better netrw
|
||||||
use("tpope/vim-vinegar")
|
use("tpope/vim-vinegar")
|
||||||
|
|
||||||
-- Easier jumping to lines
|
-- Easier jumping to lines
|
||||||
use("vim-scripts/file-line")
|
use("vim-scripts/file-line")
|
||||||
|
|
||||||
-- Auto ctags generation
|
-- Auto ctags generation
|
||||||
use("ludovicchabant/vim-gutentags")
|
use("ludovicchabant/vim-gutentags")
|
||||||
|
|
||||||
-- Make it easier to discover some of my keymaps
|
-- Make it easier to discover some of my keymaps
|
||||||
use({
|
use({
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.whichkey").configure()
|
require("plugins.whichkey").configure()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Better commenting
|
-- Better commenting
|
||||||
use({
|
use({
|
||||||
"tomtom/tcomment_vim",
|
"tomtom/tcomment_vim",
|
||||||
config = function()
|
config = function()
|
||||||
vim.api.nvim_set_keymap("n", "//", ":TComment<CR>", { silent = true, noremap = true })
|
vim.api.nvim_set_keymap("n", "//", ":TComment<CR>", { silent = true, noremap = true })
|
||||||
vim.api.nvim_set_keymap("v", "//", ":TCommentBlock<CR>", { silent = true, noremap = true })
|
vim.api.nvim_set_keymap("v", "//", ":TCommentBlock<CR>", { silent = true, noremap = true })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Allow wrapping and joining of arguments across multiple lines
|
-- Allow wrapping and joining of arguments across multiple lines
|
||||||
use({
|
use({
|
||||||
"FooSoft/vim-argwrap",
|
"FooSoft/vim-argwrap",
|
||||||
config = function()
|
config = function()
|
||||||
vim.api.nvim_set_keymap("n", "<Leader>a", "<cmd>ArgWrap<CR>", { silent = true, noremap = true })
|
vim.api.nvim_set_keymap("n", "<Leader>a", "<cmd>ArgWrap<CR>", { silent = true, noremap = true })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Adds git operations to vim
|
-- Adds git operations to vim
|
||||||
use({
|
use({
|
||||||
"tpope/vim-fugitive",
|
"tpope/vim-fugitive",
|
||||||
config = function()
|
config = function()
|
||||||
local opts = { silent = true, noremap = true }
|
local opts = { silent = true, noremap = true }
|
||||||
@ -110,46 +123,36 @@ return require("packer").startup({
|
|||||||
vim.api.nvim_set_keymap("n", "gs", "<cmd>Git<CR>", opts)
|
vim.api.nvim_set_keymap("n", "gs", "<cmd>Git<CR>", opts)
|
||||||
vim.api.nvim_set_keymap("n", "gw", "<cmd>Gwrite<CR>", opts)
|
vim.api.nvim_set_keymap("n", "gw", "<cmd>Gwrite<CR>", opts)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Quick toggling of Location and Quickfix lists
|
-- Quick toggling of Location and Quickfix lists
|
||||||
use({
|
use({
|
||||||
"milkypostman/vim-togglelist",
|
"milkypostman/vim-togglelist",
|
||||||
config = function()
|
config = function()
|
||||||
vim.api.nvim_set_keymap(
|
vim.api.nvim_set_keymap("n", "<F6>", ":call ToggleQuickfixList()<CR>", { silent = true, noremap = true })
|
||||||
"n",
|
vim.api.nvim_set_keymap("n", "<F7>", ":call ToggleLocationList()<CR>", { silent = true, noremap = true })
|
||||||
"<F6>",
|
|
||||||
":call ToggleQuickfixList()<CR>",
|
|
||||||
{ silent = true, noremap = true }
|
|
||||||
)
|
|
||||||
vim.api.nvim_set_keymap(
|
|
||||||
"n",
|
|
||||||
"<F7>",
|
|
||||||
":call ToggleLocationList()<CR>",
|
|
||||||
{ silent = true, noremap = true }
|
|
||||||
)
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Find text everywhere!
|
-- Find text everywhere!
|
||||||
use({
|
use({
|
||||||
"mhinz/vim-grepper",
|
"mhinz/vim-grepper",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.grepper")
|
require("plugins.grepper")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Highlight inline colors
|
-- Highlight inline colors
|
||||||
use({
|
use({
|
||||||
"norcalli/nvim-colorizer.lua",
|
"norcalli/nvim-colorizer.lua",
|
||||||
config = function()
|
config = function()
|
||||||
require("colorizer").setup()
|
require("colorizer").setup()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Custom status line
|
-- Custom status line
|
||||||
use({ "SmiteshP/nvim-gps", requires = "nvim-treesitter/nvim-treesitter" })
|
use({ "SmiteshP/nvim-gps", requires = "nvim-treesitter/nvim-treesitter" })
|
||||||
use({
|
use({
|
||||||
"nvim-lualine/lualine.nvim",
|
"nvim-lualine/lualine.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.lualine").config_lualine()
|
require("plugins.lualine").config_lualine()
|
||||||
@ -161,45 +164,45 @@ return require("packer").startup({
|
|||||||
after = {
|
after = {
|
||||||
"nvim-gps",
|
"nvim-gps",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- On Mac, update colors when dark mode changes
|
-- On Mac, update colors when dark mode changes
|
||||||
use({
|
use({
|
||||||
"cormacrelf/dark-notify",
|
"cormacrelf/dark-notify",
|
||||||
disable = not vim.g.is_mac,
|
disable = not vim.g.is_mac,
|
||||||
-- Download latest release on install
|
-- Download latest release on install
|
||||||
run = "curl -s https://api.github.com/repos/cormacrelf/dark-notify/releases/latest | jq '.assets[].browser_download_url' | xargs curl -Ls | tar xz -C ~/.local/bin/", -- luacheck: no max line length
|
run = "curl -s https://api.github.com/repos/cormacrelf/dark-notify/releases/latest | jq '.assets[].browser_download_url' | xargs curl -Ls | tar xz -C ~/.local/bin/", -- luacheck: no max line length
|
||||||
config = config_dark_notify,
|
config = config_dark_notify,
|
||||||
requires = "nvim-lualine/lualine.nvim",
|
requires = "nvim-lualine/lualine.nvim",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Custom start screen
|
-- Custom start screen
|
||||||
use({
|
use({
|
||||||
"mhinz/vim-startify",
|
"mhinz/vim-startify",
|
||||||
config = function()
|
config = function()
|
||||||
require("utils").require_with_local("plugins.startify")
|
require("utils").require_with_local("plugins.startify")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- LSP
|
-- LSP
|
||||||
|
|
||||||
-- Configure language servers
|
-- Configure language servers
|
||||||
use("neovim/nvim-lspconfig")
|
use("neovim/nvim-lspconfig")
|
||||||
|
|
||||||
-- Install language servers
|
-- Install language servers
|
||||||
use({
|
use({
|
||||||
"williamboman/nvim-lsp-installer",
|
"williamboman/nvim-lsp-installer",
|
||||||
requires = "neovim/nvim-lspconfig",
|
requires = "neovim/nvim-lspconfig",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Lua dev for vim
|
-- Lua dev for vim
|
||||||
use("folke/lua-dev.nvim")
|
use("folke/lua-dev.nvim")
|
||||||
|
|
||||||
-- Better display of lsp diagnostics
|
-- Better display of lsp diagnostics
|
||||||
use("folke/trouble.nvim")
|
use("folke/trouble.nvim")
|
||||||
|
|
||||||
-- Generic linter/formatters in diagnostics API
|
-- Generic linter/formatters in diagnostics API
|
||||||
use({
|
use({
|
||||||
"jose-elias-alvarez/null-ls.nvim",
|
"jose-elias-alvarez/null-ls.nvim",
|
||||||
commit = utils.map_version_rule({
|
commit = utils.map_version_rule({
|
||||||
[">=0.6.0"] = nil,
|
[">=0.6.0"] = nil,
|
||||||
@ -207,52 +210,52 @@ return require("packer").startup({
|
|||||||
[">=0.5.0"] = "3e7390735501d0507bf2c2b5c2e7a16f58deeb81",
|
[">=0.5.0"] = "3e7390735501d0507bf2c2b5c2e7a16f58deeb81",
|
||||||
}),
|
}),
|
||||||
requires = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
|
requires = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" },
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Fancy LSP UIs
|
-- Fancy LSP UIs
|
||||||
use({
|
use({
|
||||||
"glepnir/lspsaga.nvim",
|
"glepnir/lspsaga.nvim",
|
||||||
requires = "neovim/nvim-lspconfig",
|
requires = "neovim/nvim-lspconfig",
|
||||||
-- NOTE: Disabled because it's got issues with Neovim 0.6.0
|
-- NOTE: Disabled because it's got issues with Neovim 0.6.0
|
||||||
disable = true,
|
disable = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Writing
|
-- Writing
|
||||||
-- abolish/pencil
|
-- abolish/pencil
|
||||||
use({
|
use({
|
||||||
"preservim/vim-pencil",
|
"preservim/vim-pencil",
|
||||||
cmd = { "Pencil" },
|
cmd = { "Pencil" },
|
||||||
})
|
})
|
||||||
use({
|
use({
|
||||||
"preservim/vim-textobj-sentence",
|
"preservim/vim-textobj-sentence",
|
||||||
requires = "kana/vim-textobj-user",
|
requires = "kana/vim-textobj-user",
|
||||||
})
|
})
|
||||||
use({
|
use({
|
||||||
"junegunn/goyo.vim",
|
"junegunn/goyo.vim",
|
||||||
cmd = { "Goyo", "Zen" },
|
cmd = { "Goyo", "Zen" },
|
||||||
config = [[require("plugins.goyo-limelight")]],
|
config = [[require("plugins.goyo-limelight")]],
|
||||||
requires = { "junegunn/limelight.vim", cmd = "Limelight" },
|
requires = { "junegunn/limelight.vim", cmd = "Limelight" },
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Treesitter
|
-- Treesitter
|
||||||
use({
|
use({
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
run = ":TSUpdate",
|
run = ":TSUpdate",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.treesitter").setup()
|
require("plugins.treesitter").setup()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
use({
|
use({
|
||||||
"nvim-treesitter/nvim-treesitter-refactor",
|
"nvim-treesitter/nvim-treesitter-refactor",
|
||||||
requires = "nvim-treesitter/nvim-treesitter",
|
requires = "nvim-treesitter/nvim-treesitter",
|
||||||
})
|
})
|
||||||
use({
|
use({
|
||||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||||
requires = "nvim-treesitter/nvim-treesitter",
|
requires = "nvim-treesitter/nvim-treesitter",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Completion
|
-- Completion
|
||||||
use({
|
use({
|
||||||
"hrsh7th/nvim-cmp",
|
"hrsh7th/nvim-cmp",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.completion").config_cmp()
|
require("plugins.completion").config_cmp()
|
||||||
@ -265,20 +268,20 @@ return require("packer").startup({
|
|||||||
"L3MON4D3/LuaSnip",
|
"L3MON4D3/LuaSnip",
|
||||||
},
|
},
|
||||||
event = "InsertEnter *",
|
event = "InsertEnter *",
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Add snippets
|
-- Add snippets
|
||||||
use({
|
use({
|
||||||
"rafamadriz/friendly-snippets",
|
"rafamadriz/friendly-snippets",
|
||||||
requires = "L3MON4D3/LuaSnip",
|
requires = "L3MON4D3/LuaSnip",
|
||||||
after = "LuaSnip",
|
after = "LuaSnip",
|
||||||
config = function()
|
config = function()
|
||||||
require("luasnip.loaders.from_vscode").load()
|
require("luasnip.loaders.from_vscode").load()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Fuzzy Finder
|
-- Fuzzy Finder
|
||||||
use({
|
use({
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
requires = {
|
requires = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
@ -293,13 +296,13 @@ return require("packer").startup({
|
|||||||
config = function()
|
config = function()
|
||||||
require("plugins.telescope")
|
require("plugins.telescope")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Filetypes
|
-- Filetypes
|
||||||
use("ViViDboarder/vim-forcedotcom")
|
use("ViViDboarder/vim-forcedotcom")
|
||||||
use("rust-lang/rust.vim")
|
use("rust-lang/rust.vim")
|
||||||
use("hsanson/vim-android")
|
use("hsanson/vim-android")
|
||||||
use({
|
use({
|
||||||
"sheerun/vim-polyglot",
|
"sheerun/vim-polyglot",
|
||||||
config = function()
|
config = function()
|
||||||
vim.cmd([[
|
vim.cmd([[
|
||||||
@ -309,23 +312,23 @@ return require("packer").startup({
|
|||||||
augroup end
|
augroup end
|
||||||
]])
|
]])
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
use({
|
use({
|
||||||
"dense-analysis/ale",
|
"dense-analysis/ale",
|
||||||
config = function()
|
config = function()
|
||||||
require("plugins.ale")
|
require("plugins.ale")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Debuging nvim config
|
-- Debuging nvim config
|
||||||
use({
|
use({
|
||||||
"tweekmonster/startuptime.vim",
|
"tweekmonster/startuptime.vim",
|
||||||
cmd = { "StartupTime" },
|
cmd = { "StartupTime" },
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Fancy todo highlighting
|
-- Fancy todo highlighting
|
||||||
use({
|
use({
|
||||||
"folke/todo-comments.nvim",
|
"folke/todo-comments.nvim",
|
||||||
requires = {
|
requires = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
@ -333,10 +336,10 @@ return require("packer").startup({
|
|||||||
config = function()
|
config = function()
|
||||||
require("plugins.todo")
|
require("plugins.todo")
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Fancy notifications
|
-- Fancy notifications
|
||||||
use({
|
use({
|
||||||
"rcarriga/nvim-notify",
|
"rcarriga/nvim-notify",
|
||||||
config = function()
|
config = function()
|
||||||
require("notify").setup({
|
require("notify").setup({
|
||||||
@ -349,18 +352,9 @@ return require("packer").startup({
|
|||||||
})
|
})
|
||||||
vim.notify = require("notify")
|
vim.notify = require("notify")
|
||||||
end,
|
end,
|
||||||
})
|
|
||||||
|
|
||||||
-- Auto sync after bootstrapping on a fresh box
|
|
||||||
if packer_bootstrap then
|
|
||||||
require("packer").sync()
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
config = {
|
|
||||||
display = {
|
|
||||||
open_fn = function()
|
|
||||||
return require("packer.util").float({ border = "single" })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Auto sync after bootstrapping on a fresh box
|
||||||
|
if packer_bootstrap then
|
||||||
|
packer.sync()
|
||||||
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user