Skip to content

Commit c6f9e5b

Browse files
mracossheerun
andauthored
Add mermaid (#721)
Co-authored-by: Adam Stankiewicz <[email protected]>
1 parent 3e71cda commit c6f9e5b

File tree

5 files changed

+29
-3
lines changed

5 files changed

+29
-3
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A collection of language packs for Vim.
77
> One to rule them all, one to find them, one to bring them all and in the darkness bind them.
88
99
- It **won't affect your startup time**, as scripts are loaded only on demand\*.
10-
- It **installs and updates 120+ times faster** than the <!--Package Count-->605<!--/Package Count--> packages it consists of.
10+
- It **installs and updates 120+ times faster** than the <!--Package Count-->607<!--/Package Count--> packages it consists of.
1111
- It is also more secure (scripts loaded for every filetype are generated by vim-polyglot)
1212
- Best syntax and indentation support (no other features). Hand-selected language packs.
1313
- Automatically detects indentation (includes performance-optimized version of [vim-sleuth](https://github.com/tpope/vim-sleuth), can be disabled)
@@ -129,6 +129,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
129129
- [markdown](https://github.com/plasticboy/vim-markdown) (Markdown syntax highlighting for md, markdown, mdown, mdwn, mkd, mkdn, mkdown, ronn, scd and workbook files)
130130
- [mathematica](https://github.com/voldikss/vim-mma) (Mathematica syntax highlighting for mathematica, cdf, m, ma, mt and 6 more files)
131131
- [mdx](https://github.com/jxnblk/vim-mdx-js) (Syntax highlighting for mdx files)
132+
- [mermaid](https://github.com/mracos/mermaid.vim) (Syntax highlighting for mermaid, mm and mmd files)
132133
- [meson](https://github.com/mesonbuild/meson/tree/master/data/syntax-highlighting/vim) (Meson syntax highlighting for wrap files)
133134
- [mint](https://github.com/IrenejMarc/vim-mint) (Syntax highlighting for mint files)
134135
- [moonscript](https://github.com/leafo/moonscript-vim) (MoonScript syntax highlighting for moon files)

autoload/polyglot/init.vim

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,10 @@ let did_load_filetypes = 1
169169

170170
" DO NOT EDIT CODE BELOW, IT IS GENERATED WITH MAKEFILE
171171

172+
if !has_key(g:polyglot_is_disabled, 'mermaid')
173+
au BufNewFile,BufRead *.mermaid,*.mm,*.mmd setf mermaid
174+
endif
175+
172176
if !has_key(g:polyglot_is_disabled, 'openscad')
173177
au BufNewFile,BufRead *.scad setf openscad
174178
endif
@@ -2297,6 +2301,14 @@ if !has_key(g:polyglot_is_disabled, 'icalendar')
22972301
au BufNewFile,BufRead *.ics setf icalendar
22982302
endif
22992303

2304+
if !has_key(g:polyglot_is_disabled, 'i3')
2305+
au BufNewFile,BufRead *.i3.config,*.i3config,{.,}i3.config,{.,}i3config,i3.config,i3config setf i3config
2306+
endif
2307+
2308+
if !has_key(g:polyglot_is_disabled, 'sway')
2309+
au BufNewFile,BufRead *.i3.config,*.i3config,*.sway.config,*.swayconfig,*sway/config,i3.config,sway.config setf i3config
2310+
endif
2311+
23002312
if !has_key(g:polyglot_is_disabled, 'hive')
23012313
au BufNewFile,BufRead *.hql,*.q,*.ql setf hive
23022314
endif

autoload/polyglot/sleuth.vim

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ let s:globs = {
236236
\ 'htmldjango': '*.jinja,*.j2,*.jinja2',
237237
\ 'htmlm4': '*.html.m4',
238238
\ 'httest': '*.htt,*.htb',
239+
\ 'i3config': '*.i3config,*.i3.config,*.swayconfig,*.sway.config,i3.config,sway.config,i3config,.i3.config,.i3config',
239240
\ 'hxml': '*.hxml',
240-
\ 'i3config': '*.i3config,*.i3.config,*.swayconfig,*.sway.config,i3.config,sway.config',
241241
\ 'ibasic': '*.iba,*.ibi',
242242
\ 'icalendar': '*.ics',
243243
\ 'icemenu': '',
@@ -328,6 +328,7 @@ let s:globs = {
328328
\ 'mason': '*.mason,*.mhtml,*.comp',
329329
\ 'master': '*.mas,*.master',
330330
\ 'mel': '*.mel',
331+
\ 'mermaid': '*.mermaid,*.mm,*.mmd',
331332
\ 'meson': 'meson.build,meson_options.txt',
332333
\ 'messages': '',
333334
\ 'mf': '*.mf',

packages.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5604,4 +5604,12 @@ filetypes:
56045604
- name: openscad
56055605
patterns:
56065606
- pattern: '*.scad'
5607-
description: OpenSCAD 3D modeling language
5607+
description: OpenSCAD 3D modeling language
5608+
---
5609+
name: mermaid
5610+
remote: mracos/mermaid.vim
5611+
filetypes:
5612+
- name: mermaid
5613+
patterns:
5614+
- pattern: '*.mermaid,*.mm,*.mmd'
5615+
description: Mermaid (https://mermaid-js.github.io/)

tests/filetypes.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ call TestFiletype('hxml')
121121
call TestFiletype('hss')
122122
call TestFiletype('hcl')
123123
call TestFiletype('hive')
124+
call TestFiletype('i3config')
124125
call TestFiletype('icalendar')
125126
call TestFiletype('idris')
126127
call TestFiletype('idris2')
@@ -648,6 +649,9 @@ call TestFiletype('mint')
648649
call TestFiletype('jsonc')
649650
call TestFiletype('gleam')
650651
call TestFiletype('hjson')
652+
call TestFiletype('just')
653+
call TestFiletype('nftables')
654+
call TestFiletype('mermaid')
651655
call TestFiletype('i3config')
652656
call TestFiletype('just')
653657
call TestFiletype('nftables')

0 commit comments

Comments
 (0)