mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 13:22:13 +02:00
using the new format for which-key for missed files
This commit is contained in:
@@ -36,23 +36,10 @@ return {
|
||||
})
|
||||
|
||||
require("which-key").register({
|
||||
"<leader>c",
|
||||
desc = "Cloak",
|
||||
{
|
||||
"<leader>ct",
|
||||
":CloakToggle<CR>",
|
||||
desc = "Toggle Cloak"
|
||||
},
|
||||
{
|
||||
"<leader>cd",
|
||||
":CloakDisable<CR>",
|
||||
desc = "Cloak disable"
|
||||
},
|
||||
{
|
||||
"<leader>ce",
|
||||
":CloakDisable<CR>",
|
||||
desc = "Cloak enable"
|
||||
},
|
||||
{ "<leader>c", "Cloak", },
|
||||
{ "<leader>ct", ":CloakToggle<CR>", desc = "Toggle" },
|
||||
{ "<leader>cd", ":CloakDisable<CR>", desc = "Disable" },
|
||||
{ "<leader>ce", ":CloakEnable<CR>", desc = "Enable" },
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -10,27 +10,10 @@ return {
|
||||
})
|
||||
|
||||
whichKey.register({
|
||||
["<leader>i"] = {
|
||||
name = "Icon Picker",
|
||||
e = {
|
||||
function()
|
||||
vim.cmd("IconPickerInsert emoji")
|
||||
end,
|
||||
"Pick emoji"
|
||||
},
|
||||
s = {
|
||||
function()
|
||||
vim.cmd("IconPickerInsert symbols")
|
||||
end,
|
||||
"Pick symbol"
|
||||
},
|
||||
n = {
|
||||
function()
|
||||
vim.cmd("IconPickerInsert nerd_font")
|
||||
end,
|
||||
"Pick Nerd font symbol"
|
||||
}
|
||||
}
|
||||
{ "<leader>i", group = "Icon" },
|
||||
{ "<leader>ie", function() vim.cmd("IconPickerInsert emoji") end, group = "Emoji" },
|
||||
{ "<leader>is", function() vim.cmd("IconPickerInsert symbols") end, group = "Symbol" },
|
||||
{ "<leader>in", function() vim.cmd("IconPickerInsert nerd_font") end, group = "Nerd Font Symbol" },
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
@@ -9,35 +9,14 @@ return {
|
||||
},
|
||||
config = function()
|
||||
local whichKey = require("which-key")
|
||||
local linkVisitor = require("link-visitor");
|
||||
|
||||
whichKey.register({
|
||||
["<leader>v"] = {
|
||||
name = "Visit link",
|
||||
v = {
|
||||
function()
|
||||
require("link-visitor").visit()
|
||||
end,
|
||||
"Visit",
|
||||
},
|
||||
l = {
|
||||
function()
|
||||
require("link-visitor").link_under_cursor()
|
||||
end,
|
||||
"Under cursor",
|
||||
},
|
||||
n = {
|
||||
function()
|
||||
require("link-visitor").link_near_cursor()
|
||||
end,
|
||||
"Near cursor",
|
||||
},
|
||||
N = {
|
||||
function()
|
||||
require("link-visitor").link_nearest()
|
||||
end,
|
||||
"Near cursor",
|
||||
},
|
||||
},
|
||||
{ "<leader>v", group = "Link", },
|
||||
{ "<leader>vv", function() linkVisitor.visit() end, },
|
||||
{ "<leader>vl", function() linkVisitor.link_under_cursor() end, },
|
||||
{ "<leader>vn", function() linkVisitor.link_near_cursor() end, },
|
||||
{ "<leader>vN", function() linkVisitor.link_nearest() end, },
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
@@ -14,15 +14,8 @@ return {
|
||||
neogit.setup({})
|
||||
|
||||
whichKey.register({
|
||||
"<leader>g",
|
||||
desc = "Neogit",
|
||||
{
|
||||
"<leader>go",
|
||||
function()
|
||||
neogit.open()
|
||||
end,
|
||||
desc = "Neogit open"
|
||||
},
|
||||
{ "<leader>g", group = "Neogit", },
|
||||
{ "<leader>go", function() neogit.open() end, },
|
||||
})
|
||||
end
|
||||
}
|
||||
|
||||
@@ -160,48 +160,16 @@ return {
|
||||
local whichKey = require("which-key")
|
||||
|
||||
whichKey.register({
|
||||
["<leader>n"] = {
|
||||
name = "NvimTree",
|
||||
w = {
|
||||
name = "NvimTree Width",
|
||||
i = {
|
||||
increment_width,
|
||||
"Increment NvimTree Width"
|
||||
},
|
||||
d = {
|
||||
decrement_width,
|
||||
"Increment NvimTree Width"
|
||||
},
|
||||
a = {
|
||||
dynamic_width,
|
||||
"Automatic NvimTree Width"
|
||||
}
|
||||
},
|
||||
t = {
|
||||
function()
|
||||
nvimTreeApi.tree.toggle()
|
||||
end,
|
||||
"Toggle NvimTree",
|
||||
},
|
||||
f = {
|
||||
function()
|
||||
nvimTreeApi.tree.focus()
|
||||
end,
|
||||
"Focus NvimTree",
|
||||
},
|
||||
e = {
|
||||
function()
|
||||
nvimTreeApi.tree.expand_all()
|
||||
end,
|
||||
"Expand NvimTree",
|
||||
},
|
||||
c = {
|
||||
function()
|
||||
nvimTreeApi.tree.collapse_all()
|
||||
end,
|
||||
"Collapse NvimTree",
|
||||
},
|
||||
},
|
||||
{ "<leader>n", group = "NvimTree" },
|
||||
{ "<leader>nt", function() nvimTreeApi.tree.toggle() end, desc = "Toggle" },
|
||||
{ "<leader>nf", function() nvimTreeApi.tree.focus() end, desc = "Focus" },
|
||||
{ "<leader>ne", function() nvimTreeApi.tree.expand_all() end, desc = "Expand All" },
|
||||
{ "<leader>nc", function() nvimTreeApi.tree.collapse_all() end, desc = "Collapse All" },
|
||||
{ "<leader>nw", group = "Width" },
|
||||
{ "<leader>nwi", increment_width, desc = "Increase" },
|
||||
{ "<leader>nwd", decrement_width, desc = "Decrease" },
|
||||
{ "<leader>nwa", dynamic_width, desc = "Decrease" },
|
||||
{ "<leader>nt", function() nvimTreeApi.tree.toggle() end, desc = "Toggle" },
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -12,45 +12,13 @@ return {
|
||||
local whichKey = require("which-key")
|
||||
|
||||
whichKey.register({
|
||||
["<leader>t"] = {
|
||||
name = "Telescope",
|
||||
h = {
|
||||
function()
|
||||
telescopeBuiltin.help_tags()
|
||||
end,
|
||||
"Find help tags"
|
||||
},
|
||||
t = {
|
||||
function()
|
||||
telescopeBuiltin.treesitter()
|
||||
end,
|
||||
"Explore the Abstract Syntax Tree",
|
||||
},
|
||||
f = {
|
||||
function()
|
||||
telescopeBuiltin.find_files()
|
||||
end,
|
||||
"Find files",
|
||||
},
|
||||
w = {
|
||||
function()
|
||||
telescopeBuiltin.live_grep()
|
||||
end,
|
||||
"Find words",
|
||||
},
|
||||
c = {
|
||||
function()
|
||||
telescopeBuiltin.colorscheme()
|
||||
end,
|
||||
"Find color schemes",
|
||||
},
|
||||
g = {
|
||||
function()
|
||||
telescopeBuiltin.git_files()
|
||||
end,
|
||||
"Find git files",
|
||||
},
|
||||
},
|
||||
{ "<leader>t", group = "Telescope" },
|
||||
{ "<leader>th", function() telescopeBuiltin.help_tags() end, desc = "Help Tags" },
|
||||
{ "<leader>tt", function() telescopeBuiltin.treesitter() end, desc = "Treesitter" },
|
||||
{ "<leader>tf", function() telescopeBuiltin.find_files() end, desc = "Files" },
|
||||
{ "<leader>tw", function() telescopeBuiltin.live_grep() end, desc = "Words" },
|
||||
{ "<leader>tc", function() telescopeBuiltin.colorscheme() end, desc = "Colorscheme" },
|
||||
{ "<leader>tg", function() telescopeBuiltin.git_files() end, desc = "Colorscheme" },
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
opts = {
|
||||
position = "bottom", -- position of the list can be: bottom, top, left, right
|
||||
height = 10, -- height of the trouble list when position is top or bottom
|
||||
width = 50, -- width of the list when position is left or right
|
||||
icons = true, -- use devicons for filenames
|
||||
mode = "workspace_diagnostics",
|
||||
severity = nil, -- nil (ALL) or vim.diagnostic.severity.ERROR | WARN | INFO | HINT
|
||||
fold_open = "", -- icon used for open folds
|
||||
fold_closed = "", -- icon used for closed folds
|
||||
group = true, -- group results by file
|
||||
padding = true, -- add an extra new line on top of the list
|
||||
cycle_results = true, -- cycle item list when reaching beginning or end of list
|
||||
action_keys = { -- key mappings for actions in the trouble list
|
||||
-- map to {} to remove a mapping, for example:
|
||||
-- close = {},
|
||||
close = "q",
|
||||
cancel = "<esc>",
|
||||
refresh = "r",
|
||||
jump = { "<cr>", "<tab>", "<2-leftmouse>" },
|
||||
open_split = { "<c-x>" },
|
||||
open_vsplit = { "<c-v>" },
|
||||
open_tab = { "<c-t>" },
|
||||
jump_close = { "o" },
|
||||
toggle_mode = "m",
|
||||
switch_severity = "s",
|
||||
toggle_preview = "P",
|
||||
hover = "K",
|
||||
preview = "p",
|
||||
open_code_href = "c",
|
||||
close_folds = { "zM", "zm" }, -- close all folds
|
||||
open_folds = { "zR", "zr" }, -- open all folds
|
||||
toggle_fold = { "zA", "za" }, -- toggle fold of current file
|
||||
previous = "k", -- previous item
|
||||
next = "j", -- next item,
|
||||
help = "?" -- help menu
|
||||
},
|
||||
multiline = true, -- render multi-line messages
|
||||
indent_lines = true,
|
||||
win_config = { border = "single" },
|
||||
auto_open = false,
|
||||
auto_close = false,
|
||||
auto_preview = true,
|
||||
auto_fold = false,
|
||||
auto_jump = { "lsp_definitions" },
|
||||
include_declaration = { "lsp_references", "lsp_implementations", "lsp_definitions" },
|
||||
signs = {
|
||||
-- icons / text used for a diagnostic
|
||||
error = "",
|
||||
warning = "",
|
||||
hint = "",
|
||||
information = "",
|
||||
other = "",
|
||||
},
|
||||
use_diagnostic_signs = false -- enabling this will use the signs defined in your lsp client
|
||||
},
|
||||
config = function()
|
||||
local whichKey = require("which-key")
|
||||
local trouble = require("trouble")
|
||||
|
||||
whichKey.register({
|
||||
["<leader>x"] = {
|
||||
name = "Trouble",
|
||||
t = {
|
||||
function()
|
||||
trouble.toggle()
|
||||
end,
|
||||
"Toggle Trouble"
|
||||
},
|
||||
o = {
|
||||
function()
|
||||
trouble.open()
|
||||
end,
|
||||
"Open Trouble"
|
||||
},
|
||||
c = {
|
||||
function()
|
||||
trouble.close()
|
||||
end,
|
||||
"Close Trouble"
|
||||
},
|
||||
n = {
|
||||
function()
|
||||
trouble.next({
|
||||
skip_groups = true,
|
||||
jump = true
|
||||
})
|
||||
end,
|
||||
"Trouble next item"
|
||||
},
|
||||
p = {
|
||||
function()
|
||||
trouble.previous({
|
||||
skip_groups = true,
|
||||
jump = true
|
||||
})
|
||||
end,
|
||||
"Trouble previous item"
|
||||
},
|
||||
f = {
|
||||
function()
|
||||
trouble.first({
|
||||
skip_groups = true,
|
||||
jump = true
|
||||
})
|
||||
end,
|
||||
"Trouble first item"
|
||||
},
|
||||
l = {
|
||||
function()
|
||||
trouble.last({
|
||||
skip_groups = true,
|
||||
jump = true
|
||||
})
|
||||
end,
|
||||
"Trouble last item"
|
||||
}
|
||||
}
|
||||
})
|
||||
end
|
||||
}
|
||||
Reference in New Issue
Block a user