vim-patch:9.1.1468: filetype: bright(er)script files are not recognized

Problem:  filetype: bright(er)script files are not recognized
Solution: detect *.bs files as brighterscript filetype and *.brs as
          brightscript filetype, include filetype plugins (Riley Bruins)

closes: vim/vim#17566

03e5ee25fd

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
This commit is contained in:
Christian Clason
2025-06-18 18:27:47 +02:00
committed by Christian Clason
parent 2379fb053a
commit 487112d674
4 changed files with 28 additions and 0 deletions

View File

@ -0,0 +1,11 @@
" Vim filetype plugin
" Language: Brighterscript
" Maintainer: Riley Bruins <ribru17@gmail.com>
" Last Change: 2025 Jun 17
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
runtime! ftplugin/brightscript.vim

View File

@ -0,0 +1,13 @@
" Vim filetype plugin
" Language: Brightscript
" Maintainer: Riley Bruins <ribru17@gmail.com>
" Last Change: 2025 Jun 17
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setl comments=:' commentstring='\ %s
let b:undo_ftplugin = 'setl com< cms<'

View File

@ -258,6 +258,8 @@ local extension = {
bl = 'blank',
blp = 'blueprint',
bp = 'bp',
bs = 'brighterscript',
brs = 'brightscript',
bsd = 'bsdl',
bsdl = 'bsdl',
bst = 'bst',

View File

@ -142,6 +142,8 @@ func s:GetFilenameChecks() abort
\ 'blank': ['file.bl'],
\ 'blueprint': ['file.blp'],
\ 'bp': ['Android.bp'],
\ 'brighterscript': ['file.bs'],
\ 'brightscript': ['file.brs'],
\ 'bsdl': ['file.bsd', 'file.bsdl'],
\ 'bst': ['file.bst'],
\ 'bzl': ['file.bazel', 'file.bzl', 'WORKSPACE', 'WORKSPACE.bzlmod'],