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 if
as conditionals#await
,/await
,:catch
,:then
,@html
as keywords#each
,/each
as 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_preprocessors
variable - 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 here. Navigate to an article, then pick the Feature on menu button