diff options
Diffstat (limited to 'fnl')
-rw-r--r-- | fnl/config/alpha.fnl | 6 | ||||
-rw-r--r-- | fnl/config/auto-session.fnl | 20 | ||||
-rw-r--r-- | fnl/config/init.fnl | 1 | ||||
-rw-r--r-- | fnl/config/telescope.fnl | 1 | ||||
-rw-r--r-- | fnl/plugins.fnl | 2 |
5 files changed, 28 insertions, 2 deletions
diff --git a/fnl/config/alpha.fnl b/fnl/config/alpha.fnl index fcbbb8c..0f0f680 100644 --- a/fnl/config/alpha.fnl +++ b/fnl/config/alpha.fnl @@ -24,12 +24,14 @@ (let [dashboard (require :alpha.themes.dashboard)] (set dashboard.section.header.val ascii-art) (set dashboard.section.buttons.val - [(dashboard.button :f " Find file" ":Telescope find_files <CR>") + [ (dashboard.button :e " New file" ":ene <BAR> startinsert <CR>") + (dashboard.button :f " Find file" ":Telescope find_files <CR>") + (dashboard.button :t " Find text" ":Telescope live_grep <CR>") + (dashboard.button :s " Find Session" ":SearchSession<CR>") (dashboard.button :p " Find project" ":Telescope projects <CR>") (dashboard.button :r " Recently used files" ":Telescope oldfiles <CR>") - (dashboard.button :t " Find text" ":Telescope live_grep <CR>") (dashboard.button :c " Configuration" ":e ~/.config/nvim/init.lua <CR>") (dashboard.button :q " Quit Neovim" ":qa<CR>")]) diff --git a/fnl/config/auto-session.fnl b/fnl/config/auto-session.fnl new file mode 100644 index 0000000..62e28b4 --- /dev/null +++ b/fnl/config/auto-session.fnl @@ -0,0 +1,20 @@ +;; Session manager. +(module config.auto-session {autoload {: util}}) + +(def- auto-opts {:log_level :info + :auto_session_enable_last_session false + :auto_session_root_dir (.. (vim.fn.stdpath :data) :/sessions/) + :auto_session_enabled true + :auto_save_enabled nil + :auto_restore_enabled nil + :auto_session_suppress_dirs [(os.getenv :HOME)] + :auto_session_use_git_branch nil + :bypass_session_save_file_types [:alpha]}) + +(def- lens-opts {:path_display [:shorten] + :previewer false + :prompt_title :Sessions}) + +(set vim.o.sessionoptions "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal") +(util.use-config :session-lens lens-opts) +(util.use-config :auto-session auto-opts) diff --git a/fnl/config/init.fnl b/fnl/config/init.fnl index 1f7c174..ade6d91 100644 --- a/fnl/config/init.fnl +++ b/fnl/config/init.fnl @@ -1,6 +1,7 @@ ;; Load all plugin configs. (module config.init {require [config.aerial config.alpha + ;;config.auto-session config.autocmd config.autopairs config.better-escape diff --git a/fnl/config/telescope.fnl b/fnl/config/telescope.fnl index 9d11106..a53433d 100644 --- a/fnl/config/telescope.fnl +++ b/fnl/config/telescope.fnl @@ -77,4 +77,5 @@ :case_mode :smart_case}}}) (telescope.load_extension :fzf) (telescope.load_extension :file_browser) + (telescope.load_extension :session-lens) (telescope.load_extension :projects))) diff --git a/fnl/plugins.fnl b/fnl/plugins.fnl index 27d9e0d..070c16c 100644 --- a/fnl/plugins.fnl +++ b/fnl/plugins.fnl @@ -4,6 +4,7 @@ :stevearc/aerial.nvim {} :goolord/alpha-nvim {} :Olical/aniseed {} + :rmagatti/auto-session {} :max397574/better-escape.nvim {} :hrsh7th/cmp-buffer {} :hrsh7th/cmp-cmdline {} @@ -47,6 +48,7 @@ :nvim-lua/popup.nvim {} :ahmedkhalf/project.nvim {} :b0o/SchemaStore.nvim {} + :rmagatti/session-lens {} :lewis6991/spellsitter.nvim {} :gbprod/stay-in-place.nvim {} :nvim-telescope/telescope-file-browser.nvim {} |