From f6e377fcfed932b71456a0b0780c1f5ed22cabd4 Mon Sep 17 00:00:00 2001 From: Jonathan Raines Date: Tue, 6 Jul 2021 12:40:10 -0500 Subject: Replace LazyGit Plugin with FTerm Instance (#717) * Replace LazyGit Plugin with FTerm Instance * Added gg keybind to FTerm LazyGit * Added check to see if lazygit is installed * Changed lazyload event to prevent error when called from dashboard on startup * Removed lazygit plugin. Changed Fterm lazy loading * Made the executable check more universal for when we include other terminal applications Co-authored-by: rebuilt --- lua/plugins.lua | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'lua/plugins.lua') diff --git a/lua/plugins.lua b/lua/plugins.lua index 69542b94..50f96517 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -217,12 +217,9 @@ return require("packer").startup(function(use) -- Floating terminal use { "numToStr/FTerm.nvim", - event = "BufRead", + event = "BufWinEnter", config = function() - require("FTerm").setup { - dimensions = { height = 0.8, width = 0.8, x = 0.5, y = 0.5 }, - border = "single", -- or 'double' - } + require('lv-floatterm').config() end, disable = not O.plugin.floatterm.active, } @@ -249,13 +246,6 @@ return require("packer").startup(function(use) disable = not O.plugin.sanegx.active, } - -- Lazygit - use { - "kdheepak/lazygit.nvim", - cmd = "LazyGit", - disable = not O.plugin.lazygit.active, - } - -- Diffview use { "sindrets/diffview.nvim", -- cgit v1.2.3 From 0e2ad0c1fec50a24177129c89b3edb9007776caf Mon Sep 17 00:00:00 2001 From: christianchiarulli Date: Tue, 6 Jul 2021 19:15:37 -0400 Subject: testing autosave config poetnetially unstable --- lua/plugins.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'lua/plugins.lua') diff --git a/lua/plugins.lua b/lua/plugins.lua index 50f96517..33efdf05 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -202,14 +202,18 @@ return require("packer").startup(function(use) use { "mfussenegger/nvim-dap", config = function() - require "dap" + local status_ok, dap = pcall(require, "dap") + if not status_ok then + return + end + -- require "dap" vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "LspDiagnosticsSignError", linehl = "", numhl = "", }) - require("dap").defaults.fallback.terminal_win_cmd = "50vsplit new" + dap.defaults.fallback.terminal_win_cmd = "50vsplit new" end, disable = not O.plugin.debug.active, } @@ -219,7 +223,7 @@ return require("packer").startup(function(use) "numToStr/FTerm.nvim", event = "BufWinEnter", config = function() - require('lv-floatterm').config() + require("lv-floatterm").config() end, disable = not O.plugin.floatterm.active, } @@ -235,7 +239,9 @@ return require("packer").startup(function(use) use { "nvim-telescope/telescope-project.nvim", event = "BufRead", - setup = function () vim.cmd[[packadd telescope.nvim]] end, + setup = function() + vim.cmd [[packadd telescope.nvim]] + end, disable = not O.plugin.telescope_project.active, } -- cgit v1.2.3 From 716f127e95b71bdc1f1ebb960b381ba50b10c1fe Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 6 Jul 2021 20:42:29 -0400 Subject: wrap requires in pcall --- lua/plugins.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lua/plugins.lua') diff --git a/lua/plugins.lua b/lua/plugins.lua index 33efdf05..22132956 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -94,7 +94,11 @@ return require("packer").startup(function(use) "terrortylor/nvim-comment", cmd = "CommentToggle", config = function() - require("nvim_comment").setup() + local status_ok, nvim_comment = pcall(require, "nvim_comment") + if not status_ok then + return + end + nvim_comment.setup() end, } @@ -145,8 +149,8 @@ return require("packer").startup(function(use) "norcalli/nvim-colorizer.lua", event = "BufRead", config = function() - require("colorizer").setup() - vim.cmd "ColorizerReloadAllBuffers" + require "lv-colorizer" + -- vim.cmd "ColorizerReloadAllBuffers" end, disable = not O.plugin.colorizer.active, } -- cgit v1.2.3 From 00bf949fe8ee51d49650356e9a68cfe068e400e1 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 6 Jul 2021 21:42:26 -0400 Subject: custom whichkey entries --- lua/plugins.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/plugins.lua') diff --git a/lua/plugins.lua b/lua/plugins.lua index 22132956..0c138d32 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -355,7 +355,7 @@ return require("packer").startup(function(use) disable = not O.plugin.ts_hintobjects.active, } - for _, plugin in pairs(O.custom_plugins) do + for _, plugin in pairs(O.user_plugins) do packer.use(plugin) end end) -- cgit v1.2.3