{"id":24868707,"url":"https://github.com/std-enigma/mapper.nvim","last_synced_at":"2025-10-15T13:31:11.978Z","repository":{"id":245515509,"uuid":"818478552","full_name":"Std-Enigma/mapper.nvim","owner":"Std-Enigma","description":"A different approach to set NeoVim key mappings","archived":false,"fork":false,"pushed_at":"2024-06-29T10:21:47.000Z","size":33,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-29T17:59:32.945Z","etag":null,"topics":["keybindings","keymap","keymapping","neovim","neovim-configuration","neovim-lua","neovim-lua-plugin","neovim-plugin","which-key"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Std-Enigma.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-22T00:39:46.000Z","updated_at":"2024-06-29T10:21:49.000Z","dependencies_parsed_at":"2024-06-25T17:18:07.471Z","dependency_job_id":"b75e255d-5fe3-4baf-b841-47c27e3890cb","html_url":"https://github.com/Std-Enigma/mapper.nvim","commit_stats":null,"previous_names":["std-enigma/mapper.nvim"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Std-Enigma%2Fmapper.nvim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Std-Enigma%2Fmapper.nvim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Std-Enigma%2Fmapper.nvim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Std-Enigma%2Fmapper.nvim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Std-Enigma","download_url":"https://codeload.github.com/Std-Enigma/mapper.nvim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236610974,"owners_count":19176893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["keybindings","keymap","keymapping","neovim","neovim-configuration","neovim-lua","neovim-lua-plugin","neovim-plugin","which-key"],"created_at":"2025-02-01T02:32:08.634Z","updated_at":"2025-10-15T13:31:06.695Z","avatar_url":"https://github.com/Std-Enigma.png","language":"Lua","readme":"# ⌨️ Mapper\n\nAn alternative solution to setup your neovim key mappings.\n\n## ⚡️ Requirements\n\n- Neovim \u003e= 0.5.0\n\n## ⚠️ Caution\n\n\u003cb\u003ewhich-key.nvim registration isn't possible if you are using any package manager rather than [lazy.nvim](https://github.com/folke/lazy.nvim)\u003c/b\u003e\n\n## 📦 Installation\n\nInstall the plugin with your preferred package manager:\n\n### [lazy.nvim](https://github.com/folke/lazy.nvim)\n\n```lua\n{\n  \"Std-Enigma/mapper.nvim\",\n  opts = {}, -- for setting up your mappings, refer to the usage section.\n}\n```\n\n\u003c!-- config:end --\u003e\n\n\u003c/details\u003e\n\n## 💡 API\n\n**Mapper** provides a Lua API with key mapping functionality. This can be viewed with `:h mapper` or in the repository at [doc/api.md](doc/api.md)\n\n## 🚀 Usage\n\n### Lazy Plugin\n\n\u003cdetails\u003e\u003csummary\u003eLazy\u003c/summary\u003e\n\u003c!-- lazy:start --\u003e\n\n```lua\n{\n  \"Std-Enigma/mapper.nvim\",\n  opts = {\n    mappings = {\n      -- map mode (:h map-modes)\n      n = {\n        [\"\u003cC-s\u003e\"] = { \":w!\u003ccr\u003e\", desc = \"Save File\" }, -- use vimscript strings for mappings\n        L = {\n          function() vim.cmd.bnext() end, -- use lua functions for mappings\n          desc = \"Next buffer\",\n        },\n        H = {\n          function() vim.cmd.bprevious() end, -- use lua functions for mappings\n          desc = \"Previous buffer\",\n        },\n        -- tables with just a `desc` key will be registered with which-key if it's installed\n        -- this is useful for naming menus\n        [\"\u003cleader\u003eb\"] = { desc = \"Buffers\" },\n      },\n    },\n  },\n}\n```\n\n\u003cdetails\u003e\u003csummary\u003eUsage with other plugins\u003c/summary\u003e\n\n```lua\n{\n  \"mrjones2014/smart-splits.nvim\",\n  dependencies = {\n    {\n      \"Std-Enigma/mapper.nvim\",\n      opts = function(_, _)\n        local maps = require(\"mapper\").empty_map_table()\n        maps.n[\"\u003cC-H\u003e\"] = { function() require(\"smart-splits\").move_cursor_left() end, desc = \"Move to left split\" }\n        maps.n[\"\u003cC-J\u003e\"] = { function() require(\"smart-splits\").move_cursor_down() end, desc = \"Move to below split\" }\n        maps.n[\"\u003cC-K\u003e\"] = { function() require(\"smart-splits\").move_cursor_up() end, desc = \"Move to above split\" }\n        maps.n[\"\u003cC-L\u003e\"] = { function() require(\"smart-splits\").move_cursor_right() end, desc = \"Move to right split\" }\n        maps.n[\"\u003cC-Up\u003e\"] = { function() require(\"smart-splits\").resize_up() end, desc = \"Resize split up\" }\n        maps.n[\"\u003cC-Down\u003e\"] = { function() require(\"smart-splits\").resize_down() end, desc = \"Resize split down\" }\n        maps.n[\"\u003cC-Left\u003e\"] = { function() require(\"smart-splits\").resize_left() end, desc = \"Resize split left\" }\n        maps.n[\"\u003cC-Right\u003e\"] = { function() require(\"smart-splits\").resize_right() end, desc = \"Resize split right\" }\n\treturn { mappings = maps } -- we do this so lazy.nvim can merge your mappings table\n      end,\n    },\n  },\n  opts = {},\n}\n```\n\n\u003c/details\u003e\n\n\u003c!-- lazy:end --\u003e\n\u003c/details\u003e\n\n### Lua API\n\n\u003cdetails\u003e\u003csummary\u003eAPI\u003c/summary\u003e\n\n\u003c!-- api:start --\u003e\n\nYou can setup your mappings like so with the api:\n\n```lua\nlocal mapper = require(\"mapper\")\nlocal mappings = mapper.empty_map_table()\n\n-- tables with just a `desc` key will be registered with which-key if it's installed\n-- this is useful for naming menus\nmappings.n[\"\u003cLeader\u003eb\"] = { desc = \"Buffers\" }\nmappings.n[\"L\"] = { function() vim.cmd.bnext() end, desc = \"Next buffer\" } -- use lua functions for mappings\nmappings.n[\"H\"] = { function() vim.cmd.bprevious() end, desc = \"Previous buffer\" } -- use lua functions for mappings\nmappings.n[\"\u003cC-S\u003e\"] = { \"\u003cCmd\u003esilent! update! | redraw\u003cCR\u003e\", desc = \"Force write\" } -- use vimscript strings for mappings\nmaps.i[\"\u003cC-S\u003e\"] = { \"\u003cEsc\u003e\" .. maps.n[\"\u003cC-S\u003e\"][1], desc = maps.n[\"\u003cC-S\u003e\"].desc } -- you can use already defined mappings properties since this is just a lua table\n\nmapper.set_mappings(mappings)\n```\n\n\u003c!-- api:end --\u003e\n\n\u003c/details\u003e\n\n## ⭐ Credits\n\nThis plugin is a direct implementation of [AstroNvim](https://github.com/AstroNvim/AstroNvim) core utilities for setting up key mappings.\n\n\u003cdiv align=\"center\" id=\"madewithlua\"\u003e\n\n[![Lua](https://img.shields.io/badge/Made%20with%20Lua-blue.svg?style=for-the-badge\u0026logo=lua)](https://lua.org)\n\n\u003c/div\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstd-enigma%2Fmapper.nvim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstd-enigma%2Fmapper.nvim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstd-enigma%2Fmapper.nvim/lists"}