From 4696b8af8e065d6f7f8f64d6b1afa74e666e9807 Mon Sep 17 00:00:00 2001 From: Joel Flaig <126613308+joelflaig@users.noreply.github.com> Date: Sat, 23 Mar 2024 00:05:28 +0100 Subject: [PATCH 1/2] Added indentation --- indent/mojo.vim | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 indent/mojo.vim diff --git a/indent/mojo.vim b/indent/mojo.vim new file mode 100644 index 0000000..00eecd1 --- /dev/null +++ b/indent/mojo.vim @@ -0,0 +1,2 @@ +" include python indent file +runtime indent/python.vim From cb1dac0039dde72c34f9dacc261b4642ec95b4be Mon Sep 17 00:00:00 2001 From: Mathprogrammer5 Date: Sat, 6 Apr 2024 22:41:47 +0200 Subject: [PATCH 2/2] Added raises, capturing and escaping function modifiers. --- syntax/mojo.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/syntax/mojo.vim b/syntax/mojo.vim index bdb6521..286f5bf 100644 --- a/syntax/mojo.vim +++ b/syntax/mojo.vim @@ -20,13 +20,14 @@ syn keyword mojoStatement lambda nonlocal pass return with yield syn keyword mojoStatement class def nextgroup=mojoFunction skipwhite syn keyword mojoStatement struct fn trait nextgroup=mojoFunction skipwhite syn keyword mojoStatement alias var let -syn keyword mojoStatement inout owned borrowed +syn keyword mojoStatement inout owned borrowed syn keyword mojoConditional elif else if syn keyword mojoRepeat for while syn keyword mojoOperator and in is not or syn keyword mojoException except finally raise try syn keyword mojoInclude from import self syn keyword mojoAsync async await +syn keyword mojoModifier raises capturing escaping " Soft keywords " These keywords do not mean anything unless used in the right context. @@ -225,6 +226,7 @@ hi def link mojoExceptions Structure hi def link mojoSpaceError Error hi def link mojoDoctest Special hi def link mojoDoctestValue Define +hi def link mojoModifier Statement let b:current_syntax = "mojo"