From 2b8251ac373fb02030a835c2225f4f7b2c7c2c15 Mon Sep 17 00:00:00 2001 From: Dheisom Gomes Date: Tue, 8 Feb 2022 17:16:33 -0300 Subject: Improvements on syntax of sh(using bash keywords) --- plugins/language_sh.lua | 72 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 52 insertions(+), 20 deletions(-) (limited to 'plugins') diff --git a/plugins/language_sh.lua b/plugins/language_sh.lua index f3e604f..ce92f19 100644 --- a/plugins/language_sh.lua +++ b/plugins/language_sh.lua @@ -22,25 +22,57 @@ syntax.add { { pattern = "[%a_][%w_]*", type = "symbol" }, }, symbols = { - ["case"] = "keyword", - ["do"] = "keyword", - ["done"] = "keyword", - ["elif"] = "keyword", - ["else"] = "keyword", - ["esac"] = "keyword", - ["fi"] = "keyword", - ["for"] = "keyword", - ["function"] = "keyword", - ["if"] = "keyword", - ["in"] = "keyword", - ["select"] = "keyword", - ["then"] = "keyword", - ["time"] = "keyword", - ["until"] = "keyword", - ["while"] = "keyword", - ["echo"] = "keyword", - ["true"] = "literal", - ["false"] = "literal", - }, + ["case"] = "keyword", + ["in"] = "keyword", + ["esac"] = "keyword", + ["if"] = "keyword", + ["then"] = "keyword", + ["elif"] = "keyword", + ["else"] = "keyword", + ["fi"] = "keyword", + ["while"] = "keyword", + ["do"] = "keyword", + ["done"] = "keyword", + ["for"] = "keyword", + ["break"] = "keyword", + ["continue"] = "keyword", + ["function"] = "keyword", + ["local"] = "keyword", + ["echo"] = "keyword", + ["return"] = "keyword", + ["exit"] = "keyword", + ["alias"] = "keyword", + ["test"] = "keyword", + ["cd"] = "keyword", + ["declare"] = "keyword", + ["enable"] = "keyword", + ["eval"] = "keyword", + ["exec"] = "keyword", + ["export"] = "keyword", + ["getopts"] = "keyword", + ["hash"] = "keyword", + ["history"] = "keyword", + ["help"] = "keyword", + ["jobs"] = "keyword", + ["kill"] = "keyword", + ["let"] = "keyword", + ["mapfile"] = "keyword", + ["printf"] = "keyword", + ["read"] = "keyword", + ["readarray"] = "keyword", + ["pwd"] = "keyword", + ["select"] = "keyword", + ["set"] = "keyword", + ["shift"] = "keyword", + ["source"] = "keyword", + ["time"] = "keyword", + ["type"] = "keyword", + ["until"] = "keyword", + ["unalias"] = "keyword", + ["unset"] = "keyword", + ["true"] = "literal", + ["false"] = "literal", + [":"] = "literal" + } } -- cgit v1.2.3