From aa3104b07a3e5e7cc41310f1fbfb00f71ef801a2 Mon Sep 17 00:00:00 2001 From: Riley Bruins Date: Mon, 20 May 2024 14:20:09 +0200 Subject: patch 9.1.0424: filetype: slint files are not recognized Problem: filetype: slint files are not recognized Solution: Detect '*.slint' files as slint filetype, include basic sling filetype plugin (Riley Bruins) closes: #14808 Signed-off-by: Riley Bruins Signed-off-by: Christian Brabandt --- runtime/filetype.vim | 3 +++ runtime/ftplugin/slint.vim | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 runtime/ftplugin/slint.vim (limited to 'runtime') diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 35c9e20313..b52a4c6612 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -2060,6 +2060,9 @@ au BufNewFile,BufRead *.scala setf scala " SBT - Scala Build Tool au BufNewFile,BufRead *.sbt setf sbt +" Slint +au BufNewFile,BufRead *.slint setf slint + " SuperCollider au BufNewFile,BufRead *.sc call dist#ft#FTsc() diff --git a/runtime/ftplugin/slint.vim b/runtime/ftplugin/slint.vim new file mode 100644 index 0000000000..ac8057f39d --- /dev/null +++ b/runtime/ftplugin/slint.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin +" Language: slint +" Maintainer: Riley Bruins +" Last Change: 2024 May 19 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +" Set 'comments' to format dashed lists in comments. +" Also include ///, used for Doxygen. +setl comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,:// commentstring=//\ %s + +let b:undo_ftplugin = 'setl com< cms<' -- cgit v1.2.3