add shortcuts and leap work foreward and backward with "s"

This commit is contained in:
Omixxx 2023-03-01 17:44:55 +01:00
parent ae9fc10678
commit 81c3cd2ac0
5 changed files with 22 additions and 44 deletions

View File

@ -126,19 +126,19 @@ require('lazy').setup({
}, },
}, },
{ -- Theme inspired by Atom
'navarasu/onedark.nvim',
},
{ -- Add indentation guides even on blank lines { -- Add indentation guides even on blank lines
'lukas-reineke/indent-blankline.nvim', 'lukas-reineke/indent-blankline.nvim',
-- Enable `lukas-reineke/indent-blankline.nvim` -- Enable `lukas-reineke/indent-blankline.nvim`
-- See `:help indent_blankline.txt` -- See `:help indent_blankline.txt`
opts = { config = function()
char = '', require("indent_blankline").setup {
show_trailing_blankline_indent = false, char = '',
}, show_trailing_blankline_indent = false,
show_current_context = true,
}
end,
}, },
-- "gc" to comment visual regions/lines -- "gc" to comment visual regions/lines
@ -327,7 +327,6 @@ vim.api.nvim_set_keymap('v', '<leader>v', '"_d', { noremap = true, silent = true
vim.api.nvim_set_keymap('i', '<C-k>', '<C-W>', { noremap = true, desc = "delete word" }) vim.api.nvim_set_keymap('i', '<C-k>', '<C-W>', { noremap = true, desc = "delete word" })
-- trucco sul relplace. -- trucco sul relplace.
-- selezionare la sezione in cui si vuole rimpiazzare una parola (si puo anche non -- 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 -- selezionare, funziona lo stesso) e poi premere : seguito da s/parolaDaCercare/parolaDaSostituire

View File

@ -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,
-- }
-- }

View File

@ -1,3 +1,4 @@
return { return {
'kdheepak/lazygit.nvim' 'kdheepak/lazygit.nvim',
vim.api.nvim_set_keymap('n', '<leader>gg', ':LazyGit<CR>', { noremap = true, silent = true })
} }

View File

@ -2,5 +2,9 @@ return {
"ggandor/leap.nvim", "ggandor/leap.nvim",
config = function() config = function()
require('leap').add_default_mappings() 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 end
} }

View File

@ -13,6 +13,14 @@ return {
{ -- Theme inspired by Atom { -- Theme inspired by Atom
'navarasu/onedark.nvim', 'navarasu/onedark.nvim',
}, },
{
"ellisonleao/gruvbox.nvim",
-- config = function()
-- vim.o.background = "light"
-- vim.cmd.colorscheme 'gruvbox'
-- end,
}
} }