Skip to content

Commit 4b2e6d8

Browse files
committed
lazy? lazy!
1 parent 6edd835 commit 4b2e6d8

4 files changed

Lines changed: 36 additions & 16 deletions

File tree

‎after/plugin/mappings.lua‎

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,11 @@ vim.keymap.set('n', "<leader>gt", function() require("telescope.builtin").git_st
9494
vim.keymap.set('n', '<leader>r', "<cmd>SessionManager load_session<cr>", { desc = 'Load Sessions' })
9595

9696
-- hop.nvim
97-
-- normal mode (easymotion-like)
98-
vim.keymap.set("n", "<Leader><Leader>b", "<cmd>HopWordBC<CR>", {noremap=true});
99-
vim.keymap.set("n", "<Leader><Leader>w", "<cmd>HopWordAC<CR>", {noremap=true});
100-
vim.keymap.set("n", "<Leader><Leader>j", "<cmd>HopLineAC<CR>", {noremap=true});
101-
vim.keymap.set("n", "<Leader><Leader>k", "<cmd>HopLineBC<CR>", {noremap=true});
102-
-- visual mode (easymotion-like)
103-
vim.keymap.set("x", "<Leader><Leader>w", "<cmd>HopWordAC<CR>", {noremap=true});
104-
vim.keymap.set("x", "<Leader><Leader>b", "<cmd>HopWordBC<CR>", {noremap=true});
105-
vim.keymap.set("x", "<Leader><Leader>j", "<cmd>HopLineAC<CR>", {noremap=true});
106-
vim.keymap.set("x", "<Leader><Leader>k", "<cmd>HopLineBC<CR>", {noremap=true});
97+
-- normal & visual mode (easymotion-like)
98+
vim.keymap.set({"n","x"}, "<Leader><Leader>b", "<cmd>HopWordBC<CR>", {noremap=true});
99+
vim.keymap.set({"n","x"}, "<Leader><Leader>w", "<cmd>HopWordAC<CR>", {noremap=true});
100+
vim.keymap.set({"n","x"}, "<Leader><Leader>j", "<cmd>HopLineAC<CR>", {noremap=true});
101+
vim.keymap.set({"n","x"}, "<Leader><Leader>k", "<cmd>HopLineBC<CR>", {noremap=true});
107102
-- (sneak-like) in all mode.
108103
vim.keymap.set("", "s", "<cmd>HopChar2AC<CR>", {noremap=false});
109104
vim.keymap.set("", "S", "<cmd>HopChar2BC<CR>", {noremap=false});

‎init.lua‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ local leader = ' '
66
vim.g.mapleader = leader
77
vim.g.maplocalleader = leader
88

9+
10+
-- disable builtin plugins
11+
vim.g.loaded_matchit = 1
12+
913
-- seperate options to dedicate file
1014
require("kickstart.options")
1115

@@ -34,7 +38,14 @@ require('lazy').setup({
3438
-- NOTE: First, some plugins that don't require any configuration
3539

3640
-- Git related plugins
37-
'tpope/vim-fugitive',
41+
{
42+
'tpope/vim-fugitive',
43+
cmd = {
44+
"Git",
45+
"Gedit",
46+
"G",
47+
}
48+
},
3849
-- Github extension for fugitive
3950
'tpope/vim-rhubarb',
4051

@@ -61,7 +72,9 @@ require('lazy').setup({
6172
},
6273

6374
-- Useful plugin to show you pending keybinds.
64-
{ 'folke/which-key.nvim',
75+
{
76+
'folke/which-key.nvim',
77+
event = "VeryLazy",
6578
init = function()
6679
vim.o.timeout = true
6780
vim.o.timeoutlen = 700
@@ -71,6 +84,7 @@ require('lazy').setup({
7184
{
7285
-- Adds git releated signs to the gutter, as well as utilities for managing changes
7386
'lewis6991/gitsigns.nvim',
87+
event = "VeryLazy",
7488
opts = {
7589
-- See `:help gitsigns.txt`
7690
signs = {

‎lua/custom/plugins/filetree.lua‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
return {
22
"nvim-neo-tree/neo-tree.nvim",
3-
event = "VeryLazy",
3+
cmd = {
4+
"Neotree",
5+
"NeoTreeReveal",
6+
},
47
version = "*",
58
dependencies = {
69
"nvim-lua/plenary.nvim",

‎lua/custom/plugins/init.lua‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,15 @@ return {
2929
{
3030
-- better navigation in current buffer
3131
"aznhe21/hop.nvim",
32-
enabled = true,
32+
cmd = {
33+
"HopWordBC",
34+
"HopWordAC",
35+
"HopLineAC",
36+
"HopLineBC",
37+
"HopChar2AC",
38+
"HopChar2BC",
39+
},
3340
branch= 'fix-some-bugs',
34-
event = "VeryLazy",
3541
config = function()
3642
require("hop").setup({
3743
-- Configuration here, or leave empty to use defaults
@@ -80,7 +86,9 @@ return {
8086
-- terminal setup
8187
"akinsho/toggleterm.nvim",
8288
tags = '*',
83-
event = "VeryLazy",
89+
keys = {
90+
"<M-j>"
91+
},
8492
config = function()
8593
require("toggleterm").setup{
8694
direction = "horizontal",

0 commit comments

Comments
 (0)