Skip to content

Commit 4b91f28

Browse files
authored
feat(greek-letters): add "var" alternative greek letters (#37)
1 parent 152f203 commit 4b91f28

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lua/luasnip-latex-snippets/math_rA_no_backslash.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ local build_with_priority = function(trig, node, priority, name)
2828
end
2929
end
3030

31+
local vargreek_postfix_completions = function()
32+
local re = "varepsilon|varphi|varrho|vartheta"
33+
34+
local build = build_with_priority(postfix_trig, postfix_node, 200)
35+
return vim.tbl_map(build, vim.split(re, "|"))
36+
end
37+
3138
local greek_postfix_completions = function()
3239
local re =
3340
"[aA]lpha|[bB]eta|[cC]hi|[dD]elta|[eE]psilon|[gG]amma|[iI]ota|[kK]appa|[lL]ambda|[mM]u|[nN]u|[oO]mega|[pP]hi|[pP]i|[pP]si|[rR]ho|[sS]igma|[tT]au|[tT]heta|[zZ]eta|[eE]ta"
@@ -58,6 +65,7 @@ function M.retrieve(is_math)
5865

5966
s = ls.extend_decorator.apply(ls.snippet, M.decorator) --[[@as function]]
6067

68+
vim.list_extend(snippets, vargreek_postfix_completions())
6169
vim.list_extend(snippets, greek_postfix_completions())
6270
vim.list_extend(snippets, postfix_completions())
6371
vim.list_extend(snippets, { build_snippet(postfix_trig, postfix_node, "q?quad", 200) })

0 commit comments

Comments
 (0)