Add session managment to tmux and neovim
This commit is contained in:
parent
58f515d9d0
commit
5898f6b5a6
7 changed files with 69 additions and 60 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "80a8528f084a97b624ae443a6f50ff8074ba486b" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "234822140b265ec4ba3203e3e0be0e0bb826dff5" },
|
||||
"auto-session": { "branch": "main", "commit": "3eb26b949e1b90798e84926848551046e2eb0721" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "357cc8f8eeb64702e6fcf2995e3b9becee99a5d3" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
|
||||
|
|
|
|||
|
|
@ -11,62 +11,64 @@ local opt = vim.opt
|
|||
opt.autowrite = true -- Enable auto write
|
||||
--opt.clipboard = "unnamedplus" -- Sync with system clipboard
|
||||
opt.completeopt = "menu,menuone,noselect"
|
||||
opt.conceallevel = 3 -- Hide * markup for bold and italic
|
||||
opt.confirm = true -- Confirm to save changes before exiting modified buffer
|
||||
opt.cursorline = true -- Enable highlighting of the current line
|
||||
opt.expandtab = true -- Use spaces instead of tabs
|
||||
opt.formatoptions = "jcroqlnt" -- tcqj
|
||||
opt.conceallevel = 3 -- Hide * markup for bold and italic
|
||||
opt.confirm = true -- Confirm to save changes before exiting modified buffer
|
||||
opt.cursorline = true -- Enable highlighting of the current line
|
||||
opt.expandtab = true -- Use spaces instead of tabs
|
||||
opt.formatoptions = "jcroqlnt" -- tcqj
|
||||
opt.grepformat = "%f:%l:%c:%m"
|
||||
opt.grepprg = "rg --vimgrep"
|
||||
opt.ignorecase = true -- Ignore case
|
||||
opt.inccommand = "nosplit" -- preview incremental substitute
|
||||
opt.ignorecase = true -- Ignore case
|
||||
opt.inccommand = "nosplit" -- preview incremental substitute
|
||||
opt.laststatus = 0
|
||||
opt.list = true -- Show some invisible characters (tabs...
|
||||
opt.mouse = "a" -- Enable mouse mode
|
||||
opt.number = true -- Print line number
|
||||
opt.pumblend = 10 -- Popup blend
|
||||
opt.pumheight = 10 -- Maximum number of entries in a popup
|
||||
opt.relativenumber = true -- Relative line numbers
|
||||
opt.scrolloff = 8 -- Lines of context
|
||||
opt.list = true -- Show some invisible characters (tabs...
|
||||
opt.mouse = "a" -- Enable mouse mode
|
||||
opt.number = true -- Print line number
|
||||
opt.pumblend = 10 -- Popup blend
|
||||
opt.pumheight = 10 -- Maximum number of entries in a popup
|
||||
opt.relativenumber = true -- Relative line numbers
|
||||
opt.scrolloff = 8 -- Lines of context
|
||||
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
|
||||
opt.shiftround = true -- Round indent
|
||||
opt.shiftwidth = 2 -- Size of an indent
|
||||
opt.shiftround = true -- Round indent
|
||||
opt.shiftwidth = 2 -- Size of an indent
|
||||
opt.shortmess:append({ W = true, I = true, c = true })
|
||||
opt.showmode = false -- Dont show mode since we have a statusline
|
||||
opt.sidescrolloff = 8 -- Columns of context
|
||||
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
||||
opt.smartcase = true -- Don't ignore case with capitals
|
||||
opt.smartindent = true -- Insert indents automatically
|
||||
opt.showmode = false -- Dont show mode since we have a statusline
|
||||
opt.sidescrolloff = 8 -- Columns of context
|
||||
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
|
||||
opt.smartcase = true -- Don't ignore case with capitals
|
||||
opt.smartindent = true -- Insert indents automatically
|
||||
opt.spelllang = { "en" }
|
||||
opt.splitbelow = true -- Put new windows below current
|
||||
opt.splitright = true -- Put new windows right of current
|
||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
||||
opt.termguicolors = true -- True color support
|
||||
opt.splitbelow = true -- Put new windows below current
|
||||
opt.splitright = true -- Put new windows right of current
|
||||
opt.tabstop = 2 -- Number of spaces tabs count for
|
||||
opt.termguicolors = true -- True color support
|
||||
opt.timeoutlen = 300
|
||||
opt.undofile = true
|
||||
opt.undolevels = 10000
|
||||
opt.updatetime = 200 -- Save swap file and trigger CursorHold
|
||||
opt.wildmode = "longest:full,full" -- Command-line completion mode
|
||||
opt.winminwidth = 5 -- Minimum window width
|
||||
opt.wrap = false -- Disable line wrap
|
||||
opt.updatetime = 200 -- Save swap file and trigger CursorHold
|
||||
opt.wildmode = "longest:full,full" -- Command-line completion mode
|
||||
opt.winminwidth = 5 -- Minimum window width
|
||||
opt.wrap = false -- Disable line wrap
|
||||
|
||||
vim.o.sessionoptions = "blank,buffers,curdir,folds,help,tabpages,winsize,winpos,terminal,localoptions"
|
||||
|
||||
vim.filetype.add({
|
||||
-- Detect and assign filetype based on the extension of the filename
|
||||
extension = {
|
||||
mdx = "mdx",
|
||||
log = "log",
|
||||
conf = "conf",
|
||||
env = "dotenv",
|
||||
},
|
||||
-- Detect and apply filetypes based on the entire filename
|
||||
filename = {
|
||||
[".env"] = "dotenv",
|
||||
["env"] = "dotenv",
|
||||
["tsconfig.json"] = "jsonc",
|
||||
},
|
||||
-- Detect and apply filetypes based on certain patterns of the filenames
|
||||
pattern = {
|
||||
-- INFO: Match filenames like - ".env.example", ".env.local" and so on
|
||||
["%.env%.[%w_.-]+"] = "dotenv",
|
||||
},
|
||||
-- Detect and assign filetype based on the extension of the filename
|
||||
extension = {
|
||||
mdx = "mdx",
|
||||
log = "log",
|
||||
conf = "conf",
|
||||
env = "dotenv",
|
||||
},
|
||||
-- Detect and apply filetypes based on the entire filename
|
||||
filename = {
|
||||
[".env"] = "dotenv",
|
||||
["env"] = "dotenv",
|
||||
["tsconfig.json"] = "jsonc",
|
||||
},
|
||||
-- Detect and apply filetypes based on certain patterns of the filenames
|
||||
pattern = {
|
||||
-- INFO: Match filenames like - ".env.example", ".env.local" and so on
|
||||
["%.env%.[%w_.-]+"] = "dotenv",
|
||||
},
|
||||
})
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ return {
|
|||
"petertriho/cmp-git",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
"L3MON4D3/LuaSnip",
|
||||
},
|
||||
config = function()
|
||||
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
|
||||
|
|
|
|||
|
|
@ -1,16 +1,9 @@
|
|||
return {
|
||||
-- NOTE: First, some plugins that don't require any configuration
|
||||
|
||||
-- Detect tabstop and shiftwidth automatically
|
||||
"tpope/vim-sleuth",
|
||||
|
||||
{
|
||||
-- Autocompletion
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-nvim-lsp", "L3MON4D3/LuaSnip", "saadparwaiz1/cmp_luasnip" },
|
||||
},
|
||||
|
||||
{
|
||||
-- Highlight word under cursor
|
||||
"RRethy/vim-illuminate",
|
||||
event = { "BufReadPost", "BufNewFile" },
|
||||
opts = { delay = 200 },
|
||||
|
|
|
|||
10
config/nvim/lua/aleidk/plugins/sessions.lua
Normal file
10
config/nvim/lua/aleidk/plugins/sessions.lua
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
return {
|
||||
-- sessions
|
||||
"rmagatti/auto-session",
|
||||
config = function()
|
||||
require("auto-session").setup({
|
||||
log_level = "error",
|
||||
auto_session_suppress_dirs = { "~/", "~/Downloads", "/" },
|
||||
})
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue