Skip to content

Commit

Permalink
fix(main): Add missing mode in mapping declerations (#720)
Browse files Browse the repository at this point in the history
* fix(oil-nvim): mapping got not registered

* fix(twilight-nvim): fix bug due to missing mode in mapping decleration

* fix(vim-highlighter): fix bug due to missing mode in mapping decleration

* fix(telescope-undo-nvim): fix bug due to missing mode in mapping decleration

* fix(ultimate-autopair-nvim): fix bug due to missing mode in mapping decleration

* fix(mini-files): fix bug due to missing mode in mapping decleration

* fix(hop-nvim): fix bug due to missing mode in mapping decleration

* fix(edgy-nvim): fix bug due to missing mode in mapping decleration

* fix(minimap-vim): fix bug due to missing mode in mapping decleration
  • Loading branch information
manuuurino committed Jan 15, 2024
1 parent fb730ce commit 3f02b06
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 44 deletions.
4 changes: 3 additions & 1 deletion lua/astrocommunity/color/twilight-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ return {
"AstroNvim/astrocore",
opts = {
mappings = {
["<Leader>uT"] = { "<CMD>Twilight<CR>", desc = "Toggle Twilight" },
n = {
["<Leader>uT"] = { "<CMD>Twilight<CR>", desc = "Toggle Twilight" },
},
},
},
},
Expand Down
18 changes: 10 additions & 8 deletions lua/astrocommunity/color/vim-highlighter/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ return {
"AstroNvim/astrocore",
opts = {
mappings = {
{ "f<Enter>", desc = "Highlight" },
{ "f<BS>", desc = "Remove Highlight" },
{ "f<C-L>", desc = "Clear Highlight" },
{ "f<Tab>", desc = "Find Highlight (similar to Telescope grep)" },
{ "nn", "<CMD>Hi><CR>", desc = "Next Recently Set Highlight" },
{ "ng", "<CMD>Hi<<CR>", desc = "Previous Recently Set Highlight" },
{ "n[", "<CMD>Hi{<CR>", desc = "Next Nearest Highlight" },
{ "n]", "<CMD>Hi}<CR>", desc = "Previous Nearest Highlight" },
n = {
{ "f<Enter>", desc = "Highlight" },
{ "f<BS>", desc = "Remove Highlight" },
{ "f<C-L>", desc = "Clear Highlight" },
{ "f<Tab>", desc = "Find Highlight (similar to Telescope grep)" },
{ "nn", "<CMD>Hi><CR>", desc = "Next Recently Set Highlight" },
{ "ng", "<CMD>Hi<<CR>", desc = "Previous Recently Set Highlight" },
{ "n[", "<CMD>Hi{<CR>", desc = "Next Nearest Highlight" },
{ "n]", "<CMD>Hi}<CR>", desc = "Previous Nearest Highlight" },
},
},
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ return {
"AstroNvim/astrocore",
opts = {
mappings = {
["<Leader>fu"] = { "<CMD>Telescope undo<CR>", desc = "Find undos" },
n = {
["<Leader>fu"] = { "<CMD>Telescope undo<CR>", desc = "Find undos" },
},
},
},
},
Expand Down
30 changes: 16 additions & 14 deletions lua/astrocommunity/editing-support/ultimate-autopair-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,22 @@ return {
"AstroNvim/astrocore",
opts = {
mappings = {
["<Leader>ua"] = {
desc = "Toggle Ultimate Autopair",
function()
local notify = require("astrocore").notify
local function bool2str(bool) return bool and "on" or "off" end
local ok, ultimate_autopair = pcall(require, "ultimate-autopair")
if ok then
ultimate_autopair.toggle()
vim.g.ultimate_autopair_enabled = require("ultimate-autopair.core").disable
notify(string.format("ultimate-autopair %s", bool2str(not vim.g.ultimate_autopair_enabled)))
else
notify "ultimate-autopair not available"
end
end,
n = {
["<Leader>ua"] = {
desc = "Toggle Ultimate Autopair",
function()
local notify = require("astrocore").notify
local function bool2str(bool) return bool and "on" or "off" end
local ok, ultimate_autopair = pcall(require, "ultimate-autopair")
if ok then
ultimate_autopair.toggle()
vim.g.ultimate_autopair_enabled = require("ultimate-autopair.core").disable
notify(string.format("ultimate-autopair %s", bool2str(not vim.g.ultimate_autopair_enabled)))
else
notify "ultimate-autopair not available"
end
end,
},
},
},
},
Expand Down
4 changes: 3 additions & 1 deletion lua/astrocommunity/file-explorer/mini-files/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ return {
"AstroNvim/astrocore",
opts = {
mappings = {
["<Leader>e"] = { function() require("mini.files").open() end, desc = "Explorer" },
n = {
["<Leader>e"] = { function() require("mini.files").open() end, desc = "Explorer" },
},
},
},
},
Expand Down
4 changes: 3 additions & 1 deletion lua/astrocommunity/file-explorer/oil-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ return {
"AstroNvim/astrocore",
opts = {
mappings = {
["<Leader>O"] = { function() require("oil").open() end, desc = "Open folder in Oil" },
n = {
["<Leader>O"] = { function() require("oil").open() end, desc = "Open folder in Oil" },
},
},
},
},
Expand Down
28 changes: 13 additions & 15 deletions lua/astrocommunity/motion/hop-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@ return {
{
"smoka7/hop.nvim",
opts = {},
keys = {
{
"AstroNvim/astrocore",
opts = {
mappings = {
n = {
["s"] = { function() require("hop").hint_words() end, desc = "Hop hint words" },
["<S-s>"] = { function() require("hop").hint_lines() end, desc = "Hop hint lines" },
},
v = {
["s"] = { function() require("hop").hint_words { extend_visual = true } end, desc = "Hop hint words" },
["<S-s>"] = {
function() require("hop").hint_lines { extend_visual = true } end,
desc = "Hop hint lines",
},
dependencies = {
"AstroNvim/astrocore",
opts = {
mappings = {
n = {
["s"] = { function() require("hop").hint_words() end, desc = "Hop hint words" },
["<S-s>"] = { function() require("hop").hint_lines() end, desc = "Hop hint lines" },
},
v = {
["s"] = { function() require("hop").hint_words { extend_visual = true } end, desc = "Hop hint words" },
["<S-s>"] = {
function() require("hop").hint_lines { extend_visual = true } end,
desc = "Hop hint lines",
},
},
},
Expand Down
6 changes: 4 additions & 2 deletions lua/astrocommunity/split-and-window/edgy-nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ return {
"AstroNvim/astrocore",
opts = {
mappings = {
["<Leader>F"] = { function() require("edgy").toggle() end, desc = "Toggle Sidebars" },
["<Leader>f"] = { function() require("edgy").select() end, desc = "Pick Sidebar" },
n = {
["<Leader>F"] = { function() require("edgy").toggle() end, desc = "Toggle Sidebars" },
["<Leader>f"] = { function() require("edgy").select() end, desc = "Pick Sidebar" },
},
},
},
},
Expand Down
4 changes: 3 additions & 1 deletion lua/astrocommunity/split-and-window/minimap-vim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ return {
"AstroNvim/astrocore",
opts = {
mappings = {
["<Leader>um"] = { "<CMD>MinimapToggle<CR>", desc = "Toggle minimap" },
n = {
["<Leader>um"] = { "<CMD>MinimapToggle<CR>", desc = "Toggle minimap" },
},
},
},
},
Expand Down

0 comments on commit 3f02b06

Please sign in to comment.