Skip to content

Commit 1cbcb01

Browse files
committed
work on better startup
1 parent b64db43 commit 1cbcb01

19 files changed

Lines changed: 101 additions & 1086 deletions

xdg_config/nvim/after/plugin/cmp_gh_source.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
local Job = require "plenary.job"
1+
local ok, Job = pcall(require, "plenary.job")
2+
if not ok then
3+
return
4+
end
25

36
local source = {}
47

xdg_config/nvim/after/plugin/comments.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
if not pcall(require, "Comment") then
2+
return
3+
end
4+
15
require("Comment").setup {
26

37
-- LHS of operator-pending mapping in NORMAL + VISUAL mode

xdg_config/nvim/after/plugin/completion.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ vim.api.nvim_set_keymap(
2020
{ noremap = true }
2121
)
2222

23-
local lspkind = require "lspkind"
23+
local ok, lspkind = pcall(require, "lspkind")
24+
if not ok then
25+
return
26+
end
27+
2428
lspkind.init()
2529

2630
local cmp = require "cmp"

xdg_config/nvim/after/plugin/lsiftyped.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
local Job = require "plenary.job"
1+
local ok, Job = pcall(require, "plenary.job")
2+
if not ok then
3+
return
4+
end
25

36
local group = vim.api.nvim_create_augroup("LsifTyped", { clear = true })
47
vim.api.nvim_create_autocmd("BufReadCmd", {

xdg_config/nvim/after/plugin/luasnip.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
if vim.g.snippets ~= "luasnip" then
1+
if vim.g.snippets ~= "luasnip" or not pcall(require, "luasnip") then
22
return
33
end
44

xdg_config/nvim/after/plugin/neorg.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
if not pcall(require, "neorg") then
2+
return
3+
end
4+
15
require("neorg").setup {
26
-- Tell Neorg what modules to load
37
load = {

xdg_config/nvim/after/plugin/notify.lua

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
-- Automatically opening the UI is deprecated.
2-
-- You can replicate previous behaviour by adding the following to your config
3-
4-
-- local dap, dapui = require('dap'), require('dapui')
5-
-- dap.listeners.after.event_initialized['dapui_config'] = function() dapui.open() end
6-
-- dap.listeners.before.event_terminated['dapui_config'] = function() dapui.close() end
7-
-- dap.listeners.before.event_exited['dapui_config'] = function() dapui.close() end
8-
9-
-- To hide this message, remove the `open_on_start` settings from your config
1+
if not pcall(require, "plenary") then
2+
return
3+
end
104

115
local log = require("plenary.log").new {
126
plugin = "notify",
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
if not pcall(require, "octo") then
2+
return
3+
end
4+
15
require("octo").setup {}

xdg_config/nvim/after/plugin/statusline.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
-- TODO: Need to add those sweet sweet lsp workspace diagnostic counts
2+
if not pcall(require, "el") then
3+
-- TODO: Add in a nice default statusline here.
4+
-- Would be good to research anyway for the course
5+
return
6+
end
27

38
RELOAD "el"
49
require("el").reset_windows()

xdg_config/nvim/after/plugin/zen.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
if not pcall(require, "zen-mode") then
2+
return
3+
end
4+
15
require("zen-mode").setup {
26
window = {
37
backdrop = 0.999,

0 commit comments

Comments
 (0)