From 75e686cb7a55c59b87371640aeec0158844c4ae4 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sun, 1 Jul 2018 20:09:01 +0200 Subject: Add vim-fuspel --- contrib/vim-fuspel/ftdetect/fuspel.vim | 1 + contrib/vim-fuspel/ftplugin/fuspel.vim | 26 ++++++++++++++++++++++++ contrib/vim-fuspel/syntax/fuspel.vim | 37 ++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 contrib/vim-fuspel/ftdetect/fuspel.vim create mode 100644 contrib/vim-fuspel/ftplugin/fuspel.vim create mode 100644 contrib/vim-fuspel/syntax/fuspel.vim (limited to 'contrib/vim-fuspel') diff --git a/contrib/vim-fuspel/ftdetect/fuspel.vim b/contrib/vim-fuspel/ftdetect/fuspel.vim new file mode 100644 index 0000000..b11948c --- /dev/null +++ b/contrib/vim-fuspel/ftdetect/fuspel.vim @@ -0,0 +1 @@ +au BufNewFile,BufRead *.fusp set filetype=fuspel diff --git a/contrib/vim-fuspel/ftplugin/fuspel.vim b/contrib/vim-fuspel/ftplugin/fuspel.vim new file mode 100644 index 0000000..276873a --- /dev/null +++ b/contrib/vim-fuspel/ftplugin/fuspel.vim @@ -0,0 +1,26 @@ +" Vim plugin for fuspel development +" Language: Fuspel functional programing language +" Maintainer: Camil Staps +" License: This file is placed in the public domain. + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setlocal com< cms< fo< sua<" + +setlocal comments=:// +setlocal commentstring=//\ %s + +setlocal formatoptions-=t formatoptions+=ro + +setlocal suffixesadd=.fusp + +let &cpo = s:cpo_save +unlet s:cpo_save + +" vim: expandtab shiftwidth=2 tabstop=2 diff --git a/contrib/vim-fuspel/syntax/fuspel.vim b/contrib/vim-fuspel/syntax/fuspel.vim new file mode 100644 index 0000000..d1171a1 --- /dev/null +++ b/contrib/vim-fuspel/syntax/fuspel.vim @@ -0,0 +1,37 @@ +" Fuspel syntax file +" Language: Fuspel functional programing language +" Author: Camil Staps +" License: This file is placed in the public domain. + +if exists("b:current_syntax") + finish +endif + +let s:cpo_save = &cpo +set cpo&vim + +syn keyword fuspelKeyword code main import + +syn keyword fuspelTodo TODO FIXME XXX BUG NB contained containedin=fuspelComment +syn region fuspelComment start="//" end="$" contains=@Spell oneline display + +syn match fuspelInteger /\d\+/ display + +syn match fuspelDelimiter /\v[\[\]\(\):;=,]/ display + +syn match fuspelIdentifier /^[_a-zA-Z]\+/ display + +hi def link fuspelKeyword Keyword +hi def link fuspelInteger Number +hi def link fuspelDelimiter Delimiter +hi def link fuspelIdentifier Identifier +hi def link fuspelTodo Todo +hi def link fuspelComment Comment + +syntax sync ccomment fuspelComment +setlocal foldmethod=syntax + +let b:current_syntax = 'fuspel' + +let &cpo = s:cpo_save +unlet s:cpo_save -- cgit v1.2.3