Repository navigation
Add g:vim_svelte_plugin_config for syntax of blocks - #32
Merged
Merged
Conversation
Like vim-vue-plugin, set syntax of <script>, <style> and <template lang="..."> blocks by g:vim_svelte_plugin_config, with full_syntax, initial_indent, attribute, foldexpr, open_devdocs and debug. Blocks, syntax loading and indent are by the config instead of code for each language, so any syntax like postcss can be used by lang="...". Previous g:vim_svelte_plugin_* variables still work as the default of the config, whose options take precedence. The syntax at each line and indent of existing test cases are unchanged. Blocks of pug, coffee, sass and stylus not enabled now keep indent, instead of errors from their indent functions not loaded, which removed all indent. A syntax not found in Vim like stylus is loaded from plugins.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on
svelte-fixes, please merge that first.Like vim-vue-plugin, set syntax of
<script>,<style>and<template lang="...">blocks byg:vim_svelte_plugin_config, the recommended configuration, withfull_syntax,initial_indent,attribute,foldexpr,open_devdocsanddebug. Any syntax like postcss can be used bylang="...".Compatibility:
g:vim_svelte_plugin_*variables still work as the default of the config, whose options take precedence.use_stylus, is loaded from plugins, as onlyload_full_syntaxdid before.Tests:
config,config-override,custom-lang,lang-not-enabled.