robin/laufey

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

zeertzjqMerge pull request #37468 from zeertzjq/vim-d5f173ca9271f927f

master
1.1 KiB41 linesraw
1" Vim filetype plugin file
2" Language: 		SML
3" Filenames:		*.sml *.sig
4" Maintainer: 		tocariimaa <tocariimaa@firemail.cc>
5" Last Change:		2025 Nov 04
6" 2026 Jan 19 by Vim Project: add 'include' setting
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< fo< inc<'
17
18setlocal formatoptions+=croql formatoptions-=t
19setlocal commentstring=(*\ %s\ *)
20setlocal comments=sr:(*,mb:*,ex:*)
21setlocal include=^\\s*use\\>
22
23if exists('loaded_matchit')
24  let b:match_ignorecase = 0
25  let b:match_words = '\<\%(abstype\|let\|local\|sig\|struct\)\>:\<\%(in\|with\)\>:\<end\>'
26  let b:undo_ftplugin ..= ' | unlet! b:match_ignorecase b:match_words'
27endif
28
29if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
30  let b:browsefilter = "SML Source Files (*.sml)\t*.sml\n" ..
31                     \ "SML Signature Files (*.sig)\t*.sig\n"
32  if has("win32")
33    let b:browsefilter ..= "All Files (*.*)\t*\n"
34  else
35    let b:browsefilter ..= "All Files (*)\t*\n"
36  endif
37  let b:undo_ftplugin ..= " | unlet! b:browsefilter"
38endif
39
40let &cpo = s:cpo_save
41unlet s:cpo_save