Adds keybind for renaming
This commit is contained in:
parent
b168a4b4e1
commit
d84cb45a4a
34
init.lua
34
init.lua
|
@ -293,6 +293,31 @@ require('lazy').setup({
|
|||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"abecodes/tabout.nvim",
|
||||
after = { "nvim-cmp" },
|
||||
event = "InsertEnter",
|
||||
opts = {
|
||||
tabkey = '<Tab>', -- key to trigger tabout, set to an empty string to disable
|
||||
backwards_tabkey = '<S-Tab>', -- key to trigger backwards tabout, set to an empty string to disable
|
||||
act_as_tab = true, -- shift content if tab out is not possible
|
||||
act_as_shift_tab = false, -- reverse shift content if tab out is not possible (if your keyboard/terminal supports <S-Tab>)
|
||||
default_tab = '<C-t>', -- shift default action (only at the beginning of a line, otherwise <TAB> is used)
|
||||
default_shift_tab = '<C-d>', -- reverse shift default action,
|
||||
enable_backwards = true, -- well ...
|
||||
-- completion = true, -- if the tabkey is used in a completion pum
|
||||
tabouts = {
|
||||
{ open = "'", close = "'" },
|
||||
{ open = '"', close = '"' },
|
||||
{ open = '`', close = '`' },
|
||||
{ open = '(', close = ')' },
|
||||
{ open = '[', close = ']' },
|
||||
{ open = '{', close = '}' }
|
||||
},
|
||||
-- ignore_beginning = true, --[[ if the cursor is at the beginning of a filled element it will rather tab out than shift the content ]]
|
||||
exclude = {} -- tabout will ignore these filetypes
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
||||
|
@ -371,19 +396,22 @@ vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnos
|
|||
vim.keymap.set('n', '<leader>e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' })
|
||||
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' })
|
||||
|
||||
-- [[ substitute ]]
|
||||
-- substitute
|
||||
|
||||
vim.keymap.set("n", "gr", require('substitute').operator, { noremap = true })
|
||||
vim.keymap.set("n", "grr", require('substitute').line, { noremap = true })
|
||||
vim.keymap.set("x", "gr", require('substitute').visual, { noremap = true })
|
||||
|
||||
-- [[ clipboad ]]
|
||||
-- clipboad
|
||||
vim.keymap.set({ "n", "v" }, "<leader>y", '"+y')
|
||||
vim.keymap.set({ "n", "v" }, "<leader>p", '"+p')
|
||||
vim.keymap.set({ "n", "v" }, "<leader>gr", function() require('substitute').operator({ register = "+" }) end,
|
||||
{ noremap = true })
|
||||
vim.keymap.set({ "n", "v" }, "<leader>grr", function() require('substitute').line({ register = "+" }) end,
|
||||
{ noremap = true })
|
||||
-- replace word under cursor
|
||||
vim.keymap.set({ "n" }, "<leader>rr", '*``cgn')
|
||||
|
||||
|
||||
-- [[ Highlight on yank ]]
|
||||
-- See `:help vim.highlight.on_yank()`
|
||||
|
@ -482,7 +510,7 @@ vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc =
|
|||
vim.defer_fn(function()
|
||||
require('nvim-treesitter.configs').setup {
|
||||
-- Add languages to be installed here that you want installed for treesitter
|
||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' },
|
||||
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash', "haskell" },
|
||||
|
||||
-- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!)
|
||||
auto_install = false,
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "c71406807b545f4a2c17310197a8c88b976f338d" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "366b0837486f60ae0e7550c15de8ff66d057c4cd" },
|
||||
"substitute.nvim": { "branch": "main", "commit": "17ffaeb5a1dc2dbef39cf0865d8a4b6000836714" },
|
||||
"tabout.nvim": { "branch": "master", "commit": "0d275c8d25f32457e67b5c66d6ae43f26a61bce5" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
|
||||
"vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" },
|
||||
|
|
Loading…
Reference in New Issue