diff --git a/runtime/ftplugin/brighterscript.vim b/runtime/ftplugin/brighterscript.vim new file mode 100644 index 0000000000..4fe585aec7 --- /dev/null +++ b/runtime/ftplugin/brighterscript.vim @@ -0,0 +1,11 @@ +" Vim filetype plugin +" Language: Brighterscript +" Maintainer: Riley Bruins +" Last Change: 2025 Jun 17 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +runtime! ftplugin/brightscript.vim diff --git a/runtime/ftplugin/brightscript.vim b/runtime/ftplugin/brightscript.vim new file mode 100644 index 0000000000..92bc56d248 --- /dev/null +++ b/runtime/ftplugin/brightscript.vim @@ -0,0 +1,13 @@ +" Vim filetype plugin +" Language: Brightscript +" Maintainer: Riley Bruins +" 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<' diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index bddc2287a3..8e1ee50c01 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -258,6 +258,8 @@ local extension = { bl = 'blank', blp = 'blueprint', bp = 'bp', + bs = 'brighterscript', + brs = 'brightscript', bsd = 'bsdl', bsdl = 'bsdl', bst = 'bst', diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index 81dcb9a570..3d66fd5538 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -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'],