1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
vim.g.mapleader = " "
vim.api.nvim_set_keymap("n", "<Leader>n", ":NvimTreeToggle<CR>",
{ noremap = true; silent = true })
vim.api.nvim_command("nnoremap <A-j> :m .+1<CR>==")
vim.api.nvim_command("nnoremap <A-k> :m .-2<CR>==")
vim.api.nvim_command("inoremap <A-k> <Esc>:m .-2<CR>==gi")
vim.api.nvim_command("inoremap <A-j> <Esc>:m .+1<CR>==gi")
vim.api.nvim_command("vnoremap <A-j> :m '>+1<CR>gv=gv")
vim.api.nvim_command("vnoremap <A-k> :m '<-2<CR>gv=gv")
vim.api.nvim_command(
"nnoremap <buffer> <Leader><CR> :lua vim.lsp.buf.code_action()<CR>")
vim.api.nvim_command("nnoremap <buffer> <Leader>, :TroubleToggle<CR>")
vim.api.nvim_set_keymap("n", "<Leader>f", ":Telescope find_files<CR>",
{ noremap = true; silent = true })
vim.api.nvim_set_keymap("n", "<Leader><TAB>", ":Telescope buffers<CR>",
{ noremap = true; silent = true })
vim.keymap.set("n", "<Leader>[", require("ufo").openAllFolds)
vim.keymap.set("n", "<Leader>]", require("ufo").closeAllFolds)
vim.keymap.set("n", "<Leader>r", require("renamer").rename)
|