martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.26k stars 259 forks source link

How do I get vis to recognize racket files? #868

Closed 80aff123-9163-4f3e-a93d-4a2f35af9be1 closed 4 years ago

80aff123-9163-4f3e-a93d-4a2f35af9be1 commented 4 years ago

How can I get vis to recognize racket files (i.e. .rkt files) and turn on scheme syntax?

Any help is greatly appreciated.

- Carla

ninewise commented 4 years ago

Did you find the README about lexers? It is slightly hidden.

ghost commented 4 years ago

In lua/plugins/filetype.lua, there is this section:

    scheme = {
        ext = { "%.sch$", "%.scm$", "%.sld$", "%.sls$", "%.ss$" },
    },

If you add "%.rkt$", the existing scheme lexer will be used for highlighting.

You might find the Parkour plugin useful, too. There are Racket-specific rules for automatic square bracket rewriting, among other things.