-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmappings.lua
34 lines (29 loc) · 1.24 KB
/
mappings.lua
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
26
27
28
29
30
31
32
33
34
local M = {}
M.disabled = {
n = {
["<C-n>"] = "",
["<C-p>"] = "",
["<C-w>"] = "",
["<C-s>"] = "",
["gc"] = "",
}
}
M.abc = {
n = {
["<C-b>"] = { "<cmd> NvimTreeToggle <CR>", "Toggle nvimtree" },
["gt"] = { "<cmd> NvimTreeFocus <CR>", "Focus nvimtree" },
["gd"] = { "<cmd> lua vim.lsp.buf.definition()<CR>", "LSP definition" },
["gb"] = { "<C-^>", "Switch to previous buffer" },
["<C-k>"] = { "<cmd>lua vim.lsp.buf.signature_help()<CR>", "LSP signature help" },
["gk"] = { "<cmd>lua vim.lsp.buf.hover()<CR>", "LSP hover" },
["<C-n>"] = { "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>", "LSP diagnostic previous" },
["<C-p>"] = { "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>", "LSP diagnostic next" },
["<C-w>"] = { "<ESC>:bd<CR>:bn<CR>", "Fechar buffer atual e mudar para o próximo" },
["<C-s>"] = { "<ESC><cmd>lua vim.lsp.buf.format()<CR><cmd>:w<CR>", "File saved", opts = { nowait = true } },
["gc"] = { ":wincmd w<CR>:echo 'Focus moved to code'<CR>", "Move focus to next window", opts = { nowait = true } },
},
i = {
[";;"] = { "<ESC>", "escape insert mode", opts = { nowait = true } },
}
}
return M