Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored: Removed '@type' from all specs, redundant post v2.5. Added 'Neocord' as a new spec. #32

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Next Next commit
Refined keymap setup to align with the new starter config
  • Loading branch information
AlwaysOutofRange committed Mar 10, 2024
commit 237617b90ed222448b2b2ad9e33bf09d76d6ab74
12 changes: 4 additions & 8 deletions lua/nvcommunity/diagnostics/trouble/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ local spec = {
cmd = { "Trouble", "TroubleToggle", "TodoTrouble" },
opts = {},
init = function()
require("core.mappings").trouble = {
plugin = true,
n = {
["<leader>t"] = { "<CMD>TroubleToggle<CR>", "Toggle diagnostics" },
["<leader>td"] = { "<CMD>TodoTrouble keywords=TODO,FIX,FIXME,BUG,TEST,NOTE<CR>", "Todo/Fix/Fixme" },
},
}
require("core.utils").load_mappings "trouble"
local map = vim.keymap.set

map("n", "<leader>t", "<CMD>TroubleToggle<CR>", { desc = "Toggle diagnostics" })
map("n", "<leader>td", "<CMD>TodoTrouble keywords=TODO,FIX,FIXME,BUG,TEST,NOTE<CR>", { desc = "Todo/Fix/Fixme" })
end,
}

Expand Down
10 changes: 3 additions & 7 deletions lua/nvcommunity/editor/telescope-undo/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@ local spec = {
{
"debugloop/telescope-undo.nvim",
init = function()
require("core.mappings").undo = {
plugin = true,
n = {
["<leader>fu"] = { "<CMD>Telescope undo<CR>", "Find undo" },
},
}
local map = vim.keymap.set

map("n", "<leader>fu", "<CMD>Telescope undo<CR>", { desc = "Find undo" })

require("core.utils").load_mappings "undo"
require("telescope").load_extension "undo"
end,
},
Expand Down
9 changes: 3 additions & 6 deletions lua/nvcommunity/editor/treesj/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ local spec = {
cmd = { "TSJToggle" },
opts = { use_default_keymaps = false },
init = function()
require("core.mappings").treesj = {
n = {
["<leader>tt"] = { "<CMD>TSJToggle<CR>", "Toggle Treesitter Join/Split" },
},
}
require("core.utils").load_mappings "treesj"
local map = vim.keymap.set

map("n", "<leader>tt", "<CMD>TSJToggle<CR>", { desc = "Toggle Treesitter Join/Split" })
end,
},
}
Expand Down
16 changes: 5 additions & 11 deletions lua/nvcommunity/folds/fold-cycle/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@ local spec = {
"jghauser/fold-cycle.nvim",
opts = {},
init = function()
require("core.mappings").foldcycle = {
n = {
["<leader>a"] = {
function()
require("fold-cycle").toggle_all()
end,
"Toggle fold",
},
},
}
require("core.utils").load_mappings "foldclycle"
local map = vim.keymap.set

map("n", "<leader>a", function()
require("fold-cycle").toggle_all()
end, { desc = "Toggle fold" })
end,
},
}
Expand Down
15 changes: 4 additions & 11 deletions lua/nvcommunity/folds/fold-preview/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,11 @@ local spec = {
border = { "╭", "─", "╮", "│", "╯", "─", "╰", "│" },
},
init = function()
require("core.mappings").foldpreview = {
n = {
["<leader>a"] = {
function()
require("fold-preview").toggle_preview()
end,
"Fold preview",
},
},
}
local map = vim.keymap.set

require("core.utils").load_mappings "foldpreview"
map("n", "<leader>a", function()
require("fold-preview").toggle_preview()
end, { desc = "Fold preview" })
end,
},
}
Expand Down
14 changes: 5 additions & 9 deletions lua/nvcommunity/motion/hop/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@ local spec = {
cmd = { "HopWord", "HopLine", "HopLineStart", "HopWordCurrentLine" },
opts = { keys = "etovxqpdygfblzhckisuran" },
init = function()
require("core.mappings").hop = {
n = {
["<leader><leader>w"] = { "<CMD> HopWord <CR>", "Hint all words" },
["<leader><leader>t"] = { "<CMD> HopNodes <CR>", "Hint Tree" },
["<leader><leader>c"] = { "<CMD> HopLineStart<CR>", "Hint Columns" },
["<leader><leader>l"] = { "<CMD> HopWordCurrentLine<CR>", "Hint Line" },
},
}
local map = vim.keymap.set

require("core.utils").load_mappings "hop"
map("n", "<leader><leader>w", "<CMD> HopWord <CR>", { desc = "Hint all words" })
map("n", "<leader><leader>t", "<CMD> HopNodes <CR>", { desc = "Hint Tree" })
map("n", "<leader><leader>c", "<CMD> HopLineStart<CR>", { desc = "Hint Columns" })
map("n", "<leader><leader>l", "<CMD> HopWordCurrentLine<CR>", { desc = "Hint Line" })
end,
},
}
Expand Down