This repository has been archived on 2023-03-02. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/.config/nvim/lua/maps.lua

33 lines
1.3 KiB
Lua
Raw Normal View History

-- 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")
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>")
utils.map("n", "<leader>c", "<cmd>ColorizerToggle<CR>")
-- 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>")
2022-01-14 10:54:07 +01:00
utils.map("n", "<leader>ln", "<cmd>lua vim.diagnostic.goto_next()<CR>")
utils.map("n", "<leader>lp", "<cmd>lua vim.diagnostic.goto_prev()<CR>")
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>")
-- colorscheme
utils.map("n", "<C-s>", "<cmd>lua require(\"astronomy\").toggle_variant()<CR>")
-- snippets
utils.map("i", "<C-E>", "<Plug>luasnip-next-choice", {})
utils.map("s", "<C-E>", "<Plug>luasnip-next-choice", {})