From 81c3cd2ac0c16a454c37482ab4a924067f83ea4d Mon Sep 17 00:00:00 2001 From: Omixxx Date: Wed, 1 Mar 2023 17:44:55 +0100 Subject: [PATCH] add shortcuts and leap work foreward and backward with "s" --- init.lua | 17 ++++++++--------- lua/custom/plugins/folding.lua | 34 ---------------------------------- lua/custom/plugins/lazygit.lua | 3 ++- lua/custom/plugins/leap.lua | 4 ++++ lua/custom/plugins/themes.lua | 8 ++++++++ 5 files changed, 22 insertions(+), 44 deletions(-) delete mode 100644 lua/custom/plugins/folding.lua diff --git a/init.lua b/init.lua index 96f6d544..2ae022b5 100644 --- a/init.lua +++ b/init.lua @@ -126,19 +126,19 @@ require('lazy').setup({ }, }, - { -- Theme inspired by Atom - 'navarasu/onedark.nvim', - }, - { -- Add indentation guides even on blank lines 'lukas-reineke/indent-blankline.nvim', -- Enable `lukas-reineke/indent-blankline.nvim` -- See `:help indent_blankline.txt` - opts = { - char = '┊', - show_trailing_blankline_indent = false, - }, + config = function() + require("indent_blankline").setup { + char = '┊', + show_trailing_blankline_indent = false, + show_current_context = true, + } + end, + }, -- "gc" to comment visual regions/lines @@ -327,7 +327,6 @@ vim.api.nvim_set_keymap('v', 'v', '"_d', { noremap = true, silent = true vim.api.nvim_set_keymap('i', '', '', { noremap = true, desc = "delete word" }) - -- trucco sul relplace. -- selezionare la sezione in cui si vuole rimpiazzare una parola (si puo anche non -- selezionare, funziona lo stesso) e poi premere : seguito da s/parolaDaCercare/parolaDaSostituire diff --git a/lua/custom/plugins/folding.lua b/lua/custom/plugins/folding.lua deleted file mode 100644 index e868bdf2..00000000 --- a/lua/custom/plugins/folding.lua +++ /dev/null @@ -1,34 +0,0 @@ --- return { --- { 'kevinhwang91/nvim-ufo', --- dependecies = { 'kevinhwang91/promise-async' }, --- config = function() --- vim.o.foldcolumn = "2" -- '0' is not bad --- vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value --- vim.o.foldlevelstart = 99 --- vim.o.foldenable = true --- vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]] --- --- -- Using ufo provider need remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself --- vim.keymap.set('n', 'zR', require('ufo').openAllFolds) --- vim.keymap.set('n', 'zM', require('ufo').closeAllFolds) --- --- --- -- Option 2: nvim lsp as LSP client --- -- Tell the server the capability of foldingRange, --- -- Neovim hasn't added foldingRange to default capabilities, users must add it manually --- local capabilities = vim.lsp.protocol.make_client_capabilities() --- capabilities.textDocument.foldingRange = { --- dynamicRegistration = false, --- lineFoldingOnly = true --- } --- local language_servers = require("lspconfig").util.available_servers() -- or list servers manually like {'gopls', 'clangd'} --- for _, ls in ipairs(language_servers) do --- require('lspconfig')[ls].setup({ --- capabilities = capabilities --- -- you can add other fields for setting up lsp server in this table --- }) --- end --- require('ufo').setup() --- end, --- } --- } diff --git a/lua/custom/plugins/lazygit.lua b/lua/custom/plugins/lazygit.lua index 6b787358..7b75aa24 100644 --- a/lua/custom/plugins/lazygit.lua +++ b/lua/custom/plugins/lazygit.lua @@ -1,3 +1,4 @@ return { - 'kdheepak/lazygit.nvim' + 'kdheepak/lazygit.nvim', + vim.api.nvim_set_keymap('n', 'gg', ':LazyGit', { noremap = true, silent = true }) } diff --git a/lua/custom/plugins/leap.lua b/lua/custom/plugins/leap.lua index f7153d54..5bf2ed37 100644 --- a/lua/custom/plugins/leap.lua +++ b/lua/custom/plugins/leap.lua @@ -2,5 +2,9 @@ return { "ggandor/leap.nvim", config = function() require('leap').add_default_mappings() + vim.keymap.set('n', 's', function() + local current_window = vim.fn.win_getid() + require('leap').leap { target_windows = { current_window } } + end) end } diff --git a/lua/custom/plugins/themes.lua b/lua/custom/plugins/themes.lua index 875b9d09..0c7ebec3 100644 --- a/lua/custom/plugins/themes.lua +++ b/lua/custom/plugins/themes.lua @@ -13,6 +13,14 @@ return { { -- Theme inspired by Atom 'navarasu/onedark.nvim', }, + { + "ellisonleao/gruvbox.nvim", + -- config = function() + -- vim.o.background = "light" + -- vim.cmd.colorscheme 'gruvbox' + -- end, + + } }