[Refactor] Clean-up redundant module-load checks (#1011)

This commit is contained in:
kylo252 2021-08-15 17:38:47 +02:00 committed by GitHub
parent f36fd1907f
commit 6eb75c5678
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 15 additions and 57 deletions

View file

@ -131,15 +131,9 @@ return {
"terrortylor/nvim-comment",
event = "BufRead",
config = function()
local status_ok, nvim_comment = pcall(require, "nvim_comment")
if not status_ok then
local Log = require "core.log"
Log:get_default().error "Failed to load nvim-comment"
return
end
nvim_comment.setup()
require("nvim_comment").setup()
if lvim.builtin.comment.on_config_done then
lvim.builtin.comment.on_config_done(nvim_comment)
lvim.builtin.comment.on_config_done(require "nvim_comment")
end
end,
},