fix for vim

This commit is contained in:
sfja 2025-09-09 21:27:27 +02:00
parent 7bc9504f12
commit f3b064394e
4 changed files with 32 additions and 0 deletions

4
package.json Normal file
View File

@ -0,0 +1,4 @@
{
"name": "phi-lang",
"version": "1.0.0",
}

2
vim/ftdetect/phi.vim Normal file
View File

@ -0,0 +1,2 @@
autocmd BufNewFile,BufRead *.phi setfiletype phi

1
vim/ftplugin/phi.vim Normal file
View File

@ -0,0 +1 @@
setlocal commentstring=//%s

25
vim/syntax/phi.vim Normal file
View File

@ -0,0 +1,25 @@
" Vim syntax file
" Language: phi
" Maintainer: SFJ
" Latest Revision: 1 January 1984
if exists("b:current_syntax")
finish
endif
syn keyword Keyword fn call return loop break if let do
syn keyword Special null
syn keyword Boolean true false
syn match Number '0'
syn match Number '[1-9][0-9]*'
syn region String start=+"+ skip=+\\"+ end=+"+
syn keyword Todo contained TODO FIXME XXX NOTE
syn match Comment "//.*$" contains=Todo
syn match Identifier '[a-zA-Z_]\w*'
let b:current_syntax = "phi"