change session search to use Telescope session-lens

This commit is contained in:
2024-11-21 14:35:43 -05:00
parent c93d3b53f4
commit 9ba489c8c3
+32 -32
View File
@@ -1,38 +1,38 @@
return { return {
"goolord/alpha-nvim", "goolord/alpha-nvim",
event = "VimEnter", event = "VimEnter",
config = function() config = function()
local alpha = require("alpha") local alpha = require("alpha")
local dashboard = require("alpha.themes.dashboard") local dashboard = require("alpha.themes.dashboard")
dashboard.section.header.val = { dashboard.section.header.val = {
" @@@@@@@ @@@@@@@@ @@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@ @@@@@@@ @@@ @@@ @@@@@@@@ @@@@@@@ ", " @@@@@@@ @@@@@@@@ @@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@ @@@@@@@ @@@ @@@ @@@@@@@@ @@@@@@@ ",
"@@@@@@@@ @@@@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@ @@@ @@@ @@@@@@@@ @@@@@@@@ ", "@@@@@@@@ @@@@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@@ @@@@@@@ @@@ @@@ @@@@@@@@ @@@@@@@@ ",
"!@@ @@! @@@@ @@! @@@ @@! @@! @@! @@@ @@! @@! @@@ @@! @@! @@@ ", "!@@ @@! @@@@ @@! @@@ @@! @@! @@! @@@ @@! @@! @@@ @@! @@! @@@ ",
"!@! !@! @!@!@ !@! @!@ !@! !@! !@! @!@ !@! !@! @!@ !@! !@! @!@ ", "!@! !@! @!@!@ !@! @!@ !@! !@! !@! @!@ !@! !@! @!@ !@! !@! @!@ ",
"!@! @!@ @! !@! @!@ !@! @!!!:! @!!!:! @!@!@!@! @!! @!@!@!@! @!!!:! @!@!!@! ", "!@! @!@ @! !@! @!@ !@! @!!!:! @!!!:! @!@!@!@! @!! @!@!@!@! @!!!:! @!@!!@! ",
"!!! !@!!! !!! !@! !!! !!!!!: !!!!!: !!!@!!!! !!! !!!@!!!! !!!!!: !!@!@! ", "!!! !@!!! !!! !@! !!! !!!!!: !!!!!: !!!@!!!! !!! !!!@!!!! !!!!!: !!@!@! ",
":!! !!:! !!! !!: !!! !!: !!: !!: !!! !!: !!: !!! !!: !!: :!! ", ":!! !!:! !!! !!: !!! !!: !!: !!: !!! !!: !!: !!! !!: !!: :!! ",
":!: :!: !:! :!: !:! :!: :!: :!: !:! :!: :!: !:! :!: :!: !:! ", ":!: :!: !:! :!: !:! :!: :!: :!: !:! :!: :!: !:! :!: :!: !:! ",
" ::: ::: ::::::: :: :::: :: :: :::: :: :: ::: :: :: ::: :: :::: :: ::: ", " ::: ::: ::::::: :: :::: :: :: :::: :: :: ::: :: :: ::: :: :::: :: ::: ",
" :: :: : : : : : :: : : : :: :: : : : : : : : : : :: :: : : : ", " :: :: : : : : : :: : : : :: :: : : : : : : : : : :: :: : : : ",
" ", " ",
} }
dashboard.section.buttons.val = { dashboard.section.buttons.val = {
dashboard.button("n", " > New File", "<cmd>ene<CR>"), dashboard.button("n", " > New File", "<cmd>ene<CR>"),
dashboard.button("e", " > Toggle file explorer", "<cmd>NvimTreeToggle<CR>"), dashboard.button("e", " > Toggle file explorer", "<cmd>NvimTreeToggle<CR>"),
dashboard.button("o", "󰙰 > Recent files", "<cmd>Telescope oldfiles<cr>"), dashboard.button("o", "󰙰 > Recent files", "<cmd>Telescope oldfiles<cr>"),
dashboard.button("f", "󰱼 > Find File", "<cmd>Telescope find_files<CR>"), dashboard.button("f", "󰱼 > Find File", "<cmd>Telescope find_files<CR>"),
dashboard.button("s", " > Find Word", "<cmd>Telescope live_grep<CR>"), dashboard.button("s", " > Find Word", "<cmd>Telescope live_grep<CR>"),
dashboard.button("r", "󰑓 > Open last session", "<cmd>SessionRestore<CR>"), dashboard.button("r", "󰑓 > Open last session", "<cmd>SessionRestore<CR>"),
dashboard.button("R", "󰁯 > Restore a Previous Session", "<cmd>SessionSearch<CR>"), dashboard.button("R", "󰁯 > Restore a Previous Session", "<cmd>Telescope session-lens<CR>"),
dashboard.button("q", " > Quit NVIM", "<cmd>qa<CR>"), dashboard.button("q", " > Quit NVIM", "<cmd>qa<CR>"),
} }
alpha.setup(dashboard.opts) alpha.setup(dashboard.opts)
vim.cmd([[autocmd FileType alpha setlocal nofoldenable]]) vim.cmd([[autocmd FileType alpha setlocal nofoldenable]])
end, end,
} }