From f5f41ed79cab9628ecb401611f885758bfc614d6 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Thu, 10 Oct 2024 10:06:14 +0200 Subject: nvim: lazy load bunch of plugins --- .config/nvim/lua/plugins/git.lua | 1 + .config/nvim/lua/plugins/lsp.lua | 2 ++ .config/nvim/lua/plugins/lualine.lua | 1 + .config/nvim/lua/plugins/nvim-tree.lua | 1 - .config/nvim/lua/plugins/telescope.lua | 1 - .config/nvim/lua/plugins/vimwiki.lua | 15 +++++++-------- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.config/nvim/lua/plugins/git.lua b/.config/nvim/lua/plugins/git.lua index d8e27f9..ca5c119 100644 --- a/.config/nvim/lua/plugins/git.lua +++ b/.config/nvim/lua/plugins/git.lua @@ -103,6 +103,7 @@ return { "sindrets/diffview.nvim", -- optional - Diff integration "nvim-telescope/telescope.nvim", -- optional }, + cmd="Neogit", config = true } } diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua index 88ebd12..5153eaf 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua @@ -1,6 +1,8 @@ return { { "neovim/nvim-lspconfig", + event = { "BufReadPost", "BufNewFile" }, + cmd = { "LspInfo", "LspInstall", "LspUninstall" }, dependencies = { "j-hui/fidget.nvim", "RRethy/vim-illuminate", diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua index c4e936e..ba1099e 100644 --- a/.config/nvim/lua/plugins/lualine.lua +++ b/.config/nvim/lua/plugins/lualine.lua @@ -30,6 +30,7 @@ end return { "nvim-lualine/lualine.nvim", + event = "VeryLazy", dependencies = { "nvim-tree/nvim-web-devicons" }, diff --git a/.config/nvim/lua/plugins/nvim-tree.lua b/.config/nvim/lua/plugins/nvim-tree.lua index 422a402..667a873 100644 --- a/.config/nvim/lua/plugins/nvim-tree.lua +++ b/.config/nvim/lua/plugins/nvim-tree.lua @@ -1,7 +1,6 @@ return { { "nvim-tree/nvim-tree.lua", - lazy = false, dependencies = { "nvim-tree/nvim-web-devicons", }, diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 6acc9a6..40c99a4 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -11,7 +11,6 @@ return { }, "gbprod/yanky.nvim", }, - lazy = false, config = function() require('telescope').setup({ defaults = { diff --git a/.config/nvim/lua/plugins/vimwiki.lua b/.config/nvim/lua/plugins/vimwiki.lua index a114b04..5f1d661 100644 --- a/.config/nvim/lua/plugins/vimwiki.lua +++ b/.config/nvim/lua/plugins/vimwiki.lua @@ -1,6 +1,6 @@ return { { - "yigitsever/vimwiki", + "vimwiki/vimwiki", init = function() vim.g.vimwiki_list = { { @@ -17,13 +17,12 @@ return { } vim.g.vimwiki_global_ext = 0 vim.g.vimwiki_hl_headers = 1 - - local map = require("helpers.keys").map - - --toggle checkmarks - map('n', 'v', 'VimwikiToggleListItem', "vimwiki: toggle checkmark") - -- add/increase header level - map('n', 'a', 'VimwikiAddHeaderLevel', "vimwiki: add header level") end, + keys = { + { "ww", "VimwikiIndex", "vimwiki: goto wiki" }, + { "v", "VimwikiToggleListItem", "vimwiki: toggle checkmark" }, + { "a", "VimwikiAddHeaderLevel", "vimwiki: add header level" } + }, + ft = { "vimwiki" } }, } -- cgit v1.2.3-70-g09d2