Skip to content

Commit

Permalink
patch 9.1.0424: filetype: slint files are not recognized
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ribru17 authored and chrisbra committed May 20, 2024
1 parent f295050 commit aa3104b
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions runtime/filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
15 changes: 15 additions & 0 deletions runtime/ftplugin/slint.vim
Original file line number Diff line number Diff line change
@@ -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<'
1 change: 1 addition & 0 deletions src/testdir/test_filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ def s:GetFilenameChecks(): dict<list<string>>
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'],
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
424,
/**/
423,
/**/
Expand Down

0 comments on commit aa3104b

Please sign in to comment.