From 69a916aa0c8afe9be0473028a3212a5d2aa481c9 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 17 Sep 2020 18:00:45 +0200 Subject: lexers: add Mikrotik RouterOS script lexer Add a lexer for Mikrotik RouterOS scripts. https://wiki.mikrotik.com/wiki/Manual:Scripting --- lua/plugins/filetype.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lua/plugins') diff --git a/lua/plugins/filetype.lua b/lua/plugins/filetype.lua index 048b35d..fa1717e 100644 --- a/lua/plugins/filetype.lua +++ b/lua/plugins/filetype.lua @@ -343,6 +343,12 @@ vis.ftdetect.filetypes = { rhtml = { ext = { "%.erb$", "%.rhtml$" }, }, + routeros = { + ext = { "%.rsc" }, + detect = function(file, data) + return data:match("^#.* by RouterOS") + end + }, rstats = { ext = { "%.R$", "%.Rout$", "%.Rhistory$", "%.Rt$", "Rout.save", "Rout.fail" }, }, -- cgit v1.2.3