Skip to content

Commit

Permalink
vimrc: remove session-lens
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangyinzuo committed Apr 15, 2024
1 parent 1a36ed8 commit 59ac119
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 24 deletions.
29 changes: 22 additions & 7 deletions root/.config/nvim/lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ return {
"nvim-lua/plenary.nvim",
"aaronhallaert/advanced-git-search.nvim",
"nvim-telescope/telescope-media-files.nvim",
"rmagatti/session-lens",
"rmagatti/auto-session",
"nvim-tree/nvim-web-devicons",
"nvim-telescope/telescope-bibtex.nvim",
},
Expand Down Expand Up @@ -89,12 +89,27 @@ return {
},
{
'rmagatti/auto-session',
config = plugins_setup.auto_session,
},
{
'rmagatti/session-lens',
dependencies = {
'rmagatti/auto-session'
opts = {
log_level = 'error',
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 = { "~/", "~/Projects", "~/Downloads", "/", "~/.config", "~/.vim", "~/vimrc" },
auto_session_use_git_branch = nil,
-- the configs below are lua only
bypass_session_save_file_types = nil,

-- ⚠️ This will only work if Telescope.nvim is installed
-- The following are already the default values, no need to provide them if these are already the settings you want.
session_lens = {
-- If load_on_setup is set to false, one needs to eventually call `require("auto-session").setup_session_lens()` if they want to use session-lens.
buftypes_to_ignore = {}, -- list of buffer types what should not be deleted from current session
load_on_setup = true,
theme_conf = { border = true },
previewer = false,
},
}
},
-- oil.nvim implements WillRenameFiles Request that neovim LSP does not support.
Expand Down
17 changes: 0 additions & 17 deletions root/.config/nvim/lua/plugins_setup.lua
Original file line number Diff line number Diff line change
Expand Up @@ -212,23 +212,6 @@ function M.gitsigns()
}
end

function M.auto_session()
local opts = {
log_level = 'error',
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 = { "~/", "~/Projects", "~/Downloads", "/", "~/.config", "~/.vim", "~/vimrc" },
auto_session_use_git_branch = nil,
-- the configs below are lua only
bypass_session_save_file_types = nil
}

require('auto-session').setup(opts)
end

local colorscheme_loaded = false
function M.colorscheme()
if not colorscheme_loaded then
Expand Down

0 comments on commit 59ac119

Please sign in to comment.