Browse Source

Add leap.nvim

master
parent
commit
4d98095c93
5 changed files with 75 additions and 58 deletions
  1. +1
    -0
      .config/nvim/lazy-lock.json
  2. +1
    -1
      .config/nvim/lua/tovi/core/remaps.lua
  3. +11
    -0
      .config/nvim/lua/tovi/plugins/leap.lua
  4. +61
    -56
      .config/nvim/lua/tovi/plugins/nvim-tree.lua
  5. +1
    -1
      .config/nvim/lua/tovi/plugins/telescope.lua

+ 1
- 0
.config/nvim/lazy-lock.json View File

@ -16,6 +16,7 @@
"guihua.lua": { "branch": "master", "commit": "5ad8dba19ce9b9fd8965598984dfdc9c119f97e4" }, "guihua.lua": { "branch": "master", "commit": "5ad8dba19ce9b9fd8965598984dfdc9c119f97e4" },
"harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" }, "harpoon": { "branch": "master", "commit": "21f4c47c6803d64ddb934a5b314dcb1b8e7365dc" },
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" }, "lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
"leap.nvim": { "branch": "main", "commit": "5efe985cf68fac3b6a6dfe7a75fbfaca8db2af9c" },
"lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, "lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "2451adb9bdb0fd32140bf3aa8dbc17ff60050db3" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "2451adb9bdb0fd32140bf3aa8dbc17ff60050db3" },


+ 1
- 1
.config/nvim/lua/tovi/core/remaps.lua View File

@ -89,7 +89,7 @@ vim.keymap.set("n", "<leader>j", "<cmd>cprev<CR>zz", { desc = "Previous item in
-- Easily run global search and replace -- Easily run global search and replace
vim.keymap.set( vim.keymap.set(
"n", "n",
"<leader>s",
"<leader>rr",
[[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]], [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]],
{ desc = "Search and replace for word under cursor" } { desc = "Search and replace for word under cursor" }
) )

+ 11
- 0
.config/nvim/lua/tovi/plugins/leap.lua View File

@ -0,0 +1,11 @@
return {
"ggandor/leap.nvim",
dependencies = {
"tpope/vim-repeat",
},
lazy = false,
config = function()
local leap = require("leap")
leap.add_default_mappings()
end,
}

+ 61
- 56
.config/nvim/lua/tovi/plugins/nvim-tree.lua View File

@ -1,64 +1,69 @@
return { return {
"nvim-tree/nvim-tree.lua",
dependancies = {
"nvim-tree/nvim-web-devicons"
},
"nvim-tree/nvim-tree.lua",
dependancies = {
"nvim-tree/nvim-web-devicons",
},
config = function()
local nvimtree = require("nvim-tree")
config = function()
local nvimtree = require("nvim-tree")
-- recommended settings from nvim-tree documentation
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- recommended settings from nvim-tree documentation
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
-- change color for arrows in tree to light blue
vim.cmd([[ highlight NvimTreeIndentMarker guifg=#3FC5FF ]])
-- change color for arrows in tree to light blue
vim.cmd([[ highlight NvimTreeIndentMarker guifg=#3FC5FF ]])
-- configure nvim-tree
nvimtree.setup({
view = {
width = 35,
relativenumber = true,
},
-- change folder arrow icons
renderer = {
indent_markers = {
enable = true
},
icons = {
glyphs = {
folder = {
arrow_closed = "", -- arrow when folder is closed
arrow_open = "", -- arrow when folder is open
},
},
},
},
-- disable window_picker for
-- explorer to work well with
-- window splits
actions = {
open_file = {
window_picker = {
enable = false,
},
},
},
filters = {
custom = { ".DS_Store" },
},
git = {
ignore = false,
},
})
-- configure nvim-tree
nvimtree.setup({
view = {
width = 35,
relativenumber = true,
},
-- change folder arrow icons
renderer = {
indent_markers = {
enable = true,
},
icons = {
glyphs = {
folder = {
arrow_closed = "", -- arrow when folder is closed
arrow_open = "", -- arrow when folder is open
},
},
},
},
-- disable window_picker for
-- explorer to work well with
-- window splits
actions = {
open_file = {
window_picker = {
enable = false,
},
},
},
filters = {
custom = { ".DS_Store" },
},
git = {
ignore = false,
},
})
-- set keymaps
local keymap = vim.keymap -- for conciseness
-- set keymaps
local keymap = vim.keymap -- for conciseness
keymap.set("n", "<C-q>", "<cmd>NvimTreeToggle<CR>", { desc = "Toggle file explorer" }) -- toggle file explorer
keymap.set("n", "<leader>ee", "<cmd>NvimTreeToggle<CR>", { desc = "Toggle file explorer" }) -- toggle file explorer
keymap.set("n", "<leader>ef", "<cmd>NvimTreeFindFileToggle<CR>", { desc = "Toggle file explorer on current file" }) -- toggle file explorer on current file
keymap.set("n", "<leader>ec", "<cmd>NvimTreeCollapse<CR>", { desc = "Collapse file explorer" }) -- collapse file explorer
keymap.set("n", "<leader>er", "<cmd>NvimTreeRefresh<CR>", { desc = "Refresh file explorer" }) -- refresh file explorer
end,
keymap.set("n", "<C-q>", "<cmd>NvimTreeFindFileToggle<CR>", { desc = "Toggle file explorer" }) -- toggle file explorer
keymap.set("n", "<leader>ee", "<cmd>NvimTreeToggle<CR>", { desc = "Toggle file explorer" }) -- toggle file explorer
keymap.set(
"n",
"<leader>ef",
"<cmd>NvimTreeFindFileToggle<CR>",
{ desc = "Toggle file explorer on current file" }
) -- toggle file explorer on current file
keymap.set("n", "<leader>ec", "<cmd>NvimTreeCollapse<CR>", { desc = "Collapse file explorer" }) -- collapse file explorer
keymap.set("n", "<leader>er", "<cmd>NvimTreeRefresh<CR>", { desc = "Refresh file explorer" }) -- refresh file explorer
end,
} }

+ 1
- 1
.config/nvim/lua/tovi/plugins/telescope.lua View File

@ -104,7 +104,7 @@ return {
keymap.set("n", "<leader>ch", builtin.command_history, { desc = "Fuzzy find recent commands" }) keymap.set("n", "<leader>ch", builtin.command_history, { desc = "Fuzzy find recent commands" })
keymap.set("n", "<leader>gb", git_branches, { desc = "Fuzzy find git branches" }) keymap.set("n", "<leader>gb", git_branches, { desc = "Fuzzy find git branches" })
keymap.set("n", "<leader>gs", builtin.git_status, { desc = "Fuzzy find current git status" })
-- keymap.set("n", "<leader>gs", builtin.git_status, { desc = "Fuzzy find current git status" })
keymap.set("n", "<leader>df", function() keymap.set("n", "<leader>df", function()
builtin.find_files({ builtin.find_files({


Loading…
Cancel
Save