diff options
author | Ben Larisch <benlarisch2019@gmail.com> | 2022-06-12 14:54:33 +0200 |
---|---|---|
committer | Guldoman <giulio.lettieri@gmail.com> | 2022-06-12 14:56:44 +0200 |
commit | 687d17addfcf5be387d6eefb4e81094eb3d5b368 (patch) | |
tree | 6d4409dbc0833dc1b89169227a6f54b60aa53e9c | |
parent | d4dc1b6981a40a9905e12b78c0d563cfdd57ff87 (diff) | |
download | lite-xl-plugins-687d17addfcf5be387d6eefb4e81094eb3d5b368.tar.gz lite-xl-plugins-687d17addfcf5be387d6eefb4e81094eb3d5b368.zip |
language_go: add syntax support for Go generic functions
-rw-r--r-- | plugins/language_go.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/language_go.lua b/plugins/language_go.lua index b670eac..93db0e4 100644 --- a/plugins/language_go.lua +++ b/plugins/language_go.lua @@ -45,6 +45,9 @@ syntax.add { { pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" }, { pattern = ":=", type = "operator" }, -- function calls + { pattern = "func()%s*[%a_][%w_]*()%f[%[(]", -- function statement + type = {"keyword", "function", "normal"} + }, { pattern = "[%a_][%w_]*%f[(]", type = "function" }, { pattern = "%.()[%a_][%w_]*%f[(]", type = { "normal", "function" } |