diff --git a/init.lua b/init.lua index c45887f..4be81ec 100644 --- a/init.lua +++ b/init.lua @@ -1 +1,2 @@ +require('packer') -- plugins require('default') -- load Default config diff --git a/lua/default/basic.lua b/lua/default/basic.lua index a6d8fad..300ddb1 100644 --- a/lua/default/basic.lua +++ b/lua/default/basic.lua @@ -37,10 +37,16 @@ else onedark.load() end - -- enable mouse support and clipboard(xsel or wl-clipboard(for wayland)) vim.opt.clipboard = "unnamedplus" vim.opt.mouse = "a" +-- Restore cursor position +vim.api.nvim_create_autocmd({ "BufReadPost" }, { + pattern = { "*" }, + callback = function() + vim.api.nvim_exec('silent! normal! g`"zv', false) + end, +}) vim.opt.laststatus= 3 -- Status Line Mode vim.opt.showtabline= 2 -- Tab Line Mode diff --git a/lua/default/init.lua b/lua/default/init.lua index 16e7de9..f27b643 100644 --- a/lua/default/init.lua +++ b/lua/default/init.lua @@ -1,5 +1,3 @@ -require('default.packer') -- Plugins - -- Basic configs require('default.basic') require('default.bindings') diff --git a/lua/default/packer.lua b/lua/packer.lua similarity index 97% rename from lua/default/packer.lua rename to lua/packer.lua index d70749b..218aa04 100644 --- a/lua/default/packer.lua +++ b/lua/packer.lua @@ -37,7 +37,9 @@ packer.startup( -- Packer can manage itself use 'wbthomason/packer.nvim' - + -- Speed up loading Lua modules in Neovim to improve startup time. + use 'lewis6991/impatient.nvim' + -- treesitter use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate', config = function()