Explorar el Código

Prevent startup errors on first run (#645)

rob hace 4 años
padre
commit
1ed7392534

+ 4 - 0
lua/lsp/emmet-ls.lua

@@ -1,3 +1,7 @@
+if not package.loaded['lspconfig'] then
+  return
+end
+
 local nvim_lsp = require'lspconfig'
 local configs = require'lspconfig/configs'
 local capabilities = vim.lsp.protocol.make_client_capabilities()

+ 4 - 0
lua/lv-autopairs/init.lua

@@ -1,3 +1,7 @@
+if not package.loaded['nvim-autopairs'] then
+  return
+end
+
 local npairs = require('nvim-autopairs')
 local Rule = require('nvim-autopairs.rule')
 

+ 4 - 0
lua/lv-compe/init.lua

@@ -1,3 +1,7 @@
+if not package.loaded['compe'] then
+  return
+end
+
 local M = {}
 
 M.config = function()

+ 4 - 0
lua/lv-galaxyline/init.lua

@@ -1,3 +1,7 @@
+if not package.loaded['galaxyline'] then
+  return
+end
+
 local gl = require('galaxyline')
 -- get my theme in galaxyline repo
 -- local colors = require('galaxyline.theme').default

+ 4 - 0
lua/lv-nvimtree/init.lua

@@ -1,3 +1,7 @@
+if not package.loaded['nvim-tree.view'] then
+  return
+end
+
 local M = {}
 
 M.config = function()

+ 4 - 0
lua/lv-treesitter/init.lua

@@ -1,3 +1,7 @@
+if not package.loaded['nvim-treesitter'] then
+  return
+end
+
 require'nvim-treesitter.configs'.setup {
     ensure_installed = O.treesitter.ensure_installed, -- one of "all", "maintained" (parsers with maintainers), or a list of languages
     ignore_install = O.treesitter.ignore_install,

+ 4 - 0
lua/lv-which-key/init.lua

@@ -1,3 +1,7 @@
+if not package.loaded['which-key'] then
+  return
+end
+
 require("which-key").setup {
     plugins = {
         marks = true, -- shows a list of your marks on ' and `