nvim: Update plugins and lazy loading

This commit is contained in:
Marty Oehme 2023-12-12 15:43:44 +01:00
parent 116cbe79be
commit ca7d43ba51
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
6 changed files with 54 additions and 44 deletions

View file

@ -57,11 +57,11 @@ cmp.setup({
{ name = "calc" },
{ name = "path" },
{ name = "buffer", keyword_length = 3 },
{ name = "digraphs" },
{ name = "latex_symbols" },
{ name = "spell", keyword_length = 3 },
{ name = "tmux" }, -- { name = 'rg', keyword_length = 5 },
{ name = "vCard" },
{ name = "digraphs" },
},
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
@ -112,18 +112,19 @@ cmp.setup({
-- Kind icons, removing kind text leaving only icon
-- vim_item.kind = string.format('%s %s', kind_icons[vim_item.kind], vim_item.kind)
vim_item.kind = string.format("%s", kind_icons[vim_item.kind])
-- Source
vim_item.menu = ({
buffer = "[Buf]",
calc = "[Cal]",
digraphs = "[Dig]",
latex_symbols = "[LaTeX]",
luasnip = "[Snip]",
nvim_lsp = "[Lsp]",
nvim_lua = "[Lua]",
pandoc_references = "[Bib]",
spell = "[Spl]",
vCard = "[vCrd]",
buffer = "",
calc = "󰃬",
digraphs = "",
latex_symbols = "󰊄",
luasnip = "",
nvim_lsp = "",
nvim_lua = "󰢱",
pandoc_references = "",
spell = "󰓆",
vCard = "󰛋",
})[entry.source.name]
return vim_item
end,

View file

@ -7,16 +7,14 @@ return {
event = "VeryLazy",
},
-- jump between letters with improved fFtT quicksearch, mimics sneak
{ "ggandor/lightspeed.nvim", event = "VeryLazy" },
{ "ggandor/lightspeed.nvim", event = "BufEnter" },
-- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank
{ "ojroques/vim-oscyank", event = "VeryLazy" },
-- personal dict improvements for git sync
{ "micarmst/vim-spellsync", event = "VeryLazy" },
{
"folke/which-key.nvim",
config = true,
event = "VeryLazy",
event = "CursorHold",
},
-- collection of plugins
{
@ -42,10 +40,14 @@ return {
priority = 1000,
dependencies = { "rktjmp/fwatch.nvim" },
},
-- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, ..
{
'stevearc/stickybuf.nvim',
config = true,
}
-- try to avoid putting files in util buffers, e.g. filetree, aerial, undotree, ..
{
"stevearc/stickybuf.nvim",
config = true,
},
-- make it a little less painful to open really big (>2mb) files by disabling features
{
"LunarVim/bigfile.nvim",
lazy = false,
},
}

View file

@ -18,7 +18,8 @@ return {
},
{
"lewis6991/gitsigns.nvim", -- show vcs changes on left-hand gutter
event = "VeryLazy",
event = { "InsertEnter", "CursorHold" },
cmd = "Gitsigns",
config = function()
require("gitsigns").setup({
numhl = true,

View file

@ -51,11 +51,11 @@ return {
{ "stevearc/dressing.nvim", config = true, event = "VeryLazy" },
-- numbers to absolute for all buffers but the current which is relative
{ "jeffkreeftmeijer/vim-numbertoggle", event = "VeryLazy" },
{ "jeffkreeftmeijer/vim-numbertoggle", event = "BufEnter" },
-- auto-hiding colorcolumn
{
"m4xshen/smartcolumn.nvim",
event = "VeryLazy",
event = "BufEnter",
opts = {
colorcolumn = { "100" },
scope = "window",
@ -79,7 +79,20 @@ return {
user_default_options = { mode = "virtualtext" },
})
end,
event = "VeryLazy",
cmd = {
"ColorizerToggle",
"ColorizerAttachToBuffer",
"ColorizerDetachFromBuffer",
"ColorizerReloadAllBuffers",
},
keys = {
{ "<localleader>sc", "<cmd>ColorizerToggle<cr>", { silent = true, desc = "toggle colorizer" } },
{
"<localleader>sC",
'<cmd>lua require("colorizer").attach_to_buffer(0, {mode = "background"} )<cr>',
{ silent = true, desc = "colorize background" },
},
},
},
{
"jiaoshijie/undotree",