diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-06-30 18:41:19 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-06-30 18:41:19 +0300 |
| commit | 5926130df235ac17c19b695fff0e8fa4a39c1be2 (patch) | |
| tree | 5d38ca4ca6f7c8543eca36ff23d7c9b4b51401a4 /.config | |
| parent | 51317d03296c67af8dfee1564d72790883ad6d06 (diff) | |
Modified nvim keybindings and updated neotree.nvim config
Diffstat (limited to '.config')
| -rw-r--r-- | .config/nvim/lua/keymaps.lua | 11 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/neotree.lua | 3 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/telescope.lua | 8 |
3 files changed, 12 insertions, 10 deletions
diff --git a/.config/nvim/lua/keymaps.lua b/.config/nvim/lua/keymaps.lua index 95144dd..1fa730d 100644 --- a/.config/nvim/lua/keymaps.lua +++ b/.config/nvim/lua/keymaps.lua @@ -1,12 +1,16 @@ -- Misc vim.keymap.set({ 'n', 'i' }, '<C-a>', '<Esc>ggVG', { desc = 'Visually Highlight [A]ll' }) vim.keymap.set('n', '<Esc>', ':nohlsearch<CR>') +vim.keymap.set('n', '<leader>z', function() + vim.cmd('Neotree close') +end, { desc = '[Z]en Mode' }) +vim.keymap.set('n', 'U', ':redo<cr>') -- Window Navigation vim.keymap.set('n', '<C-h>', '<C-w><C-h>', { desc = 'Move focus to the left window' }) +vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the down window' }) +vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the up window' }) vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right window' }) -vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' }) -vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' }) -- Window resizing local resize = 2 @@ -18,6 +22,3 @@ vim.keymap.set('n', '<C-Right>', string.format(':vertical resize +%d<CR>', resiz -- Keep selection after < and > vim.keymap.set('v', '<', '<gv', {}) vim.keymap.set('v', '>', '>gv', {}) - --- todo.lua -vim.keymap.set('n', '<leader>ft', ':TodoTelescope<cr>', { desc = '[F]ind [T]odos' }) diff --git a/.config/nvim/lua/plugins/neotree.lua b/.config/nvim/lua/plugins/neotree.lua index df85fca..5903bef 100644 --- a/.config/nvim/lua/plugins/neotree.lua +++ b/.config/nvim/lua/plugins/neotree.lua @@ -7,6 +7,7 @@ return { 'MunifTanjim/nui.nvim', }, config = function() - vim.keymap.set('n', 'gp', ':Neotree<CR>', { desc = '[F]ind Recent Files ("." for repeat)' }) + vim.keymap.set('n', '<leader>gp', ':Neotree toggle reveal left<cr>', { desc = '[G]oto [P]roject (toggle)' }) + vim.keymap.set('n', 'gp', ':Neotree float<cr>', { desc = '[G]oto [P]roject (floating)' }) end, } diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 90add72..077f253 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -26,7 +26,7 @@ return { vim.keymap.set('n', '<leader>ds', builtin.lsp_document_symbols, { desc = '[D]ocument [S]symbols' }) vim.keymap.set('n', '<leader>ps', builtin.lsp_workspace_symbols, { desc = '[P]roject [S]ymbols' }) - + vim.keymap.set('n', '<leader>st', ':TodoTelescope<cr>', { desc = '[S]earch [T]odos' }) vim.keymap.set('n', '<leader>ca', vim.lsp.buf.code_action, { desc = '[C]ode [A]ction' }) vim.keymap.set('n', '<M-Enter>', vim.lsp.buf.code_action, { desc = 'Code Actions' }) @@ -64,10 +64,10 @@ return { require('telescope.themes').get_dropdown({}), }, fzf = { - fuzzy = true, -- false will only do exact matching + fuzzy = true, -- false will only do exact matching override_generic_sorter = true, -- override the generic sorter - override_file_sorter = true, -- override the file sorter - case_mode = 'smart_case', -- or "ignore_case" or "respect_case" + override_file_sorter = true, -- override the file sorter + case_mode = 'smart_case', -- or "ignore_case" or "respect_case" -- the default case_mode is "smart_case" }, }, |
