2021-05-19 00:53:42 +02:00
|
|
|
-- Author : swytch
|
|
|
|
-- Created : Friday Mar 12, 2021 20:17:19 CET
|
|
|
|
-- License : GPLv3
|
|
|
|
-- Description : neovim mappings file
|
|
|
|
|
|
|
|
utils.map("n", "<space>", "<leader>")
|
2021-05-28 10:09:25 +02:00
|
|
|
utils.map("n", "<leader>y", "\"+y")
|
2021-05-25 16:31:12 +02:00
|
|
|
utils.map("n", "<leader>p", "\"+P")
|
2021-05-19 00:53:42 +02:00
|
|
|
utils.map("n", "<leader><enter>", "<cmd>w! | !compiler %<CR>")
|
2021-10-30 15:31:59 +02:00
|
|
|
utils.map("n", "<leader>u", "<cmd>PackerSync<CR>")
|
2021-05-19 00:53:42 +02:00
|
|
|
utils.map("n", "<leader>c", "<cmd>ColorizerToggle<CR>")
|
2021-05-21 23:57:34 +02:00
|
|
|
|
|
|
|
-- LSP
|
|
|
|
utils.map("n", "gd", "<cmd>lua vim.lsp.buf.definition()<CR>")
|
|
|
|
utils.map("n", "gD", "<cmd>lua vim.lsp.buf.declaration()<CR>")
|
|
|
|
utils.map("n", "gr", "<cmd>lua vim.lsp.buf.references()<CR>")
|
|
|
|
utils.map("n", "gi", "<cmd>lua vim.lsp.buf.implementation()<CR>")
|
|
|
|
utils.map("n", "<leader>ln", "<cmd>lua vim.lsp.diagnostic.goto_next()<CR>")
|
|
|
|
utils.map("n", "<leader>lp", "<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>")
|
2021-05-23 01:37:44 +02:00
|
|
|
utils.map("n", "<leader>lf", "<cmd>lua vim.lsp.buf.formatting()<CR>")
|
|
|
|
|
|
|
|
-- telescope
|
|
|
|
utils.map("n", "<leader>tf", "<cmd>Telescope find_files<CR>")
|
|
|
|
utils.map("n", "<leader>tb", "<cmd>Telescope file_browser<CR>")
|
2021-05-29 23:59:03 +02:00
|
|
|
utils.map("n", "<leader>tl", "<cmd>Telescope live_grep<CR>")
|
2021-10-22 22:40:18 +02:00
|
|
|
|
|
|
|
-- colorscheme
|
|
|
|
utils.map("n", "<C-s>", "<cmd>lua require(\"astronomy\").toggle_variant()<CR>")
|
2021-11-20 16:02:59 +01:00
|
|
|
|
|
|
|
-- snippets
|
|
|
|
utils.map("i", "<C-E>", "<Plug>luasnip-next-choice", {})
|
|
|
|
utils.map("s", "<C-E>", "<Plug>luasnip-next-choice", {})
|