robin/laufey

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

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

master
1.4 KiB46 linesraw
1" Vim filetype plugin file
2" Language:	meson
3" License:	VIM License
4" Maintainer:   Liam Beguin <liambeguin@gmail.com>
5" Original Author:	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
6" Last Change:		2018 Nov 27
7"			2024 Jan 14 by Vim Project (browsefilter)
8"			2026 Jun 27 by Vim Project (normalize recommended style guard)
9
10if exists("b:did_ftplugin") | finish | endif
11let b:did_ftplugin = 1
12let s:keepcpo= &cpo
13set cpo&vim
14
15setlocal commentstring=#\ %s
16setlocal comments=:#
17setlocal formatoptions+=croql formatoptions-=t
18
19let b:undo_ftplugin = "setl com< cms< fo<"
20
21if get(g:, 'meson_recommended_style',
22      \ get(g:, 'filetype_recommended_style', 1))
23  setlocal expandtab
24  setlocal shiftwidth=2
25  setlocal softtabstop=2
26  let b:undo_ftplugin .= " | setl et< sts< sw<"
27endif
28
29if exists("loaded_matchit") && !exists("b:match_words")
30  let b:match_words = '\<if\>:\<elif\>:\<else\>:\<endif\>,' .
31	\             '\<foreach\>:\<break\>:\<continue\>:\<endforeach\>'
32  let b:undo_ftplugin .= " | unlet! b:match_words"
33endif
34
35if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
36  let b:browsefilter = "Meson Build Files (meson.build)\tmeson.build\n"
37  if has("win32")
38    let b:browsefilter .= "All Files (*.*)\t*\n"
39  else
40    let b:browsefilter .= "All Files (*)\t*\n"
41  endif
42  let b:undo_ftplugin .= " | unlet! b:browsefilter"
43endif
44
45let &cpo = s:keepcpo
46unlet s:keepcpo