格式化配置help.lua

This commit is contained in:
LingZhaoHui 2024-06-20 00:48:06 +08:00
parent 1ed88eaaca
commit 38cf6c0a78
Signed by: zeekling
GPG Key ID: D96E4E75267CA2CC

View File

@ -1,57 +1,57 @@
return { return {
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
config = function() config = function()
vim.o.timeout = true vim.o.timeout = true
vim.o.timeoutlen = 300 vim.o.timeoutlen = 300
local wk = require("which-key") local wk = require("which-key")
-- 快捷键在这里定义 -- 快捷键在这里定义
wk.register({ wk.register({
["<leader>"] = { ["<leader>"] = {
b = { b = {
name="Buffer", name = "Buffer",
p={"<cmd>BufferLineCyclePrev<cr>", "Go to pre buffer"}, p = { "<cmd>BufferLineCyclePrev<cr>", "Go to pre buffer" },
n={"<cmd>BufferLineCycleNext<cr>", "Go to next buffer"}, n = { "<cmd>BufferLineCycleNext<cr>", "Go to next buffer" },
d={"<cmd>bd<cr>", "delete current buffer"} d = { "<cmd>bd<cr>", "delete current buffer" },
}, },
d = { d = {
name="dirTree", name = "dirTree",
s={"<cmd>NvimTreeToggle<cr>", "show dir tree on left"}, s = { "<cmd>NvimTreeToggle<cr>", "show dir tree on left" },
c={"<cmd>NvimTreeClose<cr>", "hidden dir tree on left"} c = { "<cmd>NvimTreeClose<cr>", "hidden dir tree on left" },
}, },
f = { f = {
name="Search,Format", name = "Search,Format",
s={ s = {
name="search", name = "search",
f={"<cmd>Telescope find_files<cr>", "Search file by name"}, f = { "<cmd>Telescope find_files<cr>", "Search file by name" },
g={"<cmd>Telescope live_grep<cr>", "Grep in files"}, g = { "<cmd>Telescope live_grep<cr>", "Grep in files" },
b={"<cmd>Telescope buffers<cr>", "Grep in buffer"}, b = { "<cmd>Telescope buffers<cr>", "Grep in buffer" },
}, },
f={"<cmd>Format<cr>", "Code Format"} f = { "<cmd>Format<cr>", "Code Format" },
}, },
l = { l = {
name="Lazy", name = "Lazy",
s={"<cmd>Lazy show<cr>", "Lazy show"}, s = { "<cmd>Lazy show<cr>", "Lazy show" },
i={"<cmd>Lazy install<cr>", "Lazy install"}, i = { "<cmd>Lazy install<cr>", "Lazy install" },
u={"<cmd>Lazy update<cr>", "Lazy update"}, u = { "<cmd>Lazy update<cr>", "Lazy update" },
}, },
m = { m = {
name="Markdown", name = "Markdown",
k={ k = {
name="Markdown", name = "Markdown",
s={"<cmd>MarkdownPreview<cr>", "MarkdownPreview"}, s = { "<cmd>MarkdownPreview<cr>", "MarkdownPreview" },
c={"<cmd>MarkdownPreviewStop<cr>", "MarkdownPreviewStop"} c = { "<cmd>MarkdownPreviewStop<cr>", "MarkdownPreviewStop" },
} },
}, },
v = { v = {
name = "version", name = "version",
v={"<cmd>version<cr>", "neovim version"}, v = { "<cmd>version<cr>", "neovim version" },
}, },
} },
}, {silent = true, noremap = true}) }, { silent = true, noremap = true })
wk.setup() wk.setup()
end, end,
}, },
} }