From a7dcacdd91823a87af68bdb8be555bb21555bdb3 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Fri, 1 Dec 2023 15:26:00 -0500 Subject: [PATCH] Fix and add some plugins * rest.nvim * winshift.nvim --- lua/install-plugins.lua | 26 +++++++++++++++++++++----- lua/plugins/auto-session.lua | 2 +- lua/plugins/lualine-nvim.lua | 9 +++++++-- lua/plugins/rest-nvim.lua | 7 +++++++ lua/plugins/winshift-nvim.lua | 11 +++++++++++ 5 files changed, 47 insertions(+), 8 deletions(-) create mode 100644 lua/plugins/rest-nvim.lua create mode 100644 lua/plugins/winshift-nvim.lua diff --git a/lua/install-plugins.lua b/lua/install-plugins.lua index 97f98cd..d740c12 100644 --- a/lua/install-plugins.lua +++ b/lua/install-plugins.lua @@ -11,6 +11,11 @@ end local packer_bootstrap = ensure_packer() +-- https://github.com/wbthomason/packer.nvim/issues/202 +require('packer').init({ + max_jobs = 50 +}) + return require('packer').startup(function(use) use 'wbthomason/packer.nvim' @@ -220,7 +225,6 @@ return require('packer').startup(function(use) require('plugins.gruvbox') end, } - use { 'shaunsingh/oxocarbon.nvim', run = './install.sh' } use { 'akinsho/toggleterm.nvim', tag = '*', @@ -348,13 +352,12 @@ return require('packer').startup(function(use) end, } use { - "jose-elias-alvarez/null-ls.nvim", + 'jose-elias-alvarez/null-ls.nvim', config = function() - require("plugins.null-ls-nvim") + require('plugins.null-ls-nvim') end, - requires = { "nvim-lua/plenary.nvim" }, + requires = { 'nvim-lua/plenary.nvim' }, } - use 'dhruvasagar/vim-zoom' use { 'rmagatti/auto-session', config = function() @@ -374,6 +377,19 @@ return require('packer').startup(function(use) require('plugins.true-zen-nvim') end } + use { + 'sindrets/winshift.nvim', + config = function() + require('plugins.winshift-nvim') + end, + } + use { + 'NTBBloodbath/rest.nvim', + requires = { 'nvim-lua/plenary.nvim' }, + config = function() + require('plugins.rest-nvim') + end, + } use { 'folke/which-key.nvim', config = function() diff --git a/lua/plugins/auto-session.lua b/lua/plugins/auto-session.lua index 2845729..814c579 100644 --- a/lua/plugins/auto-session.lua +++ b/lua/plugins/auto-session.lua @@ -3,5 +3,5 @@ vim.o.sessionoptions='blank,buffers,curdir,folds,help,tabpages,winsize,winpos,te require('auto-session').setup({ log_level = 'error', auto_session_suppress_dirs = { '~/', '~/workspace', '~/Downloads', '/'}, - auto_session_enable_last_session = true, + auto_session_enable_last_session = false, }) diff --git a/lua/plugins/lualine-nvim.lua b/lua/plugins/lualine-nvim.lua index 5f255d6..012e269 100644 --- a/lua/plugins/lualine-nvim.lua +++ b/lua/plugins/lualine-nvim.lua @@ -1,7 +1,12 @@ require('lualine').setup({ sections = { lualine_c = { - require('auto-session-library').current_session_name - } + require('auto-session-library').current_session_name, + { + 'filename', + file_status = true, -- displays file status (readonly status, modified status) + path = 1, -- 0 = just filename, 1 = relative path, 2 = absolute path + }, + }, } }) diff --git a/lua/plugins/rest-nvim.lua b/lua/plugins/rest-nvim.lua new file mode 100644 index 0000000..0ac7569 --- /dev/null +++ b/lua/plugins/rest-nvim.lua @@ -0,0 +1,7 @@ +require('rest-nvim').setup({ + skip_ssl_verification = true, +}) + +vim.keymap.set('n', 'rd', [[RestNvim]], { noremap = false, silent = true }) +vim.keymap.set('n', 'ry', [[RestNvimPreview]], { noremap = false, silent = true }) +vim.keymap.set('n', 'ri', [[RestNvimLast]], { noremap = false, silent = true }) diff --git a/lua/plugins/winshift-nvim.lua b/lua/plugins/winshift-nvim.lua new file mode 100644 index 0000000..16cae99 --- /dev/null +++ b/lua/plugins/winshift-nvim.lua @@ -0,0 +1,11 @@ +require('winshift').setup() + +vim.keymap.set('n', '', [[WinShift]], { noremap = true, silent = true }) +vim.keymap.set('n', 'm', [[WinShift]], { noremap = true, silent = true }) + +vim.keymap.set('n', 'X', [[WinShift swap]], { noremap = true, silent = true }) + +vim.keymap.set('n', '', [[WinShift left]], { noremap = true, silent = true }) +vim.keymap.set('n', '', [[WinShift down]], { noremap = true, silent = true }) +vim.keymap.set('n', '', [[WinShift up]], { noremap = true, silent = true }) +vim.keymap.set('n', '', [[WinShift right]], { noremap = true, silent = true })