nvim: add zen-mode, twilight, lightspeed (commented), targets,
spellsitter, spaceless, foldsigns, and impatient. (impatient may not be working)
This commit is contained in:
parent
47c1588b5d
commit
62bc48fa5d
1 changed files with 69 additions and 19 deletions
|
@ -1,24 +1,34 @@
|
||||||
-- Load plugins
|
-- Load plugins
|
||||||
-- Bootstrap packer if needed {
|
-- Bootstrap packer if needed {{
|
||||||
local fn = vim.fn
|
local fn = vim.fn
|
||||||
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim'
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
if fn.empty(fn.glob(install_path)) > 0 then
|
||||||
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||||
vim.cmd 'packadd packer.nvim'
|
vim.cmd 'packadd packer.nvim'
|
||||||
end
|
end
|
||||||
-- }
|
-- }}
|
||||||
|
|
||||||
return require('packer').startup({function()
|
return require('packer').startup({function()
|
||||||
|
-- TODO: Find a better way to organize this
|
||||||
|
|
||||||
|
-- impatient (needs to go early)
|
||||||
|
use { -- lewis6991: impatient: Make nvim load faster by caching them
|
||||||
|
'lewis6991/impatient.nvim',
|
||||||
|
-- config = function()
|
||||||
|
-- require('impatient')
|
||||||
|
-- end,
|
||||||
|
}
|
||||||
|
|
||||||
-- Packer
|
-- Packer
|
||||||
use { -- packer
|
use { -- packer
|
||||||
'wbthomason/packer.nvim',
|
'wbthomason/packer.nvim',
|
||||||
config = function() -- Map :PS to :PackerSync
|
config = function() -- Map :PS to :PackerSync
|
||||||
vim.cmd 'command! PS PackerSync'
|
vim.cmd 'command! PS PackerSync'
|
||||||
|
require('packer_compiled')
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Colors
|
-- Colors (decorations)
|
||||||
use { -- treesitter: syntax highlighting and more
|
use { -- treesitter: syntax highlighting and more
|
||||||
'nvim-treesitter/nvim-treesitter', run = ':TSUpdate',
|
'nvim-treesitter/nvim-treesitter', run = ':TSUpdate',
|
||||||
config = function()
|
config = function()
|
||||||
|
@ -37,7 +47,7 @@ return require('packer').startup({function()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- IDE features
|
-- IDE features
|
||||||
---- LSP
|
---- LSP (document analysis)
|
||||||
use { -- lsp installer
|
use { -- lsp installer
|
||||||
'kabouzeid/nvim-lspinstall',
|
'kabouzeid/nvim-lspinstall',
|
||||||
setup = function()
|
setup = function()
|
||||||
|
@ -59,7 +69,8 @@ return require('packer').startup({function()
|
||||||
config = function()
|
config = function()
|
||||||
require('blake.lsp').cmp()
|
require('blake.lsp').cmp()
|
||||||
end,
|
end,
|
||||||
requires = { -- nvim-cmp sources (not required by cmp, but reqired by my configuration)
|
requires = { -- (mostly) nvim-cmp sources (not required by cmp, but reqired by my configuration)
|
||||||
|
'onsails/lspkind-nvim', -- icons for entries of the completion menu
|
||||||
'hrsh7th/cmp-path',
|
'hrsh7th/cmp-path',
|
||||||
'hrsh7th/cmp-nvim-lua',
|
'hrsh7th/cmp-nvim-lua',
|
||||||
'hrsh7th/cmp-nvim-lsp',
|
'hrsh7th/cmp-nvim-lsp',
|
||||||
|
@ -71,9 +82,6 @@ return require('packer').startup({function()
|
||||||
'hrsh7th/cmp-emoji',
|
'hrsh7th/cmp-emoji',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
use { -- Icons for each entry in the completion menu
|
|
||||||
'onsails/lspkind-nvim',
|
|
||||||
}
|
|
||||||
use { -- function parameter previews
|
use { -- function parameter previews
|
||||||
'ray-x/lsp_signature.nvim',
|
'ray-x/lsp_signature.nvim',
|
||||||
after = 'nvim-lspconfig',
|
after = 'nvim-lspconfig',
|
||||||
|
@ -81,9 +89,12 @@ return require('packer').startup({function()
|
||||||
require('blake.lsp').signature()
|
require('blake.lsp').signature()
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
-- use { -- Use the percent (%) key for more things
|
use {
|
||||||
-- 'andymass/vim-matchup',
|
'simrat39/symbols-outline.nvim',
|
||||||
-- }
|
config = function()
|
||||||
|
vim.cmd 'command! SO SymbolsOutline'
|
||||||
|
end,
|
||||||
|
}
|
||||||
use { -- ALE: Support for lots of linters, etc
|
use { -- ALE: Support for lots of linters, etc
|
||||||
'dense-analysis/ale',
|
'dense-analysis/ale',
|
||||||
ft = {'sh', 'zsh', 'zshrc', 'bashrc', 'bash'},
|
ft = {'sh', 'zsh', 'zshrc', 'bashrc', 'bash'},
|
||||||
|
@ -157,15 +168,35 @@ return require('packer').startup({function()
|
||||||
'ellisonleao/glow.nvim',
|
'ellisonleao/glow.nvim',
|
||||||
ft = { 'md', 'markdown', }
|
ft = { 'md', 'markdown', }
|
||||||
}
|
}
|
||||||
|
use { -- Zen mode (:ZenMode)
|
||||||
|
"folke/zen-mode.nvim",
|
||||||
|
config = function()
|
||||||
|
vim.cmd 'command! ZM ZenMode'
|
||||||
|
require("zen-mode").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
use { -- dim text outside paragraph or function
|
||||||
|
'folke/twilight.nvim',
|
||||||
|
config = function()
|
||||||
|
vim.cmd 'command! TW Twilight'
|
||||||
|
require("twilight").setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
use { -- matchup: Use the percent (%) key for more things
|
||||||
|
'andymass/vim-matchup',
|
||||||
|
}
|
||||||
|
-- use { -- lightspeed: Jump around in files quickly
|
||||||
|
-- 'ggandor/lightspeed.nvim',
|
||||||
|
-- }
|
||||||
|
use { -- targets.vim: fix ci' and other things to work right
|
||||||
|
'wellle/targets.vim',
|
||||||
|
}
|
||||||
|
|
||||||
-- Conveniences
|
-- Conveniences
|
||||||
use { -- Web browser integration
|
use { -- Web browser integration
|
||||||
'raghur/vim-ghost',
|
'raghur/vim-ghost',
|
||||||
opt = true,
|
opt = true,
|
||||||
cmd = {'GhostStart', 'GhostInstall', 'GhostStop', 'GhostSync', 'GhostToggleSync'},
|
cmd = {'GhostStart', 'GhostInstall', 'GhostStop', 'GhostSync', 'GhostToggleSync',},
|
||||||
config = function() -- Map :GS to :GhostStart
|
|
||||||
vim.cmd 'command! GS GhostStart'
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
use { -- Undo tree
|
use { -- Undo tree
|
||||||
'mbbill/undotree',
|
'mbbill/undotree',
|
||||||
|
@ -192,6 +223,24 @@ return require('packer').startup({function()
|
||||||
require('Comment').setup()
|
require('Comment').setup()
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
use { -- lewis6991: spellsitter: Spell checking in treesitter files
|
||||||
|
'lewis6991/spellsitter.nvim',
|
||||||
|
config = function()
|
||||||
|
require('spellsitter').setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
use { -- lewis6991: spaceless: Strip trailing whitespace as you are editing
|
||||||
|
'lewis6991/spaceless.nvim',
|
||||||
|
config = function()
|
||||||
|
require'spaceless'.setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
use { -- lewis6991: foldsigns: Signs on folded lines
|
||||||
|
'lewis6991/foldsigns.nvim',
|
||||||
|
config = function()
|
||||||
|
require('foldsigns').setup()
|
||||||
|
end,
|
||||||
|
}
|
||||||
use { -- tpope: surround
|
use { -- tpope: surround
|
||||||
'tpope/vim-surround'
|
'tpope/vim-surround'
|
||||||
}
|
}
|
||||||
|
@ -203,13 +252,14 @@ return require('packer').startup({function()
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Bootstrap packer if needed {
|
-- Bootstrap packer if needed {
|
||||||
if packer_bootstrap then
|
if (packer_bootstrap) then
|
||||||
require('packer').sync()
|
require('packer').sync()
|
||||||
end -- }
|
end -- }
|
||||||
end,
|
end,
|
||||||
config = {
|
config = {
|
||||||
display = { open_fn = require('packer.util').float }
|
display = { open_fn = require('packer.util').float },
|
||||||
|
-- Move to lua dir so impatient.nvim can cache it
|
||||||
|
compile_path = vim.fn.stdpath('config')..'/lua/packer_compiled.lua',
|
||||||
}})
|
}})
|
||||||
|
|
||||||
-- vim:fdm=marker:fmr={,}:fdl=1:expandtab:tabstop=3:sw=3
|
-- vim:fdm=marker:fmr={,}:fdl=1:expandtab:tabstop=3:sw=3
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue