mirror of
https://github.com/neovim/neovim.git
synced 2025-09-05 19:08:15 +00:00
vim-patch:9.1.1549: filetype: pkl files are not recognized
Problem: filetype: pkl files are not recognized
Solution: detect *.pkl files as pkl filetype, include
a filetype plugin (Riley Bruins)
References:
https://pkl-lang.org/
https://github.com/apple/pkl
closes: vim/vim#17751
d128889b30
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
This commit is contained in:

committed by
Christian Clason

parent
4195b82ec9
commit
8bccd07972
14
runtime/ftplugin/pkl.vim
Normal file
14
runtime/ftplugin/pkl.vim
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
" Vim filetype plugin
|
||||||
|
" Language: Pkl
|
||||||
|
" Maintainer: Riley Bruins <ribru17@gmail.com>
|
||||||
|
" Last Change: 2025 Jul 14
|
||||||
|
|
||||||
|
if exists('b:did_ftplugin')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
||||||
|
setlocal commentstring=//\ %s
|
||||||
|
|
||||||
|
let b:undo_ftplugin = 'setl com< cms<'
|
@@ -949,6 +949,7 @@ local extension = {
|
|||||||
pike = 'pike',
|
pike = 'pike',
|
||||||
pmod = 'pike',
|
pmod = 'pike',
|
||||||
rcp = 'pilrc',
|
rcp = 'pilrc',
|
||||||
|
pkl = 'pkl',
|
||||||
PL = detect.pl,
|
PL = detect.pl,
|
||||||
pli = 'pli',
|
pli = 'pli',
|
||||||
pl1 = 'pli',
|
pl1 = 'pli',
|
||||||
|
@@ -602,6 +602,7 @@ func s:GetFilenameChecks() abort
|
|||||||
\ 'pilrc': ['file.rcp'],
|
\ 'pilrc': ['file.rcp'],
|
||||||
\ 'pine': ['.pinerc', 'pinerc', '.pinercex', 'pinercex'],
|
\ 'pine': ['.pinerc', 'pinerc', '.pinercex', 'pinercex'],
|
||||||
\ 'pinfo': ['/etc/pinforc', '/.pinforc', 'any/.pinforc', 'any/etc/pinforc'],
|
\ 'pinfo': ['/etc/pinforc', '/.pinforc', 'any/.pinforc', 'any/etc/pinforc'],
|
||||||
|
\ 'pkl': ['file.pkl'],
|
||||||
\ 'pli': ['file.pli', 'file.pl1'],
|
\ 'pli': ['file.pli', 'file.pl1'],
|
||||||
\ 'plm': ['file.plm', 'file.p36', 'file.pac'],
|
\ 'plm': ['file.plm', 'file.p36', 'file.pac'],
|
||||||
\ 'plp': ['file.plp'],
|
\ 'plp': ['file.plp'],
|
||||||
|
Reference in New Issue
Block a user