Mercurial > vim
changeset 35221:4fcec0f1e813 v9.1.0424
patch 9.1.0424: filetype: slint files are not recognized
Commit: https://github.com/vim/vim/commit/aa3104b07a3e5e7cc41310f1fbfb00f71ef801a2
Author: Riley Bruins <ribru17@hotmail.com>
Date: Mon May 20 14:20:09 2024 +0200
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 <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Mon, 20 May 2024 14:30:04 +0200 |
parents | 7e8da534b19e |
children | 70b2dad87ebc |
files | .github/MAINTAINERS runtime/filetype.vim runtime/ftplugin/slint.vim src/testdir/test_filetype.vim src/version.c |
diffstat | 5 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/.github/MAINTAINERS +++ b/.github/MAINTAINERS @@ -216,6 +216,7 @@ runtime/ftplugin/scss.vim @tpope runtime/ftplugin/sdoc.vim @gpanders runtime/ftplugin/sed.vim @dkearns runtime/ftplugin/sh.vim @dkearns +runtime/ftplugin/slint.vim @ribru17 runtime/ftplugin/solidity.vim @cothi runtime/ftplugin/solution.vim @dkearns runtime/ftplugin/spec.vim @ignatenkobrain
--- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -2060,6 +2060,9 @@ au BufNewFile,BufRead *.scala setf sca " 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()
new file mode 100644 --- /dev/null +++ b/runtime/ftplugin/slint.vim @@ -0,0 +1,15 @@ +" Vim filetype plugin +" Language: slint +" Maintainer: Riley Bruins <ribru17@gmail.com> +" 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<'
--- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -654,6 +654,7 @@ def s:GetFilenameChecks(): dict<list<str slang: ['file.sl'], sage: ['file.sage'], slice: ['file.ice'], + slint: ['file.slint'], slpconf: ['/etc/slp.conf', 'any/etc/slp.conf'], slpreg: ['/etc/slp.reg', 'any/etc/slp.reg'], slpspi: ['/etc/slp.spi', 'any/etc/slp.spi'],