vim-patch:9.1.2027: filetype: bicep filetype used for 2 bicep file types (#37130)

Problem:  filetype: bicep filetype used for 2 bicep file types
Solution: Detect *.bicepparam files as bicep-param filetype, include
          new bicep-params and bicep filetype plugin
          (Scott McKendry)

The bicep language server handles parameter files differently than
regular bicep files. Treating them the same at the editor level leads to
false positive diagnostics in the editor.

References:

Bicep Language Constants:
- 51392d32ca/src/Bicep.Core/LanguageConstants.cs (L23)
VS Code Extension definition:
- 51392d32ca/src/vscode-bicep/package.json (L47)

closes: vim/vim#19026

4e722fdfdd

Co-authored-by: Scott McKendry <me@scottmckendry.tech>
This commit is contained in:
zeertzjq
2025-12-28 08:16:20 +08:00
committed by GitHub
parent 1e44a001ec
commit 7f1d7271d5
4 changed files with 20 additions and 2 deletions

View File

@@ -0,0 +1,3 @@
" Placeholder for maximum compatibility. While bicepparam files are treated as distinct filetypes,
" they are should share the same ftplugin settings as bicep files.
runtime! ftplugin/bicep.vim

View File

@@ -0,0 +1,14 @@
" Vim filetype plugin
" Language: Bicep
" Maintainer: Scott McKendry <me@scottmckendry.tech>
" Last Change: 2025 Dec 27
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
setlocal comments=s1:/*,mb:*,ex:*/,://
setlocal commentstring=//\ %s
let b:undo_ftplugin = "setlocal comments< commentstring<"