Configuration files for my GNU/Linux installation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
dotfiles/nvchad/.config/nvim/lua/mappings.lua

25 lines
764 B

---@type MappingsTable
require "nvchad.mappings"
local map = vim.keymap.set
-- General
map("n", ";", ":", { desc = "enter command mode", nowait = true })
-- Format with conform
map("n", "<leader>fm", function()
require("conform").format()
end, { desc = "formatting" })
-- Indentation in visual mode
map("v", ">", ">gv", { desc = "indent" })
-- Move selection up/down with K/J in visual mode
map("v", "J", ":m '>+1<CR>gv=gv", { desc = "move selection down" })
map("v", "K", ":m '<-2<CR>gv=gv", { desc = "move selection up" })
-- Copilot accept in insert mode
map("i", "<C-l>", function()
vim.fn.feedkeys(vim.fn["copilot#Accept"](), "")
end, { desc = "Copilot Accept", replace_keycodes = true, nowait = true, silent = true, expr = true, noremap = true })