nvim/plug/coc: disable loading when NodeJS is missing

Rather than just disabling configuration, we instead simply disable the
entire plugin before it loads.
This commit is contained in:
Paul Stemmet 2022-08-26 20:01:31 +00:00
parent 24aa253790
commit 03f670a9f4
Signed by: Paul Stemmet
GPG Key ID: EDEA539F594E7E75
2 changed files with 1 additions and 2 deletions

View File

@ -2,8 +2,6 @@ return function()
local fn, o, g = vim.fn, vim.opt, vim.g
local vimp, au = require 'vimp', require 'psoxizsh.autocmd'
if fn.executable('node') == 0 then return end
local t = function(s)
return vim.api.nvim_replace_termcodes(s, true, true, true)
end

View File

@ -79,6 +79,7 @@ local plugins = {
-- IDE stuff + language highlighting
{ 'neoclide/coc.nvim',
disable = vim.fn.executable('node') ~= 1,
branch = 'release',
after = 'vimp',
config = require 'psoxizsh.plugins.config.coc'