leafOfTree
bbe547e7dd
Fix E409 when css syntax isn't loaded
...
The v-bind() region in style contains cssValue.* groups, which don't
exist without css syntax, like when syntax in the config has only
script. Opening a file then showed E409 and E475. Add the style
highlights only if css syntax is loaded.
2026-10-21 12:12:18 +00:00
leafOfTree
ee1a608c40
Remove logo height in README
...
test / test (push) Canceled after 0s
GitHub shows a background with rounded corners for images with both
width and height, so the transparent logo had a box behind it.
2026-10-20 01:31:33 +00:00
leaf
ddf4a96bdb
Merge pull request #41 from leafOfTree/fix-sync-and-tests
...
Fix syntax sync and end tag, highlight <script setup> macros, add tests
2026-10-20 09:22:22 +08:00
leafOfTree
68b866210b
Test all features
...
test / test (push) Canceled after 0s
Add cases for attribute highlight on and off, block syntax by lang
and emmet-vim group names, OnChangeVueSyntax(), matchit, .wpy,
initial_indent as syntax and tag.syntax, and syntax after reloading.
Also check indenting a file after removing all indent with
g:test_flatten, which fails before the end tag fix as closing tags at
column 0 were taken as block end tags.
2026-10-20 01:21:17 +00:00
leafOfTree
2ed782e422
Sync syntax from start
...
Syncing by block start patterns didn't restore states inside the
block, so syntax computed before a line was displayed, e.g. by
GetVueTag() or indent after jumping in a file, missed regions like a
multi-line css rule. This replaces the one-line block fix in the
previous commit.
Parsing from start takes ~190ms once for jumping to the end of a
6500-line file, and states are cached after that.
2026-10-20 01:18:18 +00:00
leafOfTree
de812d609b
Add tests and GitHub Actions
...
Replace the Travis tests, which used a separate repo and no longer
ran, with tests in this repo. Each case in test/cases is indented as
a whole and should be unchanged, with optional syntax, fold and tag
checks. The cases are from the previous tests, plus script-setup.vue
for <script setup> keywords and a sync check in oneline.vim.
test/run.sh runs the cases with Vim in a pseudo terminal, as syntax in
Ex mode isn't the same, and Neovim headless.
2026-10-19 14:20:24 +00:00
leafOfTree
d87fbbdde4
Use rtp^= for manual installation in README
...
Vim 9 and Neovim have placeholder vue syntax and indent files, which
load html ones and take precedence over this plugin added by rtp+=.
2026-10-19 13:43:15 +00:00
leafOfTree
b899ab9d54
Highlight Vue 3.3+ APIs and <script setup> macros ( #24 )
...
Add the APIs from https://vuejs.org/api/ that were missing, like
defineProps, defineEmits, defineModel, withDefaults, useTemplateRef
and toValue, and the options emits, expose, slots and serverPrefetch.
Also highlight them before type arguments, e.g.
defineProps<{ foo: string }>() or ref<number>(1).
2026-10-19 13:43:00 +00:00
leafOfTree
e0de1005bf
Get block tag of the end tag line
...
GetVueTag() returned '' on the end tag line like </template>, as the
check for blank lines after a block also applied to the end tag line
itself.
2026-10-19 13:42:16 +00:00
leafOfTree
1e6923dcd2
Don't sync syntax to a block ending on the same line
...
A one-line block like <style>p { color: red; }</style> matched the
sync pattern of the block start, so when Vim synced syntax at or after
it, e.g. after jumping to a later line, the following blocks were
taken as inside the style block.
2026-10-19 13:42:16 +00:00
leafOfTree
04c3fb20ed
Load all tags after syntax instead of only style
2023-10-05 11:51:45 +08:00
leafOfTree
58ac69b2c8
Update doc
2023-02-02 12:33:31 +08:00
leafOfTree
4d31393b03
Remove timer usage
2023-01-31 17:29:23 +08:00
leafOfTree
8d75429260
Fix syntax lost issue when using netrw :Vexplore
2023-01-31 15:31:52 +08:00
leafOfTree
ed318345cf
Simplify html syntax commands
2023-01-31 15:17:32 +08:00
leafOfTree
84ac1d2359
Highlight <script...> as htmlTagName instead of htmlSpecialTagName from built-in syntax
2022-10-11 14:16:21 +08:00
leafOfTree
4da7d448ae
Fix GetVueTag for blank lines between blocks
2022-06-15 14:22:54 +08:00
leafOfTree
ac76f21419
Update doc
2022-06-15 11:59:05 +08:00
leafOfTree
be0f84ebb5
Update doc
2022-06-15 11:41:42 +08:00
leafOfTree
3b90ccad2d
Update
2022-06-15 11:32:33 +08:00
leafOfTree
b2bb4dd8f6
Fix miniprogram syntax containing blank
2022-03-03 15:27:17 +08:00
leafOfTree
b4c9fdc87a
Update doc
2022-02-21 16:25:10 +08:00
leafOfTree
6569315461
Update doc
2022-02-21 16:24:09 +08:00
leafOfTree
5977fc07fe
Update doc
2022-02-21 16:23:04 +08:00
leafOfTree
a8decb75b1
Remove fold timer to support makeview/loadview
2021-11-05 17:50:11 +08:00
leafOfTree
469c43292d
Fix syntax error for directives without value
2021-11-05 17:50:11 +08:00
leafOfTree
dd0e3145af
Update doc
2021-09-12 10:47:58 +08:00
leafOfTree
a5be3e6c3a
Update doc
2021-09-12 10:46:44 +08:00
leafOfTree
7f4c259d27
Fix fold level of blank lines in <script>
2021-09-10 13:20:12 +08:00
leafOfTree
8e121ce67d
Update doc
2021-09-10 12:03:57 +08:00
leafOfTree
6678475a50
Update doc
2021-09-06 16:08:55 +08:00
leafOfTree
0432e150dc
Update doc
2021-09-06 16:07:32 +08:00
leafOfTree
15143762b8
Update doc
2021-09-06 15:58:31 +08:00
leafOfTree
3fa4bea6df
Fix keyword error from containedin pattern
2021-08-13 19:05:46 +08:00
leafOfTree
c248bd1488
Load syntax and then set syntax to fix syntax sync
2021-08-13 16:56:22 +08:00
leafOfTree
6e25aaf388
Fix syntax sync being cleared issue
2021-08-13 16:47:13 +08:00
leafOfTree
8d464e9506
Support vue3 API keywords
2021-08-13 16:29:57 +08:00
leafOfTree
ab96ba2585
Support global api syntax
2021-08-13 13:08:06 +08:00
leafOfTree
4dd559c860
Support vue3 composition api
2021-08-13 12:50:34 +08:00
leafOfTree
d15590dae2
Format code
2021-08-11 18:35:52 +08:00
leafOfTree
eb3bba0ccb
Support style v-bind syntax
2021-08-11 18:32:10 +08:00
leafOfTree
e4ddccee90
Update doc
2021-08-05 16:37:20 +08:00
leafOfTree
0e68102487
Improve multiple line tag syntax and custom tag indent
2021-08-04 11:14:15 +08:00
leafOfTree
44b0071e2d
Add custom tags
2021-08-02 15:02:30 +08:00
leafOfTree
3d2680a859
Support view block
2021-07-30 14:41:13 +08:00
leafOfTree
cda82484d2
Update doc
2021-06-15 12:30:38 +08:00
leafOfTree
0e341ab4f8
Simplify example config
2021-06-15 12:29:47 +08:00
leafOfTree
a5882eb712
Update doc
2021-06-05 16:02:34 +08:00
leafOfTree
568b571849
Update doc
2021-06-05 16:00:32 +08:00
leafOfTree
b2b08cda9d
Improve oneline block syntax
2021-06-02 13:51:42 +08:00
leafOfTree
c43bd87267
Support oneline block
2021-06-02 13:20:40 +08:00
leafOfTree
98e22f2af4
Rename function name for clearer meaning
2021-05-20 11:47:17 +08:00
leafOfTree
43490363a5
Update doc
2021-05-19 11:20:04 +08:00
leafOfTree
50ea0b7bce
Update CI config
2021-05-18 16:07:16 +08:00
leafOfTree
696533d262
Update doc
2021-05-12 19:09:04 +08:00
leafOfTree
9ae107ea6f
Fix script fold issue
2021-05-10 14:02:08 +08:00
leafOfTree
b8cbd66359
Use user's option when setting
2021-05-10 13:25:38 +08:00
leafOfTree
0f4b6b7b7e
Update doc
2021-05-05 21:03:48 +08:00
leafOfTree
12e5eadbad
Update doc
2021-05-05 20:59:04 +08:00
leafOfTree
617639320d
Update doc
2021-05-05 20:57:51 +08:00
leafOfTree
511fb2fb82
Update doc
2021-05-05 20:56:59 +08:00
leafOfTree
b8f8a45e44
Update doc
2021-05-05 20:54:48 +08:00
leafOfTree
32b89ad2bf
Update doc
2021-04-26 16:03:04 +08:00
leafOfTree
9e642cc983
Update doc
2021-04-23 13:21:43 +08:00
leafOfTree
8a913af7a6
setlocal foldenable to default value (on)
2021-04-23 13:06:51 +08:00
leafOfTree
9e55939c89
Rename subtype to syntax
2021-04-23 12:49:55 +08:00
leafOfTree
5067a5cc25
Update doc
2021-04-19 18:59:32 +08:00
leafOfTree
c4847c18e9
Update doc
2021-04-19 14:20:56 +08:00
leafOfTree
d080255fce
Fix foldexpr
2021-04-19 14:20:37 +08:00
leafOfTree
8f23970cf9
Update doc
2021-04-19 09:50:11 +08:00
leafOfTree
d8a5c1486b
Update doc
2021-04-19 09:39:44 +08:00
leafOfTree
8f0d26991a
Update doc
2021-04-19 09:36:57 +08:00
leafOfTree
2a682014a3
Update doc
2021-04-16 16:22:57 +08:00
leafOfTree
483e45e198
Change options order
2021-04-16 16:22:51 +08:00
leafOfTree
f1b7ea05b8
Backwards compatibility with init_indent
2021-04-16 14:46:11 +08:00
leafOfTree
6a94c30ec7
Add new 'initial indent' option
2021-04-16 13:33:56 +08:00
leafOfTree
87922641ad
Fix various indent issues
2021-04-15 18:49:29 +08:00
leafOfTree
3ed1e89f55
Defer indent load time
2021-04-15 13:10:22 +08:00
leafOfTree
ed7e1a9898
Use runtime typescript indent for javascript
2021-04-14 22:50:37 +08:00
leafOfTree
c71f55019b
Fix Vim built-in javascript indent on closing parenthesis
2021-04-14 12:01:33 +08:00
leafOfTree
5be2325222
Fix Vim built-in javascript indent
2021-04-14 11:44:14 +08:00
leafOfTree
dcbdcbea37
Support full_syntax to be list or string
2021-04-14 11:27:35 +08:00
leafOfTree
26002b6212
Allow empty syntax list
2021-04-14 10:53:03 +08:00
leafOfTree
8d3c18621d
Set syntax sync by each block syntax
2021-04-14 10:51:25 +08:00
leafOfTree
255472b126
Comment out syn sync fromstart for now
2021-04-13 15:53:48 +08:00
leafOfTree
f437eea49d
Update doc
2021-04-13 15:53:27 +08:00
leafOfTree
f460616735
Add patch for mustache syntax from vim-mustache-handlebars
2021-04-13 15:06:55 +08:00
leafOfTree
8e6080629b
Enable syntax sync fromstart
2021-04-13 15:05:37 +08:00
leafOfTree
99f317066a
Update doc
2021-04-12 14:11:51 +08:00
leafOfTree
74a917987e
Update doc
2021-04-12 12:06:50 +08:00
leafOfTree
6da176f51e
Update doc
2021-04-12 11:57:02 +08:00
leafOfTree
c70cd332ad
Support template string in vue attr
2021-04-08 18:50:15 +08:00
leafOfTree
15914af39b
Update doc
2021-04-06 13:39:54 +08:00
leafOfTree
f50130155e
Update doc
2021-04-06 13:37:10 +08:00
leafOfTree
59e9825606
Fix foldexpr on config and custom blocks
2021-04-06 13:37:00 +08:00
leafOfTree
11c04aaf7b
Fix no highlight after loading session
2021-04-01 10:33:38 +08:00
leafOfTree
537af6139f
Add nvim to test
2021-04-01 09:59:42 +08:00
leafOfTree
b617e1e110
Fix indent for blocks in template
2021-03-31 18:37:28 +08:00
leafOfTree
01e460244f
Fix syntax of template blocks inside template
2021-03-31 17:48:22 +08:00
leafOfTree
b601b25226
Update doc
2021-03-30 14:22:14 +08:00