This commit is contained in:
William Ball 2024-11-20 22:01:02 -08:00
parent 2fb5e97e4f
commit a2f972c52c
4 changed files with 19 additions and 6 deletions

View file

@ -1 +0,0 @@
autocmd VimEnter,BufWinEnter,BufRead,BufNewFile *.pg setlocal filetype=perga

View file

@ -1,6 +1,10 @@
local M = {} local M = {}
function M.setup(opts) function M.setup(opts)
vim.filetype.add({
extension = { pg = 'perga' }
})
local parser_config = require "nvim-treesitter.parsers".get_parser_configs() local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.perga = { parser_config.perga = {
install_info = { install_info = {

View file

@ -1,8 +1,17 @@
[ "fun" "λ" "forall" "∏" ] @keyword [ "fun" "λ" "forall" "∏" ] @keyword
[ "->" "=>" "→" "⇒" "," ":=" ";" ":" ] @punctuation.delimiter [ "->" "=>" "→" "⇒" "," ":=" ";" ":" ] @punctuation.delimiter
[ "(" ")" ] @punctuation.bracket
;[ "*" "□" "[]" ] @constant.builtin [(star) (square)] @constant.builtin
(comment) @comment (comment) @comment
(identifier) @variable
;(param) @variable.parameter [ "(" ")" ] @punctuation.bracket
;(type) @type
(definition
name: (identifier) @function)
(param_block
param: (identifier)+ @variable.parameter)
(param_block
type: (expr) @type)

View file

@ -0,0 +1 @@
["(" ")"] @delimiter