diff --git a/emacs/psyc.el b/share/emacs/psyc.el similarity index 100% rename from emacs/psyc.el rename to share/emacs/psyc.el diff --git a/share/vim/ftdetect/psyc.vim b/share/vim/ftdetect/psyc.vim new file mode 100644 index 0000000..28f968a --- /dev/null +++ b/share/vim/ftdetect/psyc.vim @@ -0,0 +1 @@ +au BufRead,BufNewFile *.psyc set filetype=psyc diff --git a/share/vim/syntax/psyc.vim b/share/vim/syntax/psyc.vim new file mode 100644 index 0000000..3d7a554 --- /dev/null +++ b/share/vim/syntax/psyc.vim @@ -0,0 +1,34 @@ +" Vim syntax file +" Language: PSYC - syntax highlighting for protocol packets +" Maintainer: carlo von lynX +" Latest Revision: 2016-08-25 + +if exists("b:current_syntax") + finish +endif + +" PSYC2 syntax +syn match psycSeparator /^|$/ + +" PSYC1 syntax +syn match psycSeparator /^\.$/ + +" PSYC operators +syn match psycSet /^:[a-z_].*$/ +syn match psycAssign /^=[a-z_].*$/ +syn match psycAugment /^+[a-z_].*$/ +" why doesn't this one work? +syn match psycDiminsh /^\-[a-z_].*$/ + +" should define a region instead, so that header rules +" are not applied to body +syn match psycMethod /^[a-z_]\+$/ + +hi def link psycSeparator PreProc +hi def link psycMethod Statement +hi def link psycAssign Constant +hi def link psycSet Identifier +hi def link psycAugment Type +hi def link psycDiminish Type + +let b:current_syntax = "psyc" diff --git a/test/packets/00-body-only b/test/packets/00-body-only.psyc similarity index 100% rename from test/packets/00-body-only rename to test/packets/00-body-only.psyc diff --git a/test/packets/00-empty b/test/packets/00-empty.psyc similarity index 100% rename from test/packets/00-empty rename to test/packets/00-empty.psyc diff --git a/test/packets/00-length-body-only b/test/packets/00-length-body-only.psyc similarity index 100% rename from test/packets/00-length-body-only rename to test/packets/00-length-body-only.psyc diff --git a/test/packets/00-length-no-data b/test/packets/00-length-no-data.psyc similarity index 100% rename from test/packets/00-length-no-data rename to test/packets/00-length-no-data.psyc diff --git a/test/packets/00-length-no-entity b/test/packets/00-length-no-entity.psyc similarity index 100% rename from test/packets/00-length-no-entity rename to test/packets/00-length-no-entity.psyc diff --git a/test/packets/00-method-only-1 b/test/packets/00-method-only-1.psyc similarity index 100% rename from test/packets/00-method-only-1 rename to test/packets/00-method-only-1.psyc diff --git a/test/packets/00-method-only b/test/packets/00-method-only.psyc similarity index 100% rename from test/packets/00-method-only rename to test/packets/00-method-only.psyc diff --git a/test/packets/00-no-body b/test/packets/00-no-body.psyc similarity index 100% rename from test/packets/00-no-body rename to test/packets/00-no-body.psyc diff --git a/test/packets/00-no-content b/test/packets/00-no-content.psyc similarity index 100% rename from test/packets/00-no-content rename to test/packets/00-no-content.psyc diff --git a/test/packets/00-no-data b/test/packets/00-no-data.psyc similarity index 100% rename from test/packets/00-no-data rename to test/packets/00-no-data.psyc diff --git a/test/packets/00-no-entity b/test/packets/00-no-entity.psyc similarity index 100% rename from test/packets/00-no-entity rename to test/packets/00-no-entity.psyc diff --git a/test/packets/00-no-routing b/test/packets/00-no-routing.psyc similarity index 100% rename from test/packets/00-no-routing rename to test/packets/00-no-routing.psyc diff --git a/test/packets/00-no-value b/test/packets/00-no-value.psyc similarity index 100% rename from test/packets/00-no-value rename to test/packets/00-no-value.psyc diff --git a/test/packets/00-state-reset b/test/packets/00-state-reset.psyc similarity index 100% rename from test/packets/00-state-reset rename to test/packets/00-state-reset.psyc diff --git a/test/packets/00-state-resync b/test/packets/00-state-resync.psyc similarity index 100% rename from test/packets/00-state-resync rename to test/packets/00-state-resync.psyc diff --git a/test/packets/01-length b/test/packets/01-length.psyc similarity index 100% rename from test/packets/01-length rename to test/packets/01-length.psyc diff --git a/test/packets/01-utf8 b/test/packets/01-utf8.psyc similarity index 100% rename from test/packets/01-utf8 rename to test/packets/01-utf8.psyc diff --git a/test/packets/01 b/test/packets/01.psyc similarity index 100% rename from test/packets/01 rename to test/packets/01.psyc diff --git a/test/packets/02-list b/test/packets/02-list.psyc similarity index 100% rename from test/packets/02-list rename to test/packets/02-list.psyc diff --git a/test/packets/02-list2 b/test/packets/02-list2.psyc similarity index 100% rename from test/packets/02-list2 rename to test/packets/02-list2.psyc diff --git a/test/packets/03-dict b/test/packets/03-dict.psyc similarity index 100% rename from test/packets/03-dict rename to test/packets/03-dict.psyc diff --git a/test/packets/04-circuit b/test/packets/04-circuit.psyc similarity index 100% rename from test/packets/04-circuit rename to test/packets/04-circuit.psyc diff --git a/test/packets/05-message-private b/test/packets/05-message-private.psyc similarity index 100% rename from test/packets/05-message-private rename to test/packets/05-message-private.psyc diff --git a/test/packets/06-message-private-remote b/test/packets/06-message-private-remote.psyc similarity index 100% rename from test/packets/06-message-private-remote rename to test/packets/06-message-private-remote.psyc diff --git a/test/packets/07-dns-fake b/test/packets/07-dns-fake.psyc similarity index 100% rename from test/packets/07-dns-fake rename to test/packets/07-dns-fake.psyc diff --git a/test/packets/07-dns-invalid b/test/packets/07-dns-invalid.psyc similarity index 100% rename from test/packets/07-dns-invalid rename to test/packets/07-dns-invalid.psyc diff --git a/test/packets/08-context-enter b/test/packets/08-context-enter.psyc similarity index 100% rename from test/packets/08-context-enter rename to test/packets/08-context-enter.psyc diff --git a/test/packets/08-context-leave b/test/packets/08-context-leave.psyc similarity index 100% rename from test/packets/08-context-leave rename to test/packets/08-context-leave.psyc diff --git a/test/packets/err-00-oper-alone b/test/packets/err-00-oper-alone.psyc similarity index 100% rename from test/packets/err-00-oper-alone rename to test/packets/err-00-oper-alone.psyc diff --git a/test/packets/err-01-length b/test/packets/err-01-length.psyc similarity index 100% rename from test/packets/err-01-length rename to test/packets/err-01-length.psyc diff --git a/test/packets/err-02-list b/test/packets/err-02-list.psyc similarity index 100% rename from test/packets/err-02-list rename to test/packets/err-02-list.psyc