patch 9.1.1821: filetype: Not all PKL files are recognized
Problem: filetype: Not all PKL files are recognized
Solution: Detect *.pcf as pkl filetype, detect using the pkl-lsp://
protocol as pkl filetype, include PKL syntax script
(Jan Claußen)
This adds basic syntax support for the new PKL language by Apple.
What works:
- Shebang support
- Comment support
- Integers (decimal, hex, octal and binary) support
- Floating point support including exponentials
- Basic datatype support
- Unicode escape delimiters
- Escape code support
- String interpolation
- Support up to five pounds for custom delimiters
- Folding of multi-line comments and blocks
What doesn't work:
The language heavily uses parameterized type declarations, which can get
very complex. It is very hard to highlight this properly. There is
official Tree-sitter support for this. Since it is hard to pull this off
in a vim syntax file, I opted for basic support of the data types.
References:
https://github.com/apple/pkl-pantry
fixes: #18271
closes: #18274
Signed-off-by: Jan Claußen <jan.claussen10@web.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
f77c187277
commit
67a8f2945e
@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2025 Sep 14
|
||||
" Last Change: 2025 Oct 03
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
@ -1971,7 +1971,7 @@ au BufNewFile,BufRead Pipfile.lock setf json
|
||||
au BufNewFile,BufRead pixi.lock setf yaml
|
||||
|
||||
" Pkl
|
||||
au BufNewFile,BufRead *.pkl setf pkl
|
||||
au BufNewFile,BufRead *.pkl,*.pcf,pkl-lsp://* setf pkl
|
||||
|
||||
" PL/1, PL/I
|
||||
au BufNewFile,BufRead *.pli,*.pl1 setf pli
|
||||
|
||||
Reference in New Issue
Block a user