jacoborus / estilo

Create color schemes for Vim, Airline and Lightline

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YAMLException when vim swp file is present

jasonphillipcarpenter opened this issue · comments

During a render, the following exception is thrown if estilo/palette/<colorscheme>.yml is open in vim and vim creates a estilo/palette/<colorscheme>.yml.swp file.

$> estilo render

/usr/lib/node_modules/estilo/node_modules/js-yaml/lib/js-yaml/loader.js:171
  throw generateError(state, message);
  ^
YAMLException: end of the stream or a document separator is expected at line 1, column 10:
    b0VIM 8.1
             ^
    at generateError (/usr/lib/node_modules/estilo/node_modules/js-yaml/lib/js-yaml/loader.js:165:10)
    at throwError (/usr/lib/node_modules/estilo/node_modules/js-yaml/lib/js-yaml/loader.js:171:9)
    at readDocument (/usr/lib/node_modules/estilo/node_modules/js-yaml/lib/js-yaml/loader.js:1512:5)
    at loadDocuments (/usr/lib/node_modules/estilo/node_modules/js-yaml/lib/js-yaml/loader.js:1548:5)
    at load (/usr/lib/node_modules/estilo/node_modules/js-yaml/lib/js-yaml/loader.js:1569:19)
    at Object.safeLoad (/usr/lib/node_modules/estilo/node_modules/js-yaml/lib/js-yaml/loader.js:1591:10)
    at names.forEach.n (/usr/lib/node_modules/estilo/src/load-project.js:122:42)
    at Array.forEach (<anonymous>)
    at fs.readdir (/usr/lib/node_modules/estilo/src/load-project.js:119:15)
    at FSReqWrap.oncomplete (fs.js:135:15)

This may occur when other files are opened but I am still investigating this.

Tested with estilo version 1.3.3

Fixed in 2.0