uga-rosa / cmp-dictionary

A dictionary completion source for nvim-cmp
MIT License
236 stars 16 forks source link

fix(utils): format job.new's result to a string #62

Closed BerkeleyTrue closed 5 months ago

BerkeleyTrue commented 5 months ago

job.new returns an array of strings (stdout from the command), but cmp expects a string, or a table of value: string, and kind: string. This pr changes the output of utils.system to match expected input of cmp.

closes #61

uga-rosa commented 5 months ago

This fix is wrong. vim.system() returns a string, but plenary.Job returns a string[], so util.system(), which is fullfill, should return a string[]. In fact, there is one more place where util.system() is called, where it expects a string[]. I have fixed it correctly on my end and will close this PR.