vim-svelte
- Provides Vim syntax highlighting and indentation specifically for Svelte 3 components
- Enhances standard HTML highlighting with Svelte-specific features:
- Highlights HTML attributes with colons (e.g.,
on:click,transition:fade) - Special syntax for Svelte logic blocks:
#if,/if,:else,:else ifas conditionals#await,/await,:catch,:then,@htmlas keywords#each,/eachas repeat blocks
- Highlights HTML attributes with colons (e.g.,
Dependencies:
- Requires pangloss/vim-javascript (for JavaScript syntax) and othree/html5.vim (for HTML indent)
- Included in sheerun/vim-polyglot if already using that plugin
Preprocessed Language Support:
- Supports additional languages in
<script>and<style>tags when enabled:- TypeScript, Less, SCSS, Sass, Stylus
- Configure via
g:svelte_preprocessorsvariable - Custom preprocessors can be added using
g:svelte_preprocessor_tags
Key Features:
- Configurable indentation for
<script>and<style>tags - Integration with popular Vim tools:
- Works with ALE for linting
- Compatible with matchit.vim for tag navigation
- Supports Syntastic for HTML/JavaScript checking
Target Audience: Vim users working with Svelte components who want enhanced syntax highlighting and editor support.
vimneovimpluginsveltesveltejs
Author
Featured Stories
No featured articles.