Disable utf8 autosnippets. Favor manual triggering.
parent
a112360fb0
commit
43027aa86b
|
@ -6,225 +6,234 @@ local t = ls.text_node
|
||||||
return {
|
return {
|
||||||
-- Superscripts
|
-- Superscripts
|
||||||
s(
|
s(
|
||||||
{ trig = [[^+]], wordTrig = false },
|
{ trig = [[\^+]], wordTrig = false },
|
||||||
t('⁺')
|
t('⁺')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[^-]], wordTrig = false },
|
{ trig = [[\^-]], wordTrig = false },
|
||||||
t('⁻')
|
t('⁻')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[^0]], wordTrig = false },
|
{ trig = [[\^0]], wordTrig = false },
|
||||||
t('⁰')
|
t('⁰')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[^1]], wordTrig = false },
|
{ trig = [[\^1]], wordTrig = false },
|
||||||
t('¹')
|
t('¹')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[^2]], wordTrig = false },
|
{ trig = [[\^2]], wordTrig = false },
|
||||||
t('²')
|
t('²')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[^3]], wordTrig = false },
|
{ trig = [[\^3]], wordTrig = false },
|
||||||
t('³')
|
t('³')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[^4]], wordTrig = false },
|
{ trig = [[\^4]], wordTrig = false },
|
||||||
t('⁴')
|
t('⁴')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[^5]], wordTrig = false },
|
{ trig = [[\^5]], wordTrig = false },
|
||||||
t('⁵')
|
t('⁵')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[^6]], wordTrig = false },
|
{ trig = [[\^6]], wordTrig = false },
|
||||||
t('⁶')
|
t('⁶')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[^7]], wordTrig = false },
|
{ trig = [[\^7]], wordTrig = false },
|
||||||
t('⁷')
|
t('⁷')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[^8]], wordTrig = false },
|
{ trig = [[\^8]], wordTrig = false },
|
||||||
t('⁸')
|
t('⁸')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[^9]], wordTrig = false },
|
{ trig = [[\^9]], wordTrig = false },
|
||||||
t('⁹')
|
t('⁹')
|
||||||
),
|
),
|
||||||
|
|
||||||
-- Subscripts
|
-- Subscripts
|
||||||
s(
|
s(
|
||||||
{ trig = [[_+]], wordTrig = false },
|
{ trig = [[\_+]], wordTrig = false },
|
||||||
t('₊')
|
t('₊')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_-]], wordTrig = false },
|
{ trig = [[\_-]], wordTrig = false },
|
||||||
t('₋')
|
t('₋')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_0]], wordTrig = false },
|
{ trig = [[\_0]], wordTrig = false },
|
||||||
t('₀')
|
t('₀')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_1]], wordTrig = false },
|
{ trig = [[\_1]], wordTrig = false },
|
||||||
t('₁')
|
t('₁')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_2]], wordTrig = false },
|
{ trig = [[\_2]], wordTrig = false },
|
||||||
t('₂')
|
t('₂')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_3]], wordTrig = false },
|
{ trig = [[\_3]], wordTrig = false },
|
||||||
t('₃')
|
t('₃')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_4]], wordTrig = false },
|
{ trig = [[\_4]], wordTrig = false },
|
||||||
t('₄')
|
t('₄')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_5]], wordTrig = false },
|
{ trig = [[\_5]], wordTrig = false },
|
||||||
t('₅')
|
t('₅')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_6]], wordTrig = false },
|
{ trig = [[\_6]], wordTrig = false },
|
||||||
t('₆')
|
t('₆')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_7]], wordTrig = false },
|
{ trig = [[\_7]], wordTrig = false },
|
||||||
t('₇')
|
t('₇')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_8]], wordTrig = false },
|
{ trig = [[\_8]], wordTrig = false },
|
||||||
t('₈')
|
t('₈')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_9]], wordTrig = false },
|
{ trig = [[\_9]], wordTrig = false },
|
||||||
t('₉')
|
t('₉')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_a]], wordTrig = false },
|
{ trig = [[\_a]], wordTrig = false },
|
||||||
t('ₐ')
|
t('ₐ')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_i]], wordTrig = false },
|
{ trig = [[\_i]], wordTrig = false },
|
||||||
t('ᵢ')
|
t('ᵢ')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_j]], wordTrig = false },
|
{ trig = [[\_j]], wordTrig = false },
|
||||||
t('ⱼ')
|
t('ⱼ')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_k]], wordTrig = false },
|
{ trig = [[\_k]], wordTrig = false },
|
||||||
t('ₖ')
|
t('ₖ')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_m]], wordTrig = false },
|
{ trig = [[\_m]], wordTrig = false },
|
||||||
t('ₘ')
|
t('ₘ')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[_n]], wordTrig = false },
|
{ trig = [[\_n]], wordTrig = false },
|
||||||
t('ₙ')
|
t('ₙ')
|
||||||
),
|
),
|
||||||
|
|
||||||
-- Lists
|
-- Lists
|
||||||
s(
|
s(
|
||||||
{ trig = [[.]], wordTrig = false },
|
{ trig = [[\.]], wordTrig = false },
|
||||||
t('·')
|
t('·')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[circ]], wordTrig = false },
|
{ trig = [[\circ]], wordTrig = false },
|
||||||
t('∘')
|
t('∘')
|
||||||
),
|
),
|
||||||
|
|
||||||
-- Arrows
|
-- Arrows
|
||||||
s(
|
s(
|
||||||
{ trig = [[d]], wordTrig = false },
|
{ trig = [[\d]], wordTrig = false },
|
||||||
t('↓')
|
t('↓')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[l]], wordTrig = false },
|
{ trig = [[\l]], wordTrig = false },
|
||||||
t('←')
|
t('←')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[←r]], wordTrig = false },
|
{ trig = [[\lr]], wordTrig = false },
|
||||||
t('↔')
|
t('↔')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[r]], wordTrig = false },
|
{ trig = [[\r]], wordTrig = false },
|
||||||
t('→')
|
t('→')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[u]], wordTrig = false },
|
{ trig = [[\u]], wordTrig = false },
|
||||||
t('↑')
|
t('↑')
|
||||||
),
|
),
|
||||||
|
|
||||||
-- Greek letters
|
-- Greek letters
|
||||||
s(
|
s(
|
||||||
{ trig = [[a]], wordTrig = false },
|
{ trig = [[\a]], wordTrig = false },
|
||||||
t('α')
|
t('α')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[b]], wordTrig = false },
|
{ trig = [[\b]], wordTrig = false },
|
||||||
t('β')
|
t('β')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[g]], wordTrig = false },
|
{ trig = [[\g]], wordTrig = false },
|
||||||
t('γ')
|
t('γ')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[e]], wordTrig = false },
|
{ trig = [[\e]], wordTrig = false },
|
||||||
t('ε')
|
t('ε')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[pi]], wordTrig = false },
|
{ trig = [[\pi]], wordTrig = false },
|
||||||
t('π')
|
t('π')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[s]], wordTrig = false },
|
{ trig = [[\s]], wordTrig = false },
|
||||||
t('σ')
|
t('σ')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[z]], wordTrig = false },
|
{ trig = [[\z]], wordTrig = false },
|
||||||
t('ζ')
|
t('ζ')
|
||||||
),
|
),
|
||||||
|
|
||||||
-- Other operators
|
-- Other operators
|
||||||
s(
|
s(
|
||||||
{ trig = [[neg]], wordTrig = false },
|
{ trig = [[\neg]], wordTrig = false },
|
||||||
t('¬')
|
t('¬')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[αn]], wordTrig = false },
|
{ trig = [[\and]], wordTrig = false },
|
||||||
t('∧')
|
t('∧')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[or]], wordTrig = false },
|
{ trig = [[\or]], wordTrig = false },
|
||||||
t('∨')
|
t('∨')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[imp]], wordTrig = false },
|
{ trig = [[\iff]], wordTrig = false },
|
||||||
t('⇒')
|
|
||||||
),
|
|
||||||
s(
|
|
||||||
{ trig = [[iff]], wordTrig = false },
|
|
||||||
t('⇔')
|
t('⇔')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[cap]], wordTrig = false },
|
{ trig = [[\imp]], wordTrig = false },
|
||||||
|
t('⇒')
|
||||||
|
),
|
||||||
|
s(
|
||||||
|
{ trig = [[\cap]], wordTrig = false },
|
||||||
t('∩')
|
t('∩')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[cup]], wordTrig = false },
|
{ trig = [[\cup]], wordTrig = false },
|
||||||
t('∪')
|
t('∪')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[←eq]], wordTrig = false },
|
{ trig = [[\leq]], wordTrig = false },
|
||||||
t('≤')
|
t('≤')
|
||||||
),
|
),
|
||||||
s(
|
s(
|
||||||
{ trig = [[γeq]], wordTrig = false },
|
{ trig = [[\geq]], wordTrig = false },
|
||||||
t('≥')
|
t('≥')
|
||||||
),
|
),
|
||||||
|
s(
|
||||||
|
{ trig = [[\in]], wordTrig = false },
|
||||||
|
t('∈')
|
||||||
|
),
|
||||||
|
s(
|
||||||
|
{ trig = [[\notin]], wordTrig = false },
|
||||||
|
t('∉')
|
||||||
|
),
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,9 +31,7 @@ let
|
||||||
plugin = pkgs.vimPlugins.luasnip;
|
plugin = pkgs.vimPlugins.luasnip;
|
||||||
config = ''
|
config = ''
|
||||||
require('utils.luasnip').setup()
|
require('utils.luasnip').setup()
|
||||||
require('luasnip').add_snippets('all', require('utf8.snippets'), {
|
require('luasnip').add_snippets('all', require('utf8.snippets'))
|
||||||
type = 'autosnippets',
|
|
||||||
})
|
|
||||||
${config.programs.neovim.nvim-snippets}
|
${config.programs.neovim.nvim-snippets}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue