fix(coc): Fix COC installed check

Fixes #70
This commit is contained in:
simrat39
2021-10-06 14:22:18 -07:00
parent 6c97da274f
commit a1bbef84b7

View File

@@ -1,12 +1,9 @@
-- local config = require('symbols-outline.config')
local M = {} local M = {}
-- probably change this
function M.should_use_provider(_) function M.should_use_provider(_)
local coc_installed = vim.fn.exists("*CocActionAsync") local coc_installed = vim.fn.exists("*CocActionAsync")
if not coc_installed then return end if coc_installed == 0 then return end
local coc_attached = vim.fn.call('CocAction', {'ensureDocument'}) local coc_attached = vim.fn.call('CocAction', {'ensureDocument'})
local has_symbols = vim.fn.call('CocHasProvider', {'documentSymbol'}) local has_symbols = vim.fn.call('CocHasProvider', {'documentSymbol'})