yay done
This commit is contained in:
68
nvim/config/autosession.lua
Normal file
68
nvim/config/autosession.lua
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
local defaults = {
|
||||||
|
-- Saving / restoring
|
||||||
|
enabled = true, -- Enables/disables auto creating, saving and restoring
|
||||||
|
auto_save = true, -- Enables/disables auto saving session on exit
|
||||||
|
auto_restore = true, -- Enables/disables auto restoring session on start
|
||||||
|
auto_create = true, -- Enables/disables auto creating new session files. Can be a function that returns true if a new session file should be allowed
|
||||||
|
auto_restore_last_session = false, -- On startup, loads the last saved session if session for cwd does not exist
|
||||||
|
cwd_change_handling = false, -- Automatically save/restore sessions when changing directories
|
||||||
|
single_session_mode = false, -- Enable single session mode to keep all work in one session regardless of cwd changes. When enabled, prevents creation of separate sessions for different directories and maintains one unified session. Does not work with cwd_change_handling
|
||||||
|
|
||||||
|
-- Filtering
|
||||||
|
suppressed_dirs = nil, -- Suppress session restore/create in certain directories
|
||||||
|
allowed_dirs = nil, -- Allow session restore/create in certain directories
|
||||||
|
bypass_save_filetypes = nil, -- List of filetypes to bypass auto save when the only buffer open is one of the file types listed, useful to ignore dashboards
|
||||||
|
close_filetypes_on_save = { "checkhealth" }, -- Buffers with matching filetypes will be closed before saving
|
||||||
|
close_unsupported_windows = true, -- Close windows that aren't backed by normal file before autosaving a session
|
||||||
|
preserve_buffer_on_restore = nil, -- Function that returns true if a buffer should be preserved when restoring a session
|
||||||
|
|
||||||
|
-- Git / Session naming
|
||||||
|
git_use_branch_name = false, -- Include git branch name in session name
|
||||||
|
git_auto_restore_on_branch_change = false, -- Should we auto-restore the session when the git branch changes. Requires git_use_branch_name
|
||||||
|
custom_session_tag = nil, -- Function that can return a string to be used as part of the session name
|
||||||
|
|
||||||
|
-- Deleting
|
||||||
|
auto_delete_empty_sessions = true, -- Enables/disables deleting the session if there are only unnamed/empty buffers when auto-saving
|
||||||
|
purge_after_minutes = nil, -- Sessions older than purge_after_minutes will be deleted asynchronously on startup, e.g. set to 14400 to delete sessions that haven't been accessed for more than 10 days, defaults to off (no purging), requires >= nvim 0.10
|
||||||
|
|
||||||
|
-- Saving extra data
|
||||||
|
save_extra_data = nil, -- Function that returns extra data that should be saved with the session. Will be passed to restore_extra_data on restore
|
||||||
|
restore_extra_data = nil, -- Function called when there's extra data saved for a session
|
||||||
|
|
||||||
|
-- Argument handling
|
||||||
|
args_allow_single_directory = true, -- Follow normal session save/load logic if launched with a single directory as the only argument
|
||||||
|
args_allow_files_auto_save = false, -- Allow saving a session even when launched with a file argument (or multiple files/dirs). It does not load any existing session first. Can be true or a function that returns true when saving is allowed. See documentation for more detail
|
||||||
|
|
||||||
|
-- Misc
|
||||||
|
log_level = "error", -- Sets the log level of the plugin (debug, info, warn, error).
|
||||||
|
root_dir = vim.fn.stdpath("data") .. "/sessions/", -- Root dir where sessions will be stored
|
||||||
|
show_auto_restore_notif = false, -- Whether to show a notification when auto-restoring
|
||||||
|
restore_error_handler = nil, -- Function called when there's an error restoring. By default, it ignores fold errors otherwise it displays the error and returns false to disable auto_save
|
||||||
|
continue_restore_on_error = true, -- Keep loading the session even if there's an error
|
||||||
|
lsp_stop_on_restore = false, -- Should language servers be stopped when restoring a session. Can also be a function that will be called if set. Not called on autorestore from startup
|
||||||
|
lazy_support = true, -- Automatically detect if Lazy.nvim is being used and wait until Lazy is done to make sure session is restored correctly. Does nothing if Lazy isn't being used
|
||||||
|
legacy_cmds = true, -- Define legacy commands: Session*, Autosession (lowercase s), currently true. Set to false to prevent defining them
|
||||||
|
|
||||||
|
---@type SessionLens
|
||||||
|
session_lens = {
|
||||||
|
picker = nil, -- "telescope"|"snacks"|"fzf"|"select"|nil Pickers are detected automatically but you can also set one manually. Falls back to vim.ui.select
|
||||||
|
load_on_setup = true, -- Only used for telescope, registers the telescope extension at startup so you can use :Telescope session-lens
|
||||||
|
picker_opts = nil, -- Table passed to Telescope / Snacks / Fzf-Lua to configure the picker. See below for more information
|
||||||
|
|
||||||
|
---@type SessionLensMappings
|
||||||
|
mappings = {
|
||||||
|
-- Mode can be a string or a table, e.g. {"i", "n"} for both insert and normal mode
|
||||||
|
delete_session = { "i", "<C-d>" }, -- mode and key for deleting a session from the picker
|
||||||
|
alternate_session = { "i", "<C-s>" }, -- mode and key for swapping to alternate session from the picker
|
||||||
|
copy_session = { "i", "<C-y>" }, -- mode and key for copying a session from the picker
|
||||||
|
},
|
||||||
|
|
||||||
|
---@type SessionControl
|
||||||
|
session_control = {
|
||||||
|
control_dir = vim.fn.stdpath("data") .. "/auto_session/", -- Auto session control dir, for control files, like alternating between two sessions with session-lens
|
||||||
|
control_filename = "session_control.json", -- File name of the session control file
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- require("auto-session").setup(defaults)
|
||||||
@@ -1 +1,27 @@
|
|||||||
require('mini.sessions').setup()
|
local settings = {
|
||||||
|
autoread = false,
|
||||||
|
|
||||||
|
-- Whether to write currently read session before leaving it
|
||||||
|
autowrite = true,
|
||||||
|
|
||||||
|
-- Directory where global sessions are stored (use `''` to disable)
|
||||||
|
directory = "~/.config/nvim/sessions/",
|
||||||
|
|
||||||
|
-- File for local session (use `''` to disable)
|
||||||
|
file = 'Session.vim',
|
||||||
|
|
||||||
|
-- Whether to force possibly harmful actions (meaning depends on function)
|
||||||
|
force = { read = false, write = true, delete = false },
|
||||||
|
|
||||||
|
-- Hook functions for actions. Default `nil` means 'do nothing'.
|
||||||
|
hooks = {
|
||||||
|
-- Before successful action
|
||||||
|
pre = { read = nil, write = nil, delete = nil },
|
||||||
|
-- After successful action
|
||||||
|
post = { read = nil, write = nil, delete = nil },
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Whether to print session path after action
|
||||||
|
verbose = { read = false, write = true, delete = true },
|
||||||
|
}
|
||||||
|
require('mini.sessions').setup(settings)
|
||||||
|
|||||||
1
nvim/config/mini.starter.lua
Normal file
1
nvim/config/mini.starter.lua
Normal file
@@ -0,0 +1 @@
|
|||||||
|
require('mini.starter').setup()
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
function meow(buf_id, label)
|
function meow(buf_id, label)
|
||||||
local suffix = vim.bo[buf_id].modified and '+ ' or '| '
|
local suffix = vim.bo[buf_id].modified and '+ ' or '| '
|
||||||
local prefix = '|'
|
local prefix = ''
|
||||||
return prefix .. MiniTabline.default_format(buf_id, label) .. suffix
|
return prefix .. MiniTabline.default_format(buf_id, label) .. suffix
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,13 @@ return {
|
|||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
{ "nvim-tree/nvim-tree.lua", event = "UIEnter", name="nvim-tree" },
|
{ "nvim-tree/nvim-tree.lua", event = "UIEnter", name="nvim-tree" },
|
||||||
-- mini stuff
|
-- mini stuff
|
||||||
"echasnovski/mini.notify",
|
"nvim-mini/mini.notify",
|
||||||
"echasnovski/mini.cursorword",
|
"nvim-mini/mini.cursorword",
|
||||||
"echasnovski/mini.tabline",
|
"nvim-mini/mini.tabline",
|
||||||
"echasnovski/mini.statusline",
|
"nvim-mini/mini.statusline",
|
||||||
"echasnovski/mini.completion",
|
"nvim-mini/mini.completion",
|
||||||
"echasnovski/mini.comment",
|
"nvim-mini/mini.comment",
|
||||||
"echasnovski/mini.sessions",
|
"nvim-mini/mini.starter",
|
||||||
|
"nvim-mini/mini.sessions",
|
||||||
|
{ "rmagatti/auto-session", name="autosession"},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,25 +3,20 @@ let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-
|
|||||||
let v:this_session=expand("<sfile>:p")
|
let v:this_session=expand("<sfile>:p")
|
||||||
silent only
|
silent only
|
||||||
silent tabonly
|
silent tabonly
|
||||||
cd ~/dotfiles/nvim/lua/doloro
|
cd ~/dotfiles/nvim
|
||||||
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
|
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
|
||||||
let s:wipebuf = bufnr('%')
|
let s:wipebuf = bufnr('%')
|
||||||
endif
|
endif
|
||||||
let s:shortmess_save = &shortmess
|
let s:shortmess_save = &shortmess
|
||||||
set shortmess+=aoO
|
set shortmess+=aoO
|
||||||
badd +12 plugins.lua
|
badd +1 config/mini.sessions.lua
|
||||||
badd +21 ~/dotfiles/nvim/init.lua
|
badd +0 lua/doloro/init.lua
|
||||||
badd +1 ~/dotfiles/nvim/init.lua.old
|
|
||||||
badd +1 init.lua
|
|
||||||
badd +1 ~/dotfiles/nvim/config/nvim-tree.lua
|
|
||||||
badd +3 ~/dotfiles/nvim/config/mini.tabline.lua
|
|
||||||
argglobal
|
argglobal
|
||||||
%argdel
|
%argdel
|
||||||
$argadd plugins.lua
|
|
||||||
argglobal
|
argglobal
|
||||||
enew
|
enew
|
||||||
file NvimTree_1
|
file NvimTree_1
|
||||||
balt plugins.lua
|
balt config/mini.sessions.lua
|
||||||
setlocal foldmethod=manual
|
setlocal foldmethod=manual
|
||||||
setlocal foldexpr=0
|
setlocal foldexpr=0
|
||||||
setlocal foldmarker={{{,}}}
|
setlocal foldmarker={{{,}}}
|
||||||
@@ -30,7 +25,6 @@ setlocal foldlevel=0
|
|||||||
setlocal foldminlines=1
|
setlocal foldminlines=1
|
||||||
setlocal foldnestmax=20
|
setlocal foldnestmax=20
|
||||||
setlocal nofoldenable
|
setlocal nofoldenable
|
||||||
lcd ~/dotfiles/nvim
|
|
||||||
tabnext 1
|
tabnext 1
|
||||||
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
|
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
|
||||||
silent exe 'bwipe ' . s:wipebuf
|
silent exe 'bwipe ' . s:wipebuf
|
||||||
42
nvim/sessions/meowmeow.vim
Normal file
42
nvim/sessions/meowmeow.vim
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
let SessionLoad = 1
|
||||||
|
let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1
|
||||||
|
let v:this_session=expand("<sfile>:p")
|
||||||
|
silent only
|
||||||
|
silent tabonly
|
||||||
|
cd ~
|
||||||
|
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
|
||||||
|
let s:wipebuf = bufnr('%')
|
||||||
|
endif
|
||||||
|
let s:shortmess_save = &shortmess
|
||||||
|
set shortmess+=aoO
|
||||||
|
badd +3 dotfiles/nvim/lua/doloro/plugins.lua
|
||||||
|
argglobal
|
||||||
|
%argdel
|
||||||
|
argglobal
|
||||||
|
enew
|
||||||
|
file NvimTree_1
|
||||||
|
balt dotfiles/nvim/lua/doloro/plugins.lua
|
||||||
|
setlocal foldmethod=manual
|
||||||
|
setlocal foldexpr=0
|
||||||
|
setlocal foldmarker={{{,}}}
|
||||||
|
setlocal foldignore=#
|
||||||
|
setlocal foldlevel=0
|
||||||
|
setlocal foldminlines=1
|
||||||
|
setlocal foldnestmax=20
|
||||||
|
setlocal nofoldenable
|
||||||
|
tabnext 1
|
||||||
|
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
|
||||||
|
silent exe 'bwipe ' . s:wipebuf
|
||||||
|
endif
|
||||||
|
unlet! s:wipebuf
|
||||||
|
set winheight=1 winwidth=20
|
||||||
|
let &shortmess = s:shortmess_save
|
||||||
|
let s:sx = expand("<sfile>:p:r")."x.vim"
|
||||||
|
if filereadable(s:sx)
|
||||||
|
exe "source " . fnameescape(s:sx)
|
||||||
|
endif
|
||||||
|
let &g:so = s:so_save | let &g:siso = s:siso_save
|
||||||
|
set hlsearch
|
||||||
|
doautoall SessionLoadPost
|
||||||
|
unlet SessionLoad
|
||||||
|
" vim: set ft=vim :
|
||||||
41
nvim/sessions/test
Normal file
41
nvim/sessions/test
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
let SessionLoad = 1
|
||||||
|
let s:so_save = &g:so | let s:siso_save = &g:siso | setg so=0 siso=0 | setl so=-1 siso=-1
|
||||||
|
let v:this_session=expand("<sfile>:p")
|
||||||
|
silent only
|
||||||
|
silent tabonly
|
||||||
|
cd ~/dotfiles/nvim
|
||||||
|
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == ''
|
||||||
|
let s:wipebuf = bufnr('%')
|
||||||
|
endif
|
||||||
|
let s:shortmess_save = &shortmess
|
||||||
|
set shortmess+=aoO
|
||||||
|
argglobal
|
||||||
|
%argdel
|
||||||
|
argglobal
|
||||||
|
enew
|
||||||
|
file ministarter://1/welcome
|
||||||
|
setlocal foldmethod=manual
|
||||||
|
setlocal foldexpr=0
|
||||||
|
setlocal foldmarker={{{,}}}
|
||||||
|
setlocal foldignore=#
|
||||||
|
setlocal foldlevel=999
|
||||||
|
setlocal foldminlines=1
|
||||||
|
setlocal foldnestmax=20
|
||||||
|
setlocal foldenable
|
||||||
|
tabnext 1
|
||||||
|
if exists('s:wipebuf') && len(win_findbuf(s:wipebuf)) == 0 && getbufvar(s:wipebuf, '&buftype') isnot# 'terminal'
|
||||||
|
silent exe 'bwipe ' . s:wipebuf
|
||||||
|
endif
|
||||||
|
unlet! s:wipebuf
|
||||||
|
set winheight=1 winwidth=20
|
||||||
|
let &shortmess = s:shortmess_save
|
||||||
|
let s:sx = expand("<sfile>:p:r")."x.vim"
|
||||||
|
if filereadable(s:sx)
|
||||||
|
exe "source " . fnameescape(s:sx)
|
||||||
|
endif
|
||||||
|
let &g:so = s:so_save | let &g:siso = s:siso_save
|
||||||
|
set hlsearch
|
||||||
|
nohlsearch
|
||||||
|
doautoall SessionLoadPost
|
||||||
|
unlet SessionLoad
|
||||||
|
" vim: set ft=vim :
|
||||||
1
tmux/plugins/minimal-tmux-status
Submodule
1
tmux/plugins/minimal-tmux-status
Submodule
Submodule tmux/plugins/minimal-tmux-status added at de2bb049a7
1
tmux/plugins/tmux-sensible
Submodule
1
tmux/plugins/tmux-sensible
Submodule
Submodule tmux/plugins/tmux-sensible added at 25cb91f42d
1
tmux/plugins/tpm
Submodule
1
tmux/plugins/tpm
Submodule
Submodule tmux/plugins/tpm added at 99469c4a9b
8
tmux/tmux.conf
Normal file
8
tmux/tmux.conf
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
set -g @plugin 'tmux-plugins/tpm'
|
||||||
|
set -g @plugin 'tmux-plugins/tmux-sensible'
|
||||||
|
|
||||||
|
set -g @plugin 'niksingh710/minimal-tmux-status'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
run '~/.tmux/plugins/tpm/tpm'
|
||||||
Reference in New Issue
Block a user