From f64a6c429702293e62012d02bf36827741d237b1 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Sat, 25 Feb 2023 06:42:21 +0100 Subject: [PATCH] Replace hop with leap --- .chezmoiignore | 1 + dot_config/nvim/after/plugin/hop.lua | 14 -------------- dot_config/nvim/init.lua.tmpl | 16 ++++++++++------ 3 files changed, 11 insertions(+), 20 deletions(-) delete mode 100644 dot_config/nvim/after/plugin/hop.lua diff --git a/.chezmoiignore b/.chezmoiignore index e957a16..1f33873 100644 --- a/.chezmoiignore +++ b/.chezmoiignore @@ -1,4 +1,5 @@ README.md +.config/nvim/README.md LICENSE {{ if eq .chezmoi.os "darwin" }} .muttrc diff --git a/dot_config/nvim/after/plugin/hop.lua b/dot_config/nvim/after/plugin/hop.lua deleted file mode 100644 index d79a57e..0000000 --- a/dot_config/nvim/after/plugin/hop.lua +++ /dev/null @@ -1,14 +0,0 @@ -local ok, hop = pcall(require, 'hop') -if not ok then - return -end - -hop.setup { - quit_key = '', - uppercase_labels = true -} - -local map = vim.keymap.set -map('n', 'f', function() hop.hint_char1({current_line_only = true }) end, {remap=true}) -map('n', 's', function() hop.hint_char2() end, {remap=true}) - diff --git a/dot_config/nvim/init.lua.tmpl b/dot_config/nvim/init.lua.tmpl index c08a7fe..a1f3acf 100644 --- a/dot_config/nvim/init.lua.tmpl +++ b/dot_config/nvim/init.lua.tmpl @@ -42,7 +42,7 @@ require "paq" { "kylechui/nvim-surround"; "windwp/nvim-autopairs"; "numToStr/Comment.nvim"; - { "phaazon/hop.nvim", branch = "v2" }; + "ggandor/leap.nvim"; -- Fuzzy search { "nvim-telescope/telescope-fzf-native.nvim", run = "gmake" }; @@ -74,6 +74,8 @@ require('nvim-autopairs').setup({ fast_wrap = {}, }) +require('leap').add_default_mappings() + require 'colorizer'.setup { filetypes = { 'css', @@ -93,11 +95,11 @@ require('lualine').setup { } require('indent_blankline').setup({ - char = '▏', - show_trailing_blankline_indent = false, - show_first_indent_level = false, - use_treesitter = true, - show_current_context = false + char = '▏', + show_trailing_blankline_indent = false, + show_first_indent_level = false, + use_treesitter = true, + show_current_context = false }) require('toggleterm').setup({ @@ -288,3 +290,5 @@ map('n', 'xx', 'TroubleToggle', { noremap = true, silent = true map('n', 'xd', 'TroubleToggle document_diagnostics', { noremap = true, silent = true }) map('n', 'xl', 'TroubleToggle loclist', { noremap = true, silent = true }) map('n', 'xq', 'TroubleToggle quickfix', { noremap = true, silent = true }) + +map('n', 'g', 'vertical rightbelow Git', { noremap = true, silent = true })