Hi, after searching I saw other issues causing this error string, caused by syntax errors or incomplete expressions passed to the engine. I'm observing it when saving a css file.
I have installed prettier with Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
I have configured prettier with:
augroup js
autocmd BufWritePre *.js,*.jsx,*.mjs,*.ts,*.tsx,*.css,*.less,*.scss,*.json,*.graphql,*.md,*.vue PrettierAsync
au FileType js,html nmap <Leader>d :TernDef<CR>
au FileType js,html nmap <Leader>r :TernRename<CR>
let g:prettier#autoformat = 0
let g:prettier#config#single_quote = 'false'
let g:prettier#config#print_width = 120
let g:prettier#config#parser = 'babylon'
augroup END
The file I'm saving, foo.css:
label {
display: block;
}
input[type="text"] {
margin-bottom: 0.5em;
}
nav {
background-color: LightCyan;
padding: 1em;
}
#mevents {
background-color:LightGoldenRodYellow;
overflow:auto;
}
.grid {
display: grid;
box-sizing: border-box;
width: 100vw;
height: 100vh;
grid-template-columns: 1fr 3fr;
grid-gap: 1px;
background-color: grey;
}
.left {
grid-column-start: 1;
}
.right {
grid-column-start: 2;
}
:messages shows "Prettier: failed to parse buffer."
Should Prettier succeed in parsing/formatting this CSS file?
Hi, after searching I saw other issues causing this error string, caused by syntax errors or incomplete expressions passed to the engine. I'm observing it when saving a css file.
I have installed prettier with
Plug 'prettier/vim-prettier', { 'do': 'yarn install' }I have configured prettier with:
The file I'm saving,
foo.css::messagesshows "Prettier: failed to parse buffer."Should Prettier succeed in parsing/formatting this CSS file?