nvim: Move to lazy.nvim package manager
Migrated from packer.nvim to lazy.nvim - it gives really fast loading times, easy lazy loading for any package and a snazzy package manager overview page (invoked through `:Lazy`) which, importantly, all do not rely on a compiled plugin list. In essence it feels like an easier to manage and robust packer replacement (even though packer is a really good manager as well) that is well worth to switch to. Migration was pretty painless as well. One thing I might do in the future is split up the plugin structure itself from a single plugin list (which invokes plugin settings files) to several files containing the plugins and their settings since it might give more structure.
This commit is contained in:
parent
f08fa474d6
commit
cd0d519a28
10 changed files with 244 additions and 472 deletions
|
@ -2,11 +2,6 @@
|
||||||
-- https://github.com/elianiva/dotfiles/ - with much gratitude
|
-- https://github.com/elianiva/dotfiles/ - with much gratitude
|
||||||
local api = vim.api
|
local api = vim.api
|
||||||
|
|
||||||
require('settings')
|
|
||||||
require('plugins')
|
|
||||||
require('look')
|
|
||||||
require('maps')
|
|
||||||
|
|
||||||
-- Highlight whatever is being yanked
|
-- Highlight whatever is being yanked
|
||||||
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
|
vim.api.nvim_create_autocmd({ "TextYankPost" }, {
|
||||||
command = 'silent! lua require"vim.highlight".on_yank{timeout=500}',
|
command = 'silent! lua require"vim.highlight".on_yank{timeout=500}',
|
||||||
|
@ -36,3 +31,26 @@ vim.api.nvim_create_autocmd({ "VimEnter" }, {
|
||||||
desc = "Fix neovim sizing issues if opening same time as alacritty",
|
desc = "Fix neovim sizing issues if opening same time as alacritty",
|
||||||
group = vim.api.nvim_create_augroup('alacritty_fixsize', { clear = true })
|
group = vim.api.nvim_create_augroup('alacritty_fixsize', { clear = true })
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
|
if not vim.loop.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({
|
||||||
|
"git",
|
||||||
|
"clone",
|
||||||
|
"--filter=blob:none",
|
||||||
|
"https://github.com/folke/lazy.nvim.git",
|
||||||
|
"--branch=stable", -- latest stable release
|
||||||
|
lazypath,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend (lazypath)
|
||||||
|
|
||||||
|
-- set our leader key to space since with hjkl, space is largely useless
|
||||||
|
-- needs to be set before lazy.nvim is loaded
|
||||||
|
vim.g.mapleader = " "
|
||||||
|
|
||||||
|
require('settings')
|
||||||
|
require("lazy").setup("plugins")
|
||||||
|
require('look')
|
||||||
|
require('maps')
|
||||||
|
|
||||||
|
|
71
nvim/.config/nvim/lazy-lock.json
Normal file
71
nvim/.config/nvim/lazy-lock.json
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
{
|
||||||
|
"BetterLua.vim": { "branch": "master", "commit": "d2d6c115575d09258a794a6f20ac60233eee59d5" },
|
||||||
|
"Navigator.nvim": { "branch": "master", "commit": "91d86506ac2a039504d5205d32a1d4bc7aa57072" },
|
||||||
|
"bats.vim": { "branch": "master", "commit": "6a5d2ef22b0ede503d867770afd02ebb1f97b709" },
|
||||||
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
|
"cmp-cmdline": { "branch": "main", "commit": "23c51b2a3c00f6abc4e922dbd7c3b9aca6992063" },
|
||||||
|
"cmp-latex-symbols": { "branch": "main", "commit": "165fb66afdbd016eaa1570e41672c4c557b57124" },
|
||||||
|
"cmp-nvim-lsp": { "branch": "main", "commit": "0e6b2ed705ddcff9738ec4ea838141654f12eeef" },
|
||||||
|
"cmp-nvim-lua": { "branch": "main", "commit": "f3491638d123cfd2c8048aefaf66d246ff250ca6" },
|
||||||
|
"cmp-pandoc.nvim": { "branch": "main", "commit": "cb2980263e14fb3c1b776edbd2c7a312b67c65ae" },
|
||||||
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
|
"cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" },
|
||||||
|
"cmp-tmux": { "branch": "main", "commit": "984772716f66d8ee88535a6bf3f94c4b4e1301f5" },
|
||||||
|
"cmp-treesitter": { "branch": "master", "commit": "b40178b780d547bcf131c684bc5fd41af17d05f2" },
|
||||||
|
"cmp-vsnip": { "branch": "main", "commit": "989a8a73c44e926199bfd05fa7a516d51f2d2752" },
|
||||||
|
"completion-vcard": { "branch": "master", "commit": "2220fd517a985ececed1adcf0e5be8f2815564c7" },
|
||||||
|
"dial.nvim": { "branch": "master", "commit": "5020da900cc5dfd7067f181ee2ebd872ca7c84e8" },
|
||||||
|
"formatter.nvim": { "branch": "master", "commit": "8a4c961330cc4688087f23d18fa7d2f1af9a4902" },
|
||||||
|
"friendly-snippets": { "branch": "main", "commit": "a6f7a1609addb4e57daa6bedc300f77f8d225ab7" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "ec4742a7eebf68bec663041d359b95637242b5c3" },
|
||||||
|
"guihua.lua": { "branch": "master", "commit": "d3f6d01639b52e6a83ea98dd6ca244c9aa98b79b" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "273081443471cbc52c327bcb99614c32f247998d" },
|
||||||
|
"lightspeed.nvim": { "branch": "main", "commit": "299eefa6a9e2d881f1194587c573dad619fdb96f" },
|
||||||
|
"lsp_signature.nvim": { "branch": "master", "commit": "6f6252f63b0baf0f2224c4caea33819a27f3f550" },
|
||||||
|
"lspkind-nvim": { "branch": "master", "commit": "c68b3a003483cf382428a43035079f78474cd11e" },
|
||||||
|
"lualine.nvim": { "branch": "master", "commit": "0050b308552e45f7128f399886c86afefc3eb988" },
|
||||||
|
"magma-nvim-goose": { "branch": "main", "commit": "94370733757d550594fe4a1d65643949d7485989" },
|
||||||
|
"markdown-preview.nvim": { "branch": "master", "commit": "02cc3874738bc0f86e4b91f09b8a0ac88aef8e96" },
|
||||||
|
"mini.nvim": { "branch": "main", "commit": "dc0ccf1b0499d649a6177d2a406babcfe73b97de" },
|
||||||
|
"nabla.nvim": { "branch": "master", "commit": "ddbfc6e244e79db9280c535ee85c81388c5d1b46" },
|
||||||
|
"navigator.lua": { "branch": "master", "commit": "66d84151e94052f710b1dfb0d1fce2faaca6dced" },
|
||||||
|
"neorg": { "branch": "main", "commit": "36cc15300c0dfc19d483b0a4176cb89e94f4730a" },
|
||||||
|
"notational-fzf-vim": { "branch": "master", "commit": "75c2c31e7cd77397018c5777804666d648557537" },
|
||||||
|
"nui.nvim": { "branch": "main", "commit": "d147222a1300901656f3ebd5b95f91732785a329" },
|
||||||
|
"nvim-base16.lua": { "branch": "master", "commit": "b336f40462b3ca1ad16a17c195b83731a2942d9a" },
|
||||||
|
"nvim-cartographer": { "branch": "master", "commit": "fbe977c9529019376db9426cccf04bfdadeafc69" },
|
||||||
|
"nvim-cmp": { "branch": "main", "commit": "cfafe0a1ca8933f7b7968a287d39904156f2c57d" },
|
||||||
|
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
|
||||||
|
"nvim-lspconfig": { "branch": "master", "commit": "aeb76066212b09c7c01a3abb42fe82f0130ef402" },
|
||||||
|
"nvim-surround": { "branch": "main", "commit": "a06dea11e7fdcf338776fa51fa5277163ffb048d" },
|
||||||
|
"nvim-toggleterm.lua": { "branch": "main", "commit": "19aad0f41f47affbba1274f05e3c067e6d718e1e" },
|
||||||
|
"nvim-treesitter": { "branch": "master", "commit": "f6df07be122de665fb363476cc3680c90f5bdf05" },
|
||||||
|
"nvim-treesitter-context": { "branch": "master", "commit": "cacee4828152dd3a83736169ae61bbcd29a3d213" },
|
||||||
|
"nvim-treesitter-textsubjects": { "branch": "master", "commit": "bc047b20768845fd54340eb76272b2cf2f6fa3f3" },
|
||||||
|
"nvim-ts-context-commentstring": { "branch": "main", "commit": "a0f89563ba36b3bacd62cf967b46beb4c2c29e52" },
|
||||||
|
"nvim-ts-rainbow": { "branch": "master", "commit": "ef95c15a935f97c65a80e48e12fe72d49aacf9b9" },
|
||||||
|
"otter.nvim": { "branch": "main", "commit": "e32e432988fddc7fc96f08300e56750a838f0893" },
|
||||||
|
"papis.nvim": { "branch": "main", "commit": "4023d30b336c147b12a249ce103561d03fbedef8" },
|
||||||
|
"playground": { "branch": "master", "commit": "c481c660fa903a0e295902b1765ecfbd6e76a556" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "9a0d3bf7b832818c042aaf30f692b081ddd58bd9" },
|
||||||
|
"popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" },
|
||||||
|
"quarto-vim": { "branch": "master", "commit": "216247339470794e74a5fda5e5515008d6dc1057" },
|
||||||
|
"spellsitter.nvim": { "branch": "master", "commit": "4af8640d9d706447e78c13150ef7475ea2c16b30" },
|
||||||
|
"symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
|
||||||
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "580b6c48651cabb63455e97d7e131ed557b8c7e2" },
|
||||||
|
"telescope.nvim": { "branch": "master", "commit": "203bf5609137600d73e8ed82703d6b0e320a5f36" },
|
||||||
|
"twilight.nvim": { "branch": "main", "commit": "9410252bed96887ca5a86bf16435a3a51a0e6ce5" },
|
||||||
|
"vifm.vim": { "branch": "master", "commit": "199af91d6b1b4997450da2098e7e756627c6583b" },
|
||||||
|
"vim-criticmarkup": { "branch": "master", "commit": "d15dc134eb177a170c79f6377f81eb02a9d20b02" },
|
||||||
|
"vim-easy-align": { "branch": "master", "commit": "12dd6316974f71ce333e360c0260b4e1f81169c3" },
|
||||||
|
"vim-exchange": { "branch": "master", "commit": "784d63083ad7d613aa96f00021cd0dfb126a781a" },
|
||||||
|
"vim-numbertoggle": { "branch": "main", "commit": "075b7478777e694fbac330ee34a74590dad0fee1" },
|
||||||
|
"vim-oscyank": { "branch": "main", "commit": "e6298736a7835bcb365dd45a8e8bfe86d935c1f8" },
|
||||||
|
"vim-pandoc": { "branch": "master", "commit": "9f406d964ca70d959b7867f1b5cee3d4884d4d3c" },
|
||||||
|
"vim-pandoc-syntax": { "branch": "master", "commit": "4268535e1d33117a680a91160d845cd3833dfe28" },
|
||||||
|
"vim-spellsync": { "branch": "master", "commit": "27e103f2d283a1f6e24cc99dbdcd624713aff277" },
|
||||||
|
"vim-vsnip": { "branch": "master", "commit": "8dde8c0ef10bb1afdbb301e2bd7eb1c153dd558e" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "684e96c5e8477f1ee9b3f2e9a12d802fd12c5531" },
|
||||||
|
"zen-mode.nvim": { "branch": "main", "commit": "3c92f503823088862ca2a7809d1c7edc90fb92fa" },
|
||||||
|
"zettelkasten.nvim": { "branch": "main", "commit": "0e77624689b470410f5355b613d45219c9350264" }
|
||||||
|
}
|
|
@ -1,230 +0,0 @@
|
||||||
--{{{
|
|
||||||
-- remove this when vim.opt got merged
|
|
||||||
local if_nil = function(a, b)
|
|
||||||
if a == nil then
|
|
||||||
return b
|
|
||||||
end
|
|
||||||
return a
|
|
||||||
end
|
|
||||||
|
|
||||||
local singular_values = {
|
|
||||||
['boolean'] = true,
|
|
||||||
['number'] = true,
|
|
||||||
['nil'] = true,
|
|
||||||
}
|
|
||||||
|
|
||||||
local set_key_value = function(t, key_value_str)
|
|
||||||
assert(string.find(key_value_str, ":"), "Must have a :" .. tostring(key_value_str))
|
|
||||||
|
|
||||||
local key, value = unpack(vim.split(key_value_str, ":"))
|
|
||||||
key = vim.trim(key)
|
|
||||||
value = vim.trim(value)
|
|
||||||
|
|
||||||
t[key] = value
|
|
||||||
end
|
|
||||||
|
|
||||||
local convert_vimoption_to_lua = function(_, val)
|
|
||||||
-- Short circuit if we've already converted!
|
|
||||||
if type(val) == 'table' then
|
|
||||||
return val
|
|
||||||
end
|
|
||||||
|
|
||||||
if singular_values[type(val)] then
|
|
||||||
return val
|
|
||||||
end
|
|
||||||
|
|
||||||
if type(val) == "string" then
|
|
||||||
-- TODO: Bad hax I think
|
|
||||||
if string.find(val, ":") then
|
|
||||||
local result = {}
|
|
||||||
local items = vim.split(val, ",")
|
|
||||||
for _, item in ipairs(items) do
|
|
||||||
set_key_value(result, item)
|
|
||||||
end
|
|
||||||
|
|
||||||
return result
|
|
||||||
else
|
|
||||||
return vim.split(val, ",")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- local concat_keys = function(t, sep)
|
|
||||||
-- return table.concat(vim.tbl_keys(t), sep)
|
|
||||||
-- end
|
|
||||||
|
|
||||||
local concat_key_values = function(t, sep, divider)
|
|
||||||
local final = {}
|
|
||||||
for k, v in pairs(t) do
|
|
||||||
table.insert(final, string.format('%s%s%s', k, divider, v))
|
|
||||||
end
|
|
||||||
|
|
||||||
table.sort(final)
|
|
||||||
return table.concat(final, sep)
|
|
||||||
end
|
|
||||||
|
|
||||||
local remove_duplicate_values = function(t)
|
|
||||||
local result = {}
|
|
||||||
for _, v in ipairs(t) do
|
|
||||||
result[v] = true
|
|
||||||
end
|
|
||||||
|
|
||||||
return vim.tbl_keys(result)
|
|
||||||
end
|
|
||||||
|
|
||||||
local remove_value = function(t, val)
|
|
||||||
if vim.tbl_islist(t) then
|
|
||||||
local remove_index = nil
|
|
||||||
for i, v in ipairs(t) do
|
|
||||||
if v == val then
|
|
||||||
remove_index = i
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if remove_index then
|
|
||||||
table.remove(t, remove_index)
|
|
||||||
end
|
|
||||||
else
|
|
||||||
t[val] = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
return t
|
|
||||||
end
|
|
||||||
|
|
||||||
local add_value = function(current, new)
|
|
||||||
if singular_values[type(current)] then
|
|
||||||
error(
|
|
||||||
"This is not possible to do. Please do something different: "
|
|
||||||
.. tostring(current)
|
|
||||||
.. " // "
|
|
||||||
.. tostring(new)
|
|
||||||
)
|
|
||||||
end
|
|
||||||
|
|
||||||
if type(new) == 'string' then
|
|
||||||
if vim.tbl_islist(current) then
|
|
||||||
table.insert(current, new)
|
|
||||||
else
|
|
||||||
set_key_value(current, new)
|
|
||||||
end
|
|
||||||
|
|
||||||
return current
|
|
||||||
elseif type(new) == 'table' then
|
|
||||||
if vim.tbl_islist(current) then
|
|
||||||
assert(vim.tbl_islist(new))
|
|
||||||
vim.list_extend(current, new)
|
|
||||||
else
|
|
||||||
assert(not vim.tbl_islist(new), vim.inspect(new) .. vim.inspect(current))
|
|
||||||
current = vim.tbl_extend("force", current, new)
|
|
||||||
end
|
|
||||||
|
|
||||||
return current
|
|
||||||
else
|
|
||||||
error("Unknown type")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local convert_lua_to_vimoption = function(t)
|
|
||||||
if vim.tbl_islist(t) then
|
|
||||||
t = remove_duplicate_values(t)
|
|
||||||
|
|
||||||
table.sort(t)
|
|
||||||
return table.concat(t, ',')
|
|
||||||
else
|
|
||||||
return concat_key_values(t, ',', ':')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local clean_value = function(v)
|
|
||||||
if singular_values[type(v)] then
|
|
||||||
return v
|
|
||||||
end
|
|
||||||
|
|
||||||
local result = v:gsub('^,', '')
|
|
||||||
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
local opt_mt
|
|
||||||
|
|
||||||
opt_mt = {
|
|
||||||
__index = function(t, k)
|
|
||||||
if k == '_value' then
|
|
||||||
return rawget(t, k)
|
|
||||||
end
|
|
||||||
|
|
||||||
return setmetatable({ _option = k, }, opt_mt)
|
|
||||||
end,
|
|
||||||
|
|
||||||
__newindex = function(t, k, v)
|
|
||||||
if k == '_value' then
|
|
||||||
return rawset(t, k, v)
|
|
||||||
end
|
|
||||||
|
|
||||||
if type(v) == 'table' then
|
|
||||||
local new_value
|
|
||||||
if getmetatable(v) ~= opt_mt then
|
|
||||||
new_value = v
|
|
||||||
else
|
|
||||||
assert(v._value, "Must have a value to set this")
|
|
||||||
new_value = v._value
|
|
||||||
end
|
|
||||||
|
|
||||||
vim.o[k] = convert_lua_to_vimoption(new_value)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if v == nil then
|
|
||||||
v = ''
|
|
||||||
end
|
|
||||||
|
|
||||||
-- TODO: Figure out why nvim_set_option doesn't override values the same way.
|
|
||||||
-- @bfredl said he will fix this for me, so I can just use nvim_set_option
|
|
||||||
if type(v) == 'boolean' then
|
|
||||||
vim.o[k] = clean_value(v)
|
|
||||||
if v then
|
|
||||||
vim.cmd(string.format("set %s", k))
|
|
||||||
else
|
|
||||||
vim.cmd(string.format("set no%s", k))
|
|
||||||
end
|
|
||||||
else
|
|
||||||
vim.cmd(string.format("set %s=%s", k, clean_value(v)))
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
|
|
||||||
__add = function(left, right)
|
|
||||||
--[[
|
|
||||||
set.wildignore = set.wildignore + 'hello'
|
|
||||||
set.wildignore = set.wildignore + { '*.o', '*~', }
|
|
||||||
--]]
|
|
||||||
|
|
||||||
assert(left._option, "must have an option key")
|
|
||||||
if left._option == 'foldcolumn' then
|
|
||||||
error("not implemented for foldcolumn.. use a string")
|
|
||||||
end
|
|
||||||
|
|
||||||
local existing = if_nil(left._value, vim.o[left._option])
|
|
||||||
local current = convert_vimoption_to_lua(left._option, existing)
|
|
||||||
if not current then
|
|
||||||
left._value = convert_vimoption_to_lua(right)
|
|
||||||
end
|
|
||||||
|
|
||||||
left._value = add_value(current, right)
|
|
||||||
return left
|
|
||||||
end,
|
|
||||||
|
|
||||||
__sub = function(left, right)
|
|
||||||
assert(left._option, "must have an option key")
|
|
||||||
|
|
||||||
local existing = if_nil(left._value, vim.o[left._option])
|
|
||||||
local current = convert_vimoption_to_lua(left._option, existing)
|
|
||||||
if not current then
|
|
||||||
return left
|
|
||||||
end
|
|
||||||
|
|
||||||
left._value = remove_value(current, right)
|
|
||||||
return left
|
|
||||||
end
|
|
||||||
}
|
|
||||||
|
|
||||||
vim.opt = setmetatable({}, opt_mt)--}}}
|
|
|
@ -80,9 +80,6 @@ map.n.nore[']q'] = ':cnext<cr>'
|
||||||
map.n.nore['[l'] = ':lprevious<cr>'
|
map.n.nore['[l'] = ':lprevious<cr>'
|
||||||
map.n.nore[']l'] = ':lnext<cr>'
|
map.n.nore[']l'] = ':lnext<cr>'
|
||||||
|
|
||||||
-- set our leader key to space since with hjkl, space is largely useless
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
|
|
||||||
-- maps the leader for buffer local mappings
|
-- maps the leader for buffer local mappings
|
||||||
-- since we are (atm) using sneak to go fwd/bwd in fFtT searches, comma does
|
-- since we are (atm) using sneak to go fwd/bwd in fFtT searches, comma does
|
||||||
-- not do too many useful things and can be taken up as localleader
|
-- not do too many useful things and can be taken up as localleader
|
||||||
|
@ -162,10 +159,6 @@ map.n.nore['<leader><F8>'] =
|
||||||
map.n.nore['z='] =
|
map.n.nore['z='] =
|
||||||
[[:lua require 'telescope.builtin'.spell_suggest(require 'telescope.themes'.get_ivy())<cr>]]
|
[[:lua require 'telescope.builtin'.spell_suggest(require 'telescope.themes'.get_ivy())<cr>]]
|
||||||
|
|
||||||
-- PLUGIN: betterdigraphs
|
|
||||||
-- allow normal digraph insertion on c-k, telescope search on c-k c-k
|
|
||||||
map.i.nore['<C-k><C-k>'] = '<Cmd>lua require "betterdigraphs".digraphs("i")<CR>'
|
|
||||||
|
|
||||||
-- Note Searching
|
-- Note Searching
|
||||||
-- PLUGIN: Notational-FZF
|
-- PLUGIN: Notational-FZF
|
||||||
-- set notational-fzf-vim keys for the NV window itself
|
-- set notational-fzf-vim keys for the NV window itself
|
||||||
|
@ -232,13 +225,16 @@ map.i.expr['<S-Tab>'] =
|
||||||
-- PLUGIN: symbols-outline.nvim
|
-- PLUGIN: symbols-outline.nvim
|
||||||
map.n.nore.silent['<leader>o'] = "<cmd>SymbolsOutline<cr>"
|
map.n.nore.silent['<leader>o'] = "<cmd>SymbolsOutline<cr>"
|
||||||
|
|
||||||
|
-- trim trailing whitespaces with mini.nvim trailspace
|
||||||
|
vim.keymap.set("n", "<localleader>w", function() require("mini.trailspace").trim() end, {noremap = true})
|
||||||
|
|
||||||
-- PLUGIN: dial-increment
|
-- PLUGIN: dial-increment
|
||||||
map.n['<c-a>'] = '<Plug>(dial-increment)'
|
vim.keymap.set("n", "<C-a>", require("dial.map").inc_normal(), {noremap = true})
|
||||||
map.n['<c-x>'] = '<Plug>(dial-decrement)'
|
vim.keymap.set("n", "<C-x>", require("dial.map").dec_normal(), {noremap = true})
|
||||||
map.v['<c-a>'] = '<Plug>(dial-increment)'
|
vim.keymap.set("v", "<C-a>", require("dial.map").inc_visual(), {noremap = true})
|
||||||
map.v['<c-x>'] = '<Plug>(dial-decrement)'
|
vim.keymap.set("v", "<C-x>", require("dial.map").dec_visual(), {noremap = true})
|
||||||
map.v['g<c-a>'] = 'g<Plug>(dial-increment)'
|
vim.keymap.set("v", "g<C-a>",require("dial.map").inc_gvisual(), {noremap = true})
|
||||||
map.v['g<c-x>'] = 'g<Plug>(dial-decrement)'
|
vim.keymap.set("v", "g<C-x>",require("dial.map").dec_gvisual(), {noremap = true})
|
||||||
|
|
||||||
-- PLUGIN: zettelkasten.nvim
|
-- PLUGIN: zettelkasten.nvim
|
||||||
map.n.nore['<cr>'] = [[:silent lua require 'zettelkasten'.link_follow()<cr>]]
|
map.n.nore['<cr>'] = [[:silent lua require 'zettelkasten'.link_follow()<cr>]]
|
||||||
|
|
|
@ -1,33 +0,0 @@
|
||||||
require('nvim-autopairs').setup({ check_ts = true })
|
|
||||||
|
|
||||||
--- Auto-space rules
|
|
||||||
local npairs = require 'nvim-autopairs'
|
|
||||||
local Rule = require 'nvim-autopairs.rule'
|
|
||||||
|
|
||||||
npairs.setup({
|
|
||||||
check_ts = true,
|
|
||||||
ts_config = {
|
|
||||||
lua = { 'string' }, -- it will not add a pair on that treesitter node
|
|
||||||
javascript = { 'template_string' },
|
|
||||||
java = false -- don't check treesitter on java
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
local ts_conds = require('nvim-autopairs.ts-conds')
|
|
||||||
|
|
||||||
-- press % => %% only while inside a comment or string
|
|
||||||
npairs.add_rules({
|
|
||||||
Rule("%", "%", "lua"):with_pair(ts_conds.is_ts_node({ 'string', 'comment' })),
|
|
||||||
Rule("$", "$", "lua"):with_pair(ts_conds.is_not_ts_node({ 'function' }))
|
|
||||||
})
|
|
||||||
|
|
||||||
npairs.add_rules {
|
|
||||||
Rule(' ', ' '):with_pair(function(opts)
|
|
||||||
local pair = opts.line:sub(opts.col, opts.col + 1)
|
|
||||||
return vim.tbl_contains({ '()', '[]', '{}' }, pair)
|
|
||||||
end)
|
|
||||||
}
|
|
||||||
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
|
|
||||||
local cmp = require('cmp')
|
|
||||||
cmp.event:on('confirm_done',
|
|
||||||
cmp_autopairs.on_confirm_done({ map_char = { tex = '' } }))
|
|
|
@ -68,7 +68,7 @@ cmp.setup({
|
||||||
},
|
},
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = 'path' }, { name = 'nvim_lsp' }, { name = 'treesitter' },
|
{ name = 'path' }, { name = 'nvim_lsp' }, { name = 'treesitter' },
|
||||||
{ name = 'cmp_pandoc' }, { name = 'tmux' }, { name = 'vsnip' },
|
{ name = 'tmux' }, { name = 'vsnip' }, { name = 'otter' },
|
||||||
{ name = 'latex_symbols' }, { name = 'vCard' }, { name = 'nvim_lua' }
|
{ name = 'latex_symbols' }, { name = 'vCard' }, { name = 'nvim_lua' }
|
||||||
}, { { name = 'buffer' }, { name = 'spell' } })
|
}, { { name = 'buffer' }, { name = 'spell' } })
|
||||||
})
|
})
|
||||||
|
|
|
@ -1,7 +1,30 @@
|
||||||
|
require('mini.ai').setup()
|
||||||
require('mini.comment').setup()
|
require('mini.comment').setup()
|
||||||
|
require('mini.cursorword').setup({delay = 500})
|
||||||
|
require('mini.fuzzy').setup()
|
||||||
require('mini.indentscope').setup({
|
require('mini.indentscope').setup({
|
||||||
symbol = "│",
|
symbol = "│",
|
||||||
draw = {animation = require('mini.indentscope').gen_animation('none')},
|
draw = {animation = require('mini.indentscope').gen_animation('none')},
|
||||||
options = {indent_at_cursor = false}
|
options = {indent_at_cursor = false}
|
||||||
})
|
})
|
||||||
|
require('mini.map').setup()
|
||||||
|
-- require('mini.move').setup() -- has not hit stable yet
|
||||||
|
require('mini.pairs').setup()
|
||||||
require('mini.trailspace').setup()
|
require('mini.trailspace').setup()
|
||||||
|
|
||||||
|
local starter = require('mini.starter')
|
||||||
|
starter.setup({
|
||||||
|
evaluate_single = true,
|
||||||
|
items = {
|
||||||
|
starter.sections.builtin_actions(),
|
||||||
|
starter.sections.recent_files(10, false),
|
||||||
|
starter.sections.recent_files(10, true),
|
||||||
|
-- Use this if you set up 'mini.sessions'
|
||||||
|
starter.sections.telescope()
|
||||||
|
},
|
||||||
|
content_hooks = {
|
||||||
|
starter.gen_hook.adding_bullet(),
|
||||||
|
starter.gen_hook.padding(3, 2),
|
||||||
|
starter.gen_hook.aligning('center', 'center')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
|
@ -12,6 +12,12 @@ require("telescope").setup {
|
||||||
},
|
},
|
||||||
generic_sorter = require('mini.fuzzy').get_telescope_sorter
|
generic_sorter = require('mini.fuzzy').get_telescope_sorter
|
||||||
},
|
},
|
||||||
|
defaults = {
|
||||||
|
-- Appearance
|
||||||
|
prompt_prefix = ' ',
|
||||||
|
selection_caret = ' ',
|
||||||
|
color_devicons = true
|
||||||
|
},
|
||||||
pickers = {
|
pickers = {
|
||||||
buffers = {theme = "ivy"},
|
buffers = {theme = "ivy"},
|
||||||
oldfiles = {theme = "ivy"},
|
oldfiles = {theme = "ivy"},
|
||||||
|
|
|
@ -1,194 +1,112 @@
|
||||||
local ensure_packer = function()
|
local writing_ft = {"quarto", "pandoc", "markdown", "text", "tex"}
|
||||||
local fn = vim.fn
|
|
||||||
local install_path = fn.stdpath('data') ..
|
|
||||||
'/site/pack/packer/start/packer.nvim'
|
|
||||||
if fn.empty(fn.glob(install_path)) > 0 then
|
|
||||||
fn.system({
|
|
||||||
'git', 'clone', '--depth', '1',
|
|
||||||
'https://github.com/wbthomason/packer.nvim', install_path
|
|
||||||
})
|
|
||||||
vim.cmd [[packadd packer.nvim]]
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
local packer_bootstrap = ensure_packer()
|
|
||||||
|
|
||||||
-- Compile on plugin edits
|
|
||||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
|
||||||
pattern = "plugins.lua",
|
|
||||||
command = "PackerCompile",
|
|
||||||
desc = "Compile plugins after editing plugin list",
|
|
||||||
group = vim.api.nvim_create_augroup('compilepackages', { clear = true })
|
|
||||||
})
|
|
||||||
|
|
||||||
local use = require("packer").use
|
|
||||||
require("packer").startup(function()
|
|
||||||
-- packer manages itself
|
|
||||||
use "wbthomason/packer.nvim"
|
|
||||||
|
|
||||||
|
return {
|
||||||
-- vim plugs
|
-- vim plugs
|
||||||
-- essential
|
-- essential
|
||||||
use {
|
{'numToStr/Navigator.nvim', config = true}, -- allow seamless navigation between vim buffers and tmux/wezterm splits
|
||||||
'numToStr/Navigator.nvim',
|
{'jeffkreeftmeijer/vim-numbertoggle', event = "BufEnter"}, -- toggles numbers to absolute for all buffers but the current which is relative
|
||||||
config = function() require('Navigator').setup() end
|
{'ojroques/vim-oscyank', event = "VeryLazy"}, -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank
|
||||||
} -- allow seamless navigation between vim buffers and tmux/wezterm splits
|
{'ggandor/lightspeed.nvim', event = "VeryLazy"}, -- jump between letters with improved fFtT quicksearch, mimics sneak
|
||||||
use 'jeffkreeftmeijer/vim-numbertoggle' -- toggles numbers to absolute for all buffers but the current which is relative
|
|
||||||
use 'RRethy/vim-illuminate' -- highlight other occurences of the word under cursor
|
|
||||||
use 'ojroques/vim-oscyank' -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank
|
|
||||||
use 'ggandor/lightspeed.nvim' -- jump between letters with improved fFtT quicksearch, mimics sneak
|
|
||||||
-- files
|
-- files
|
||||||
use 'vifm/vifm.vim' -- integrate file manager
|
{'vifm/vifm.vim'}, -- integrate file manager
|
||||||
use {
|
{
|
||||||
'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter
|
'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter
|
||||||
requires = { 'nvim-lua/plenary.nvim' },
|
config = true,
|
||||||
tag = 'release',
|
|
||||||
config = function() require('plug._gitsigns') end,
|
|
||||||
event = "BufRead"
|
event = "BufRead"
|
||||||
}
|
}, {
|
||||||
use {
|
|
||||||
'norcalli/nvim-colorizer.lua', -- color hex, named colors in the correct preview scheme
|
'norcalli/nvim-colorizer.lua', -- color hex, named colors in the correct preview scheme
|
||||||
config = function() require('colorizer').setup() end,
|
config = true,
|
||||||
event = "BufRead"
|
event = "VeryLazy"
|
||||||
}
|
}, {
|
||||||
use {
|
|
||||||
'mhartington/formatter.nvim', -- auto formatting on save
|
'mhartington/formatter.nvim', -- auto formatting on save
|
||||||
config = function() require('plug._format') end,
|
config = function() require('plug._format') end,
|
||||||
event = "BufRead"
|
event = "VeryLazy"
|
||||||
}
|
}, -- editing
|
||||||
|
{'kylechui/nvim-surround', version = '*', config = true, event = "VeryLazy"}, -- surround things with other things using ys/cs/ds
|
||||||
-- editing
|
{
|
||||||
-- use {'machakann/vim-sandwich', event = "BufRead"} -- surround things with other things using sa/sd/sr
|
|
||||||
use {
|
|
||||||
'kylechui/nvim-surround',
|
|
||||||
tag = '*',
|
|
||||||
config = function() require('nvim-surround').setup() end
|
|
||||||
} -- surround things with other things using ys/cs/ds
|
|
||||||
use {
|
|
||||||
'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers
|
'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers
|
||||||
event = "BufRead"
|
event = "VeryLazy"
|
||||||
}
|
}, {
|
||||||
use {
|
|
||||||
'tommcdo/vim-exchange', -- adds exchange operator with cx. common use: cxiw . on 2 words to switch
|
'tommcdo/vim-exchange', -- adds exchange operator with cx. common use: cxiw . on 2 words to switch
|
||||||
event = "BufRead"
|
event = "VeryLazy"
|
||||||
}
|
}, {
|
||||||
use {
|
|
||||||
'windwp/nvim-autopairs',
|
|
||||||
config = function() require('plug._autopair') end,
|
|
||||||
event = "BufRead"
|
|
||||||
} -- Auto close brackets and ''
|
|
||||||
use {
|
|
||||||
'junegunn/vim-easy-align', -- Align tables and other alignable things
|
'junegunn/vim-easy-align', -- Align tables and other alignable things
|
||||||
event = "BufRead"
|
event = "VeryLazy"
|
||||||
}
|
}, -- colorschemes
|
||||||
use {
|
{'norcalli/nvim-base16.lua'}, --
|
||||||
'tversteeg/registers.nvim', -- Show the contents of regiseters on pasting from '', @, <C-R>
|
|
||||||
event = "BufRead"
|
|
||||||
}
|
|
||||||
use { -- highlight where the cursor jumps to
|
|
||||||
'edluffy/specs.nvim',
|
|
||||||
config = function() require('specs').setup {} end,
|
|
||||||
event = "BufRead"
|
|
||||||
}
|
|
||||||
|
|
||||||
-- colorschemes
|
|
||||||
use 'norcalli/nvim-base16.lua'
|
|
||||||
|
|
||||||
-- statusline
|
-- statusline
|
||||||
use {
|
{
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
requires = {'kyazdani42/nvim-web-devicons', opt = true},
|
||||||
config = function() require('plug._lualine') end
|
config = function() require('plug._lualine') end
|
||||||
}
|
}, -- writing
|
||||||
|
{'vim-pandoc/vim-pandoc-syntax', ft = writing_ft},
|
||||||
-- writing
|
{'vim-pandoc/vim-pandoc', ft = writing_ft},
|
||||||
use { 'vim-pandoc/vim-pandoc-syntax' }
|
{'vim-pandoc/vim-criticmarkup', ft = writing_ft}, {
|
||||||
use { 'vim-pandoc/vim-pandoc' }
|
|
||||||
use { 'vim-pandoc/vim-criticmarkup' }
|
|
||||||
use {
|
|
||||||
"quarto-dev/quarto-vim",
|
"quarto-dev/quarto-vim",
|
||||||
requires = { { "vim-pandoc/vim-pandoc-syntax" } },
|
dependencies = {"vim-pandoc/vim-pandoc-syntax"},
|
||||||
ft = { "quarto" }
|
ft = writing_ft
|
||||||
}
|
}, {'micarmst/vim-spellsync', event = "VeryLazy"}, -- personal dict improvements for git sync
|
||||||
use 'micarmst/vim-spellsync' -- personal dict improvements for git sync
|
{'folke/zen-mode.nvim', config = true, event = "VeryLazy"}, -- provide distraction free writing
|
||||||
use { 'folke/zen-mode.nvim', config = require('zen-mode').setup() } -- provide distraction free writing
|
{'folke/twilight.nvim', event = "VeryLazy"}, -- provide even distraction free-er writing (lowlight paragraphs)
|
||||||
use 'folke/twilight.nvim' -- provide even distraction free-er writing (lowlight paragraphs)
|
{'alok/notational-fzf-vim', event = "VeryLazy"}, -- quickly search through the wiki
|
||||||
use 'alok/notational-fzf-vim' -- quickly search through the wiki
|
{'marty-oehme/zettelkasten.nvim', ft = writing_ft, event = "VeryLazy"}, -- simple static markdown linking
|
||||||
use({
|
{
|
||||||
"iamcco/markdown-preview.nvim", -- generate an auto-updating html preview for md files
|
"iamcco/markdown-preview.nvim", -- generate an auto-updating html preview for md files
|
||||||
run = function() vim.fn["mkdp#util#install"]() end
|
build = function() vim.fn["mkdp#util#install"]() end,
|
||||||
})
|
event = "VeryLazy"
|
||||||
|
}, -- languages
|
||||||
-- languages
|
{'euclidianAce/BetterLua.vim', ft = 'lua'}, -- better syntax highlighting for lua
|
||||||
use { 'euclidianAce/BetterLua.vim', ft = 'lua' } -- better syntax highlighting for lua
|
{'aliou/bats.vim', ft = {"bash", "sh", "zsh", "bats"}}, -- enable syntax for bats shell-code testing library
|
||||||
use 'aliou/bats.vim' -- enable syntax for bats shell-code testing library
|
|
||||||
|
|
||||||
-- REPL work
|
-- REPL work
|
||||||
use {
|
{
|
||||||
'WhiteBlackGoose/magma-nvim-goose',
|
'WhiteBlackGoose/magma-nvim-goose',
|
||||||
run = ":UpdateRemotePlugins",
|
build = ":UpdateRemotePlugins",
|
||||||
config = function()
|
config = function()
|
||||||
vim.g.magma_image_provider = "kitty"
|
vim.g.magma_image_provider = "kitty"
|
||||||
vim.g.magma_automatically_open_output = false
|
vim.g.magma_automatically_open_output = false
|
||||||
end
|
end
|
||||||
}
|
}, -- nvim plugs
|
||||||
|
{
|
||||||
-- nvim plugs
|
|
||||||
use {
|
|
||||||
'echasnovski/mini.nvim',
|
'echasnovski/mini.nvim',
|
||||||
branch = 'stable',
|
version = '*',
|
||||||
config = function() require('plug._mini') end
|
config = function() require('plug._mini') end
|
||||||
}
|
}, {'Iron-E/nvim-cartographer'}, -- makes it easier to set mappings through lua
|
||||||
use 'Iron-E/nvim-cartographer' -- makes it easier to set mappings through lua
|
{
|
||||||
use 'marty-oehme/zettelkasten.nvim' -- simple static markdown linking
|
|
||||||
use {
|
|
||||||
"akinsho/nvim-toggleterm.lua", -- simpler, programmable and multiple terminal toggling for nvim
|
"akinsho/nvim-toggleterm.lua", -- simpler, programmable and multiple terminal toggling for nvim
|
||||||
event = "BufWinEnter",
|
config = function() require('plug._toggleterm') end,
|
||||||
config = function() require('plug._toggleterm') end
|
event = "BufWinEnter"
|
||||||
}
|
},
|
||||||
use {
|
{
|
||||||
"folke/which-key.nvim",
|
"folke/which-key.nvim",
|
||||||
config = function() require("which-key").setup {} end
|
config = function() require("which-key").setup {} end
|
||||||
}
|
}, {
|
||||||
-- extensive organization plugin mimicking orgmode
|
|
||||||
use {
|
|
||||||
"nvim-neorg/neorg",
|
"nvim-neorg/neorg",
|
||||||
config = function() require("plug._neorg") end,
|
config = function() require("plug._neorg") end,
|
||||||
requires = "nvim-lua/plenary.nvim",
|
dependencies = {"nvim-lua/plenary.nvim"},
|
||||||
tag = "*"
|
version = "*",
|
||||||
}
|
ft = "norg"
|
||||||
|
}, -- extensive organization plugin mimicking orgmode
|
||||||
-- fuzzy matching
|
-- fuzzy matching
|
||||||
use {
|
{"nvim-telescope/telescope-fzf-native.nvim", build = 'make'}, {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
requires = {
|
dependencies = {"nvim-lua/popup.nvim", "nvim-lua/plenary.nvim"},
|
||||||
{ "nvim-lua/popup.nvim" }, { "nvim-lua/plenary.nvim" },
|
|
||||||
{ "nvim-telescope/telescope-fzf-native.nvim", run = 'make' }
|
|
||||||
},
|
|
||||||
config = function() require('plug._telescope') end
|
config = function() require('plug._telescope') end
|
||||||
}
|
}, -- snippeting
|
||||||
use {
|
{"hrsh7th/vim-vsnip", event = "InsertEnter"}, -- snippet engine
|
||||||
'protex/better-digraphs.nvim',
|
{"rafamadriz/friendly-snippets", event = "InsertEnter"}, -- many snippets
|
||||||
requires = { { "nvim-telescope/telescope.nvim" } }
|
|
||||||
}
|
|
||||||
|
|
||||||
-- snippeting
|
|
||||||
use { "hrsh7th/vim-vsnip", event = "InsertEnter" } -- snippet engine
|
|
||||||
use { "rafamadriz/friendly-snippets", event = "InsertEnter" } -- many snippets
|
|
||||||
|
|
||||||
-- treesitter
|
-- treesitter
|
||||||
use {
|
{
|
||||||
'nvim-treesitter/nvim-treesitter',
|
'nvim-treesitter/nvim-treesitter',
|
||||||
run = ':TSUpdate',
|
build = ':TSUpdate',
|
||||||
config = function() require('plug._treesitter') end
|
config = function() require('plug._treesitter') end
|
||||||
}
|
}, {'nvim-treesitter/playground', cmd = "TSPlaygroundToggle"}, -- interactively view and query the treesitter tree
|
||||||
use 'nvim-treesitter/playground' -- interactively view and query the treesitter tree
|
{'romgrk/nvim-treesitter-context', event = "BufReadPre", config = true}, -- show current cursor context at top of buffer
|
||||||
use 'romgrk/nvim-treesitter-context' -- show current cursor context at top of buffer
|
{
|
||||||
use {
|
|
||||||
'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches
|
'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches
|
||||||
config = function()
|
config = function()
|
||||||
require 'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
textsubjects = {
|
textsubjects = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
|
@ -197,45 +115,51 @@ require("packer").startup(function()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end
|
end,
|
||||||
}
|
event = "BufReadPre"
|
||||||
use 'p00f/nvim-ts-rainbow' -- rainbow brackets using treesitter
|
}, {'p00f/nvim-ts-rainbow', event = "BufReadPre"}, -- rainbow brackets using treesitter
|
||||||
use 'JoosepAlviste/nvim-ts-context-commentstring' -- improves commenting plugin above by using ts
|
{'JoosepAlviste/nvim-ts-context-commentstring', event = "BufReadPre"}, -- improves commenting plugin above by using ts
|
||||||
use {
|
{
|
||||||
'lewis6991/spellsitter.nvim', -- uses treesitter to highlight spelling errors
|
'lewis6991/spellsitter.nvim', -- uses treesitter to highlight spelling errors
|
||||||
config = function() require('spellsitter').setup() end
|
config = function() require('spellsitter').setup() end,
|
||||||
}
|
event = "BufReadPre"
|
||||||
|
}, -- lsp
|
||||||
-- lsp
|
{'neovim/nvim-lspconfig', event = "VeryLazy"}, -- some common language server configurations
|
||||||
use 'neovim/nvim-lspconfig' -- some commong language server configurations
|
{
|
||||||
use {
|
|
||||||
'simrat39/symbols-outline.nvim',
|
'simrat39/symbols-outline.nvim',
|
||||||
config = function() require('symbols-outline').setup() end
|
config = function() require('symbols-outline').setup() end,
|
||||||
} -- vista-like outline view for code
|
event = "VeryLazy"
|
||||||
use 'ray-x/lsp_signature.nvim'
|
}, -- vista-like outline view for code
|
||||||
use {
|
{'ray-x/lsp_signature.nvim', event = "VeryLazy"},
|
||||||
|
{'ray-x/guihua.lua', build = 'cd lua/fzy && make', event = "VeryLazy"}, {
|
||||||
'ray-x/navigator.lua',
|
'ray-x/navigator.lua',
|
||||||
requires = { 'ray-x/guihua.lua', run = 'cd lua/fzy && make' },
|
config = function() require('plug._lsp') end,
|
||||||
config = function() require('plug._lsp') end
|
event = "VeryLazy"
|
||||||
}
|
}, -- and completion
|
||||||
-- and completion
|
{
|
||||||
use {
|
|
||||||
'hrsh7th/nvim-cmp', -- simple completion engine built specifically for nvim and lsp
|
'hrsh7th/nvim-cmp', -- simple completion engine built specifically for nvim and lsp
|
||||||
requires = {
|
dependencies = {
|
||||||
'onsails/lspkind-nvim', 'andersevenrud/cmp-tmux', -- completion source from adjacent tmux panes
|
'onsails/lspkind-nvim', 'andersevenrud/cmp-tmux', -- completion source from adjacent tmux panes
|
||||||
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path',
|
'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path',
|
||||||
'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip', 'hrsh7th/cmp-nvim-lua',
|
'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip', 'hrsh7th/cmp-nvim-lua',
|
||||||
'kdheepak/cmp-latex-symbols', 'ray-x/cmp-treesitter',
|
'kdheepak/cmp-latex-symbols', 'ray-x/cmp-treesitter',
|
||||||
'f3fora/cmp-spell', 'cbarrete/completion-vcard'
|
'f3fora/cmp-spell', 'cbarrete/completion-vcard'
|
||||||
}
|
},
|
||||||
}
|
event = "VeryLazy",
|
||||||
use {
|
config = function() require('plug._cmp') end
|
||||||
|
}, {
|
||||||
'aspeddro/cmp-pandoc.nvim',
|
'aspeddro/cmp-pandoc.nvim',
|
||||||
requires = { 'nvim-lua/plenary.nvim', 'jbyuki/nabla.nvim' }
|
dependencies = {'nvim-lua/plenary.nvim', 'jbyuki/nabla.nvim'},
|
||||||
|
event = "VeryLazy"
|
||||||
|
}, {
|
||||||
|
"jghauser/papis.nvim",
|
||||||
|
after = {"telescope.nvim", "nvim-cmp"},
|
||||||
|
dependencies = {
|
||||||
|
"kkharji/sqlite.lua", "nvim-lua/plenary.nvim",
|
||||||
|
"MunifTanjim/nui.nvim", "nvim-treesitter/nvim-treesitter"
|
||||||
|
},
|
||||||
|
event = "VeryLazy",
|
||||||
|
rocks = {"lyaml"},
|
||||||
|
config = function() require("papis").setup({}) end
|
||||||
}
|
}
|
||||||
require('plug._cmp')
|
}
|
||||||
|
|
||||||
-- Automatically set up your configuration after cloning packer.nvim
|
|
||||||
-- Put this at the end after all plugins
|
|
||||||
if packer_bootstrap then require('packer').sync() end
|
|
||||||
end)
|
|
||||||
|
|
|
@ -1,14 +1,8 @@
|
||||||
require("helpers.vimoptions")
|
|
||||||
|
|
||||||
local default_builtins_disabled = {"netrw", "netrwPlugin"}
|
local default_builtins_disabled = {"netrw", "netrwPlugin"}
|
||||||
local disable_builtins = function(builtins)
|
local disable_builtins = function(builtins)
|
||||||
for _, plugin in pairs(builtins) do vim.g["loaded_" .. plugin] = 1 end
|
for _, plugin in pairs(builtins) do vim.g["loaded_" .. plugin] = 1 end
|
||||||
end
|
end
|
||||||
|
|
||||||
local apply_options = function(opts)
|
|
||||||
for k, v in pairs(opts) do vim.opt[k] = v end
|
|
||||||
end
|
|
||||||
|
|
||||||
local o = {
|
local o = {
|
||||||
termguicolors = true,
|
termguicolors = true,
|
||||||
-- sets tabs to be 2 characters, expanded into spaces, but still removable with
|
-- sets tabs to be 2 characters, expanded into spaces, but still removable with
|
||||||
|
@ -72,6 +66,9 @@ local o = {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for k, v in pairs(o) do
|
||||||
|
vim.opt[k] = v
|
||||||
|
end
|
||||||
|
|
||||||
vim.api.nvim_set_var('tex_flavor', 'latex')
|
vim.api.nvim_set_var('tex_flavor', 'latex')
|
||||||
apply_options(o)
|
|
||||||
disable_builtins(default_builtins_disabled)
|
disable_builtins(default_builtins_disabled)
|
||||||
|
|
Loading…
Reference in a new issue