feat: restructure keymaps and fix Lua configuration
- Restructure keymaps into modular folder system - Create keymaps/ folder with organized files - Separate keymaps by category (general, personal, lsp, telescope, plugins) - Auto-loading system for better maintainability - Fix Lua configuration issues - Add compatibility layer for deprecated APIs - Fix snacks.nvim configuration - Disable latex support in render-markdown - Improve LSP configuration - Enhance function navigation - Restore and improve LSP keymaps - Add comprehensive Telescope integration - Fix conflicting keymaps - Improve overall Neovim setup - Better options configuration - Enhanced plugin configurations - Cleaner code organization
This commit is contained in:
19
lua/cargdev/core/keymaps/general.lua
Normal file
19
lua/cargdev/core/keymaps/general.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
-- General keymaps
|
||||
local keymap = vim.keymap
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
-- =============================================================================
|
||||
-- GENERAL KEYMAPS
|
||||
-- =============================================================================
|
||||
|
||||
-- Set leader key
|
||||
vim.g.mapleader = " "
|
||||
vim.g.maplocalleader = " "
|
||||
|
||||
-- General keymaps
|
||||
keymap.set("i", "jk", "<ESC>", opts) -- Exit insert mode with jk
|
||||
keymap.set("n", "<leader>nh", ":nohl<CR>", opts) -- Clear search highlights
|
||||
keymap.set("n", "x", '"_x', opts) -- Delete character without copying into register
|
||||
|
||||
-- Save and quit (additional)
|
||||
keymap.set("n", "<leader>Q", ":qa!<CR>", { desc = "Quit all" })
|
||||
Reference in New Issue
Block a user