clone https://github.com/revoltez/vimSvelte my-project
cd my-project
npm i
If you are using vite or svelteKit, rename prettier.config.js
to prettier.config.cjs
Add prettier prettier-plugin-svelte
with your favorite package manager (npm or yarn)
ex: npm i -D prettier prettier-plugin-svelte
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'prettier/vim-prettier'
// syntax highlighting for lots of languages
Plug 'sheerun/vim-polyglot'
Plug 'codechips/coc-svelte', {'do': 'npm install'}
Plug 'evanleck/vim-svelte'
let g:coc_global_extensions = ['coc-json', 'coc-eslint', 'coc-tsserver']
autocmd BufWritePre *.svelte,*.js,*.jsx,*.html,*.mjs,*.ts,*.tsx,*.json,*.graphql,*.md,*.yaml, PrettierAsync