update shortcut

This commit is contained in:
vincent 2022-10-08 09:43:43 +02:00
parent 59f9d91a5c
commit ff48d339af

View File

@ -29,15 +29,12 @@ return require('packer').startup {
require'telescope.themes'.get_ivy()
vim.api.nvim_set_keymap("n", "<LEADER><LEADER>", ":Telescope find_files theme=get_ivy<CR>", { noremap = true })
vim.api.nvim_set_keymap("n", "<LEADER>ff", ":Telescope find_files theme=get_ivy<CR>", { noremap = true })
vim.api.nvim_set_keymap("n", "<LEADER>sp", ":Telescope live_grep theme=get_ivy<CR>", { noremap = true })
vim.api.nvim_set_keymap("n", "<LEADER>/", ":Telescope live_grep theme=get_ivy<CR>", { noremap = true })
vim.api.nvim_set_keymap("n", "<LEADER>bb", ":Telescope buffers theme=get_ivy<CR>", { noremap = true })
vim.api.nvim_set_keymap("n", "<LEADER>,", ":Telescope buffers theme=get_ivy<CR>", { noremap = true })
vim.api.nvim_set_keymap("n", "<LEADER>sb", ":Telescope current_buffer_fuzzy_find theme=get_ivy<CR>", { noremap = true })
vim.api.nvim_set_keymap("n", "<LEADER>?", ":Telescope current_buffer_fuzzy_find theme=get_ivy<CR>", { noremap = true })
end
}
@ -156,18 +153,18 @@ return require('packer').startup {
buf_set_keymap('n', 'K', '<Cmd>lua vim.lsp.buf.hover()<CR>', opts)
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
buf_set_keymap('n', '<LEADER>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
buf_set_keymap('n', '<LEADER>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
buf_set_keymap('n', '<LEADER>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
buf_set_keymap('n', '<LEADER>lD', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
buf_set_keymap('n', '<LEADER>ln', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
buf_set_keymap('n', '<LEADER>la', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
buf_set_keymap('n', '<LEADER>le', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
buf_set_keymap('n', '<space>=', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
buf_set_keymap('n', '<LEADER>lq', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
buf_set_keymap('n', '<LEADER>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
end
local opts = {
on_attach = on_attach