mirror of
https://github.com/aminnairi/dotfiles.git
synced 2026-09-14 16:52:12 +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({
|
require("which-key").register({
|
||||||
"<leader>c",
|
{ "<leader>c", "Cloak", },
|
||||||
desc = "Cloak",
|
{ "<leader>ct", ":CloakToggle<CR>", desc = "Toggle" },
|
||||||
{
|
{ "<leader>cd", ":CloakDisable<CR>", desc = "Disable" },
|
||||||
"<leader>ct",
|
{ "<leader>ce", ":CloakEnable<CR>", desc = "Enable" },
|
||||||
":CloakToggle<CR>",
|
|
||||||
desc = "Toggle Cloak"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>cd",
|
|
||||||
":CloakDisable<CR>",
|
|
||||||
desc = "Cloak disable"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"<leader>ce",
|
|
||||||
":CloakDisable<CR>",
|
|
||||||
desc = "Cloak enable"
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,27 +10,10 @@ return {
|
|||||||
})
|
})
|
||||||
|
|
||||||
whichKey.register({
|
whichKey.register({
|
||||||
["<leader>i"] = {
|
{ "<leader>i", group = "Icon" },
|
||||||
name = "Icon Picker",
|
{ "<leader>ie", function() vim.cmd("IconPickerInsert emoji") end, group = "Emoji" },
|
||||||
e = {
|
{ "<leader>is", function() vim.cmd("IconPickerInsert symbols") end, group = "Symbol" },
|
||||||
function()
|
{ "<leader>in", function() vim.cmd("IconPickerInsert nerd_font") end, group = "Nerd Font Symbol" },
|
||||||
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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,35 +9,14 @@ return {
|
|||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
local whichKey = require("which-key")
|
local whichKey = require("which-key")
|
||||||
|
local linkVisitor = require("link-visitor");
|
||||||
|
|
||||||
whichKey.register({
|
whichKey.register({
|
||||||
["<leader>v"] = {
|
{ "<leader>v", group = "Link", },
|
||||||
name = "Visit link",
|
{ "<leader>vv", function() linkVisitor.visit() end, },
|
||||||
v = {
|
{ "<leader>vl", function() linkVisitor.link_under_cursor() end, },
|
||||||
function()
|
{ "<leader>vn", function() linkVisitor.link_near_cursor() end, },
|
||||||
require("link-visitor").visit()
|
{ "<leader>vN", function() linkVisitor.link_nearest() end, },
|
||||||
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",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,15 +14,8 @@ return {
|
|||||||
neogit.setup({})
|
neogit.setup({})
|
||||||
|
|
||||||
whichKey.register({
|
whichKey.register({
|
||||||
"<leader>g",
|
{ "<leader>g", group = "Neogit", },
|
||||||
desc = "Neogit",
|
{ "<leader>go", function() neogit.open() end, },
|
||||||
{
|
|
||||||
"<leader>go",
|
|
||||||
function()
|
|
||||||
neogit.open()
|
|
||||||
end,
|
|
||||||
desc = "Neogit open"
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,48 +160,16 @@ return {
|
|||||||
local whichKey = require("which-key")
|
local whichKey = require("which-key")
|
||||||
|
|
||||||
whichKey.register({
|
whichKey.register({
|
||||||
["<leader>n"] = {
|
{ "<leader>n", group = "NvimTree" },
|
||||||
name = "NvimTree",
|
{ "<leader>nt", function() nvimTreeApi.tree.toggle() end, desc = "Toggle" },
|
||||||
w = {
|
{ "<leader>nf", function() nvimTreeApi.tree.focus() end, desc = "Focus" },
|
||||||
name = "NvimTree Width",
|
{ "<leader>ne", function() nvimTreeApi.tree.expand_all() end, desc = "Expand All" },
|
||||||
i = {
|
{ "<leader>nc", function() nvimTreeApi.tree.collapse_all() end, desc = "Collapse All" },
|
||||||
increment_width,
|
{ "<leader>nw", group = "Width" },
|
||||||
"Increment NvimTree Width"
|
{ "<leader>nwi", increment_width, desc = "Increase" },
|
||||||
},
|
{ "<leader>nwd", decrement_width, desc = "Decrease" },
|
||||||
d = {
|
{ "<leader>nwa", dynamic_width, desc = "Decrease" },
|
||||||
decrement_width,
|
{ "<leader>nt", function() nvimTreeApi.tree.toggle() end, desc = "Toggle" },
|
||||||
"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",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,45 +12,13 @@ return {
|
|||||||
local whichKey = require("which-key")
|
local whichKey = require("which-key")
|
||||||
|
|
||||||
whichKey.register({
|
whichKey.register({
|
||||||
["<leader>t"] = {
|
{ "<leader>t", group = "Telescope" },
|
||||||
name = "Telescope",
|
{ "<leader>th", function() telescopeBuiltin.help_tags() end, desc = "Help Tags" },
|
||||||
h = {
|
{ "<leader>tt", function() telescopeBuiltin.treesitter() end, desc = "Treesitter" },
|
||||||
function()
|
{ "<leader>tf", function() telescopeBuiltin.find_files() end, desc = "Files" },
|
||||||
telescopeBuiltin.help_tags()
|
{ "<leader>tw", function() telescopeBuiltin.live_grep() end, desc = "Words" },
|
||||||
end,
|
{ "<leader>tc", function() telescopeBuiltin.colorscheme() end, desc = "Colorscheme" },
|
||||||
"Find help tags"
|
{ "<leader>tg", function() telescopeBuiltin.git_files() end, desc = "Colorscheme" },
|
||||||
},
|
|
||||||
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",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
})
|
||||||
end,
|
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