Skip to content

Commit

Permalink
fix: remove temporary buggy resession and simplyfile
Browse files Browse the repository at this point in the history
  • Loading branch information
n3wborn committed Jun 18, 2024
1 parent 00c0c01 commit e1457a5
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 121 deletions.
66 changes: 33 additions & 33 deletions lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,63 +2,63 @@
"barbecue.nvim": { "branch": "main", "commit": "d38a2a023dfb1073dd0e8fee0c9be08855d3688f" },
"before.nvim": { "branch": "master", "commit": "42294a3ba5dc02d3f3a9fe4e9a033ef29da6dcc6" },
"bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" },
"catppuccin": { "branch": "main", "commit": "5215ea59df6d0a7e27da9a5cd1165e06d1b04cbe" },
"catppuccin": { "branch": "main", "commit": "c0bea773a09e49e123136b099bce9ddc1bf395d2" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-rg": { "branch": "master", "commit": "677a7874ee8f1afc648c2e7d63a97bc21a7663c5" },
"cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" },
"conform.nvim": { "branch": "master", "commit": "f3b930db4964d60e255c8f9e37b7f2218dfc08cb" },
"diffview.nvim": { "branch": "main", "commit": "3afa6a053f680e9f1329c4a151db988a482306cd" },
"dressing.nvim": { "branch": "master", "commit": "3c38ac861e1b8d4077ff46a779cde17330b29f3a" },
"fzf-lua": { "branch": "main", "commit": "b92220ec838c195eb1c711daa69c905b1d7b8d8c" },
"conform.nvim": { "branch": "master", "commit": "0d12c3781384d63909431297ed1a0f383008bb8f" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dressing.nvim": { "branch": "master", "commit": "e3714c8049b2243e792492c4149e4cc395c68eb9" },
"fzf-lua": { "branch": "main", "commit": "b59bb9a205547a4d57987ab939845d9b35833466" },
"gh-addressed.nvim": { "branch": "main", "commit": "64c12f0f2a1d28afe53220da5fb86e1adb79be07" },
"gh-blame.nvim": { "branch": "main", "commit": "1a6e6444a6988135c5e71e73fa207277dceba906" },
"git-conflict.nvim": { "branch": "main", "commit": "5a8b94276bbd9c18ecb0763061b101217cecba9d" },
"gitsigns.nvim": { "branch": "main", "commit": "75dc649106827183547d3bedd4602442340d2f7f" },
"git-conflict.nvim": { "branch": "main", "commit": "bfd9fe6fba9a161fc199771d85996236a0d0faad" },
"gitsigns.nvim": { "branch": "main", "commit": "def49e48c6329527e344d0c99a0d2cd9fdf6bb84" },
"indent-blankline.nvim": { "branch": "master", "commit": "d98f537c3492e87b6dc6c2e3f66ac517528f406f" },
"lazy.nvim": { "branch": "main", "commit": "24fa2a97085ca8a7220b5b078916f81e316036fd" },
"lazy.nvim": { "branch": "main", "commit": "cd6a8293430a7fadf6a093dfdfbdb1ddbaf8ae7d" },
"lazygit.nvim": { "branch": "main", "commit": "ad3e1ea592f9d13e86e0d4e850224d9d78069508" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" },
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
"mini.align": { "branch": "main", "commit": "68a8d3205f0e7ce1bded057f4a851f42ef8fc584" },
"mini.animate": { "branch": "main", "commit": "0a35f6db55cfac04a0999abe3465f7b692dc56a7" },
"mini.surround": { "branch": "main", "commit": "27096c1a27324ee8f2044ea2adc77366d8a782de" },
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
"noice.nvim": { "branch": "main", "commit": "69c6ad5c1f1c0777125d0275f9871d8609cb0521" },
"nui.nvim": { "branch": "main", "commit": "b1b3dcd6ed8f355c78bad3d395ff645be5f8b6ae" },
"mini.surround": { "branch": "main", "commit": "dad4ee9846fed670f221feb4d32203912be8804b" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" },
"neodev.nvim": { "branch": "main", "commit": "02893eeb9d6e8503817bd52385e111cba9a90500" },
"noice.nvim": { "branch": "main", "commit": "88ac36864b5976a64b14a8f156c616f41b32f228" },
"nui.nvim": { "branch": "main", "commit": "322978c734866996274467de084a95e4f9b5e0b1" },
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
"nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
"nvim-lint": { "branch": "master", "commit": "e19842a05aae484957ad20710444757bc0a61d63" },
"nvim-lspconfig": { "branch": "master", "commit": "38de86f82efd9ba0881203767d6a8e1815abca28" },
"nvim-lint": { "branch": "master", "commit": "941fa1220a61797a51f3af9ec6b7d74c8c7367ce" },
"nvim-lspconfig": { "branch": "master", "commit": "bd7c76375a511994c9ca8d69441f134dc10ae3bd" },
"nvim-navbuddy": { "branch": "master", "commit": "f22bac988f2dd073601d75ba39ea5636ab6e38cb" },
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
"nvim-origami": { "branch": "main", "commit": "f0a8ac281ca13ff09d534118225a26076e7b91e0" },
"nvim-treesitter": { "branch": "master", "commit": "b91ae14fc3bb801c7ea69bc283fe860b32b5163d" },
"nvim-origami": { "branch": "main", "commit": "c824f470e0c177707822c37b13087ab1dd7ddf91" },
"nvim-treesitter": { "branch": "master", "commit": "4bbd2e72f877ce6835c8ccc1b588ed465446c6ab" },
"nvim-treesitter-refactor": { "branch": "master", "commit": "65ad2eca822dfaec2a3603119ec3cc8826a7859e" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "3557e41418b4a6c5b85d5d64abe94c9c50fa9b14" },
"nvim-ts-autotag": { "branch": "main", "commit": "bcf3146864262ef2d3c877beba3e222b5c73780d" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "34867c69838078df7d6919b130c0541c0b400c47" },
"nvim-ts-autotag": { "branch": "main", "commit": "06fe07d7523ba8c755fac7c913fceba43b1720ee" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "cb064386e667def1d241317deed9fd1b38f0dc2e" },
"nvim-ufo": { "branch": "main", "commit": "65dda6360879f6ffe0278163b9192a573a0d2a08" },
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
"oil.nvim": { "branch": "master", "commit": "2cb39e838e9dcd8b374f09a3a87a2e5ec9d372f6" },
"nvim-ufo": { "branch": "main", "commit": "aa2e676af592b4e99c105d80d6eafd1afc215d99" },
"nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
"nvim-window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" },
"oil.nvim": { "branch": "master", "commit": "64a3a555b40d96faae488ed6cf5d0f8b38520891" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"promise-async": { "branch": "main", "commit": "93540c168c5ed2b030ec3e6c40ab8bbb85e36355" },
"render-markdown": { "branch": "main", "commit": "c1d9edc2f2690ef326bd8afbe7fc080412cbb224" },
"resession.nvim": { "branch": "master", "commit": "1458d3c652d361d02a4f7fb556436d096041dd58" },
"promise-async": { "branch": "main", "commit": "28c1d5a295eb5310afa2523d4ae9aa41ec5a9de2" },
"render-markdown": { "branch": "main", "commit": "973a5ac8a0a7e8721576d144af8ba5f95c057689" },
"resession.nvim": { "branch": "master", "commit": "460759570451a37bd7d9684f5e060016055a89af" },
"rustaceanvim": { "branch": "master", "commit": "bc8c4b8f7606d5b7c067cd8369e25c1a7ff77bd0" },
"schemastore.nvim": { "branch": "main", "commit": "931f9f3b7b60ec976159cb01b4a40da3829ac2fd" },
"simplyfile.nvim": { "branch": "main", "commit": "2675520136e79a31b0093713dd3974f17fe104d2" },
"schemastore.nvim": { "branch": "main", "commit": "35f36c50b9f1e1e916d0e3f004cb48dffd2bf737" },
"telescope-git-submodules.nvim": { "branch": "main", "commit": "ece2164d0171d01f7396420df5ef1cf82a910b60" },
"telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
"todo-comments.nvim": { "branch": "main", "commit": "e1549807066947818113a7d7ed48f637e49620d3" },
"todo-comments.nvim": { "branch": "main", "commit": "51e10f838e84b4756c16311d0b1ef0972c6482d2" },
"toggleterm.nvim": { "branch": "main", "commit": "066cccf48a43553a80a210eb3be89a15d789d6e6" },
"trouble.nvim": { "branch": "dev", "commit": "3d95dbdae6e633d153e5c2fd4ae77cdf9294c0e8" },
"typescript-tools.nvim": { "branch": "master", "commit": "c43d9580c3ff5999a1eabca849f807ab33787ea7" },
"trouble.nvim": { "branch": "main", "commit": "58a3acfc6d8d819324dab4c87068596319032e64" },
"typescript-tools.nvim": { "branch": "master", "commit": "3f942ec187523d1d82f813106ceea9be9dac5287" },
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
"vim-dadbod": { "branch": "master", "commit": "fb30422b7bee7e2fa4205a4d226f01477f4fc593" },
"vim-dadbod": { "branch": "master", "commit": "7888cb7164d69783d3dce4e0283decd26b82538b" },
"vim-dadbod-completion": { "branch": "master", "commit": "5d5ad196fcde223509d7dabbade0148f7884c5e3" },
"vim-dadbod-ui": { "branch": "master", "commit": "0dc68d9225a70d42f8645049482e090c1a8dce25" }
}
46 changes: 0 additions & 46 deletions lua/custom/autocommands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -172,50 +172,4 @@ vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'TextChanged', 'Insert
end,
})

local resession = require('resession')

vim.api.nvim_create_autocmd('VimLeavePre', {
callback = function()
require('resession').save('last')
end,
})

vim.keymap.set('n', '<space>Ss', resession.save)
vim.keymap.set('n', '<space>Sl', resession.load)
vim.keymap.set('n', '<space>Sd', resession.delete)

-- session per git branch
-- (https://github.com/stevearc/resession.nvim/blob/492a2d6455ce7be3da3901402fd31a8dffb7f133/README.md#create-one-session-per-git-branch)
local get_session_name = function()
local name = vim.fn.getcwd()
local branch = vim.trim(vim.fn.system('git branch --show-current'))
if vim.v.shell_error == 0 then
return name .. branch
else
return name
end
end

vim.api.nvim_create_autocmd('VimEnter', {
callback = function()
-- Only load the session if nvim was started with no args
if vim.fn.argc(-1) == 0 then
resession.load(get_session_name(), { dir = 'dirsession', silence_errors = true })
end
end,
})
vim.api.nvim_create_autocmd('VimLeavePre', {
callback = function()
resession.save(get_session_name(), { dir = 'dirsession', notify = false })
end,
})

vim.api.nvim_create_autocmd({ 'BufEnter', 'WinEnter', 'WinNew', 'VimResized' }, {
group = vim.api.nvim_create_augroup('VCenterCursor', { clear = true }),
pattern = { '*', '*.*' },
callback = function()
vim.o.scrolloff = 999
end,
})

vim.opt.updatetime = 100
24 changes: 1 addition & 23 deletions lua/plugins/file_explorer.lua
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
return {
{
'Rizwanelansyah/simplyfile.nvim',
keys = {
{
'<leader>e',
function()
require('simplyfile').open()
end,
{ desc = 'open file explorer' },
},
},
config = function()
require('simplyfile').setup({
border = {
left = 'rounded',
main = 'double',
right = 'rounded',
},
default_keymaps = true,
})
end,
},
{
'nvim-neo-tree/neo-tree.nvim',
branch = 'v3.x',
Expand Down Expand Up @@ -101,7 +79,7 @@ return {
},
},
keys = {
{ '<leader>E', '<cmd>Neotree toggle=true<cr>', desc = 'neotree' },
{ '<leader>e', '<cmd>Neotree toggle=true<cr>', desc = 'neotree' },
},
config = function(_, opts)
require('neo-tree').setup(opts)
Expand Down
15 changes: 0 additions & 15 deletions lua/plugins/neotree.lua

This file was deleted.

8 changes: 4 additions & 4 deletions lua/plugins/session.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
return {
'stevearc/resession.nvim',
opts = {},
config = function(_, opts)
require('resession').setup(opts)
end,
-- opts = {},
-- config = function(_, opts)
-- require('resession').setup(opts)
-- end,
}

0 comments on commit e1457a5

Please sign in to comment.