robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

zeertzjqMerge pull request #40472 from zeertzjq/vim-1f337327945732ed7

master
1.2 KiB43 linesraw
1" Vim filetype plugin file
2" Language:             YAML (YAML Ain't Markup Language)
3" Previous Maintainer:  Nikolai Weibull <now@bitwi.se> (inactive)
4" Last Change:          2024 Oct 04
5" 2025 Apr 22 by Vim project re-order b:undo_ftplugin (#17179)
6" 2026 Jun 27 by Vim Project normalize recommended style guard
7
8if exists("b:did_ftplugin")
9  finish
10endif
11let b:did_ftplugin = 1
12
13let s:cpo_save = &cpo
14set cpo&vim
15
16let b:undo_ftplugin = "setl com< cms< et< fo<"
17
18setlocal comments=:# commentstring=#\ %s expandtab
19setlocal formatoptions-=t formatoptions+=croql
20
21if get(g:, 'yaml_recommended_style',
22      \ get(g:, 'filetype_recommended_style', 1))
23  let b:undo_ftplugin ..= " sw< sts<"
24  setlocal shiftwidth=2 softtabstop=2
25endif
26
27" rime input method engine(https://rime.im/)
28" uses `*.custom.yaml` as its config files
29if expand('%:r:e') ==# 'custom'
30  " `__include` command in `*.custom.yaml`
31  " see: https://github.com/rime/home/wiki/Configuration#%E5%8C%85%E5%90%AB
32  setlocal include=__include:\\s*
33  let b:undo_ftplugin ..= " inc<"
34
35  if !exists('current_compiler')
36    compiler rime_deployer
37    let b:undo_ftplugin ..= " | compiler make"
38  endif
39endif
40
41
42let &cpo = s:cpo_save
43unlet s:cpo_save