✨ feat(nvim): add a dashboard keymap that supports alpha and dashboard-nvim
This commit is contained in:
parent
f0143c7241
commit
1c103c07de
2 changed files with 9 additions and 3 deletions
|
@ -154,3 +154,12 @@ map("x", "g/", "<esc>/\\%V", { silent = false, desc = "Search inside visual sele
|
||||||
-- Search visually selected text (slightly better than builtins in Neovim>=0.8)
|
-- Search visually selected text (slightly better than builtins in Neovim>=0.8)
|
||||||
map("x", "*", [[y/\V<C-R>=escape(@", '/\')<CR><CR>]])
|
map("x", "*", [[y/\V<C-R>=escape(@", '/\')<CR><CR>]])
|
||||||
map("x", "#", [[y?\V<C-R>=escape(@", '?\')<CR><CR>]])
|
map("x", "#", [[y?\V<C-R>=escape(@", '?\')<CR><CR>]])
|
||||||
|
|
||||||
|
-- Dashboard
|
||||||
|
map("n", "<leader>fd", function()
|
||||||
|
if Util.has("alpha-nvim") then
|
||||||
|
require("alpha").start(true)
|
||||||
|
elseif Util.has("dashboard-nvim") then
|
||||||
|
vim.cmd("Dashboard")
|
||||||
|
end
|
||||||
|
end, { desc = "Dashboard" })
|
||||||
|
|
|
@ -18,7 +18,4 @@ return {
|
||||||
opts.config.header = vim.split(logo, "\n")
|
opts.config.header = vim.split(logo, "\n")
|
||||||
return opts
|
return opts
|
||||||
end,
|
end,
|
||||||
keys = {
|
|
||||||
{ "<leader>fd", "<cmd>Dash<cr>", desc = "Dashboard" },
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue