diff --git a/lua/care/sources.lua b/lua/care/sources.lua index 053ca75..b30b965 100644 --- a/lua/care/sources.lua +++ b/lua/care/sources.lua @@ -79,7 +79,7 @@ function care_sources.complete(context, source, callback) triggerKind = 1, } end - if source.incomplete and not context.reason == 3 then + if source.incomplete and context.reason ~= 3 then completion_context = { triggerKind = 3, } diff --git a/lua/care/sources/path.lua b/lua/care/sources/path.lua index 4514ebb..6683ef2 100644 --- a/lua/care/sources/path.lua +++ b/lua/care/sources/path.lua @@ -69,7 +69,7 @@ end local function get_candidates(dirname, options, callback) local fs, err = vim.uv.fs_scandir(dirname) - if err then + if err or not fs then return callback(err, nil) end