2021-12-04 11:43:26 +02:00
|
|
|
require 'common'
|
2021-08-08 15:33:23 +03:00
|
|
|
|
|
|
|
-- Open/close tree browser
|
2022-02-03 11:12:23 +02:00
|
|
|
MapKey('n', '<C-T>', '<cmd>NvimTreeToggle<CR>')
|
2021-08-08 15:33:23 +03:00
|
|
|
|
|
|
|
-- Telescope
|
2021-12-04 11:43:26 +02:00
|
|
|
MapKey('n', '<C-f>', '<cmd>Telescope find_files find_command=fd,-Ht,f<CR>')
|
|
|
|
MapKey('n', '<C-g>', '<cmd>Telescope live_grep<CR>')
|
2021-08-08 15:33:23 +03:00
|
|
|
|
|
|
|
-- Completion
|
|
|
|
-- Navigate completions with tab and shift tab
|
2021-12-04 11:43:26 +02:00
|
|
|
MapKey('i', '<S-Tab>', 'pumvisible() ? "\\<C-p>" : "\\<Tab>"', {expr = true})
|
|
|
|
MapKey('i', '<Tab>', 'pumvisible() ? "\\<C-n>" : "\\<Tab>"', {expr = true})
|
2021-08-08 15:33:23 +03:00
|
|
|
|
|
|
|
-- Navigate between buffers
|
2021-12-04 11:43:26 +02:00
|
|
|
MapKey('n', '<C-N>', ':bn<CR>', {silent = true})
|
|
|
|
MapKey('n', '<C-B>', ':bp<CR>', {silent = true})
|
2021-08-08 15:33:23 +03:00
|
|
|
|
|
|
|
-- Navigate between splits
|
2021-12-04 11:43:26 +02:00
|
|
|
MapKey('n', '<C-H>', '<C-W><C-H>')
|
|
|
|
MapKey('n', '<C-J>', '<C-W><C-J>')
|
|
|
|
MapKey('n', '<C-K>', '<C-W><C-K>')
|
|
|
|
MapKey('n', '<C-L>', '<C-W><C-L>')
|
2022-01-15 12:32:28 +02:00
|
|
|
|
|
|
|
-- FZF
|
2022-02-03 11:26:12 +02:00
|
|
|
MapKey('n', '<C-f>', "<cmd>lua require('fzf-lua').files()<CR>")
|
2022-01-31 14:38:02 +02:00
|
|
|
|
|
|
|
-- Run Neoformat
|
|
|
|
MapKey('n', '<M-f>', '<cmd>Neoformat<CR>')
|