Disable utf8 autosnippets. Favor manual triggering.

main
Joshua Potter 2024-01-25 16:30:55 -07:00
parent a112360fb0
commit 43027aa86b
2 changed files with 66 additions and 59 deletions

View File

@ -6,225 +6,234 @@ local t = ls.text_node
return {
-- Superscripts
s(
{ trig = [[^+]], wordTrig = false },
{ trig = [[\^+]], wordTrig = false },
t('')
),
s(
{ trig = [[^-]], wordTrig = false },
{ trig = [[\^-]], wordTrig = false },
t('')
),
s(
{ trig = [[^0]], wordTrig = false },
{ trig = [[\^0]], wordTrig = false },
t('')
),
s(
{ trig = [[^1]], wordTrig = false },
{ trig = [[\^1]], wordTrig = false },
t('¹')
),
s(
{ trig = [[^2]], wordTrig = false },
{ trig = [[\^2]], wordTrig = false },
t('²')
),
s(
{ trig = [[^3]], wordTrig = false },
{ trig = [[\^3]], wordTrig = false },
t('³')
),
s(
{ trig = [[^4]], wordTrig = false },
{ trig = [[\^4]], wordTrig = false },
t('')
),
s(
{ trig = [[^5]], wordTrig = false },
{ trig = [[\^5]], wordTrig = false },
t('')
),
s(
{ trig = [[^6]], wordTrig = false },
{ trig = [[\^6]], wordTrig = false },
t('')
),
s(
{ trig = [[^7]], wordTrig = false },
{ trig = [[\^7]], wordTrig = false },
t('')
),
s(
{ trig = [[^8]], wordTrig = false },
{ trig = [[\^8]], wordTrig = false },
t('')
),
s(
{ trig = [[^9]], wordTrig = false },
{ trig = [[\^9]], wordTrig = false },
t('')
),
-- Subscripts
s(
{ trig = [[_+]], wordTrig = false },
{ trig = [[\_+]], wordTrig = false },
t('')
),
s(
{ trig = [[_-]], wordTrig = false },
{ trig = [[\_-]], wordTrig = false },
t('')
),
s(
{ trig = [[_0]], wordTrig = false },
{ trig = [[\_0]], wordTrig = false },
t('')
),
s(
{ trig = [[_1]], wordTrig = false },
{ trig = [[\_1]], wordTrig = false },
t('')
),
s(
{ trig = [[_2]], wordTrig = false },
{ trig = [[\_2]], wordTrig = false },
t('')
),
s(
{ trig = [[_3]], wordTrig = false },
{ trig = [[\_3]], wordTrig = false },
t('')
),
s(
{ trig = [[_4]], wordTrig = false },
{ trig = [[\_4]], wordTrig = false },
t('')
),
s(
{ trig = [[_5]], wordTrig = false },
{ trig = [[\_5]], wordTrig = false },
t('')
),
s(
{ trig = [[_6]], wordTrig = false },
{ trig = [[\_6]], wordTrig = false },
t('')
),
s(
{ trig = [[_7]], wordTrig = false },
{ trig = [[\_7]], wordTrig = false },
t('')
),
s(
{ trig = [[_8]], wordTrig = false },
{ trig = [[\_8]], wordTrig = false },
t('')
),
s(
{ trig = [[_9]], wordTrig = false },
{ trig = [[\_9]], wordTrig = false },
t('')
),
s(
{ trig = [[_a]], wordTrig = false },
{ trig = [[\_a]], wordTrig = false },
t('')
),
s(
{ trig = [[_i]], wordTrig = false },
{ trig = [[\_i]], wordTrig = false },
t('')
),
s(
{ trig = [[_j]], wordTrig = false },
{ trig = [[\_j]], wordTrig = false },
t('')
),
s(
{ trig = [[_k]], wordTrig = false },
{ trig = [[\_k]], wordTrig = false },
t('')
),
s(
{ trig = [[_m]], wordTrig = false },
{ trig = [[\_m]], wordTrig = false },
t('')
),
s(
{ trig = [[_n]], wordTrig = false },
{ trig = [[\_n]], wordTrig = false },
t('')
),
-- Lists
s(
{ trig = [[.]], wordTrig = false },
{ trig = [[\.]], wordTrig = false },
t('·')
),
s(
{ trig = [[circ]], wordTrig = false },
{ trig = [[\circ]], wordTrig = false },
t('')
),
-- Arrows
s(
{ trig = [[d]], wordTrig = false },
{ trig = [[\d]], wordTrig = false },
t('')
),
s(
{ trig = [[l]], wordTrig = false },
{ trig = [[\l]], wordTrig = false },
t('')
),
s(
{ trig = [[r]], wordTrig = false },
{ trig = [[\lr]], wordTrig = false },
t('')
),
s(
{ trig = [[r]], wordTrig = false },
{ trig = [[\r]], wordTrig = false },
t('')
),
s(
{ trig = [[u]], wordTrig = false },
{ trig = [[\u]], wordTrig = false },
t('')
),
-- Greek letters
s(
{ trig = [[a]], wordTrig = false },
{ trig = [[\a]], wordTrig = false },
t('α')
),
s(
{ trig = [[b]], wordTrig = false },
{ trig = [[\b]], wordTrig = false },
t('β')
),
s(
{ trig = [[g]], wordTrig = false },
{ trig = [[\g]], wordTrig = false },
t('γ')
),
s(
{ trig = [[e]], wordTrig = false },
{ trig = [[\e]], wordTrig = false },
t('ε')
),
s(
{ trig = [[pi]], wordTrig = false },
{ trig = [[\pi]], wordTrig = false },
t('π')
),
s(
{ trig = [[s]], wordTrig = false },
{ trig = [[\s]], wordTrig = false },
t('σ')
),
s(
{ trig = [[z]], wordTrig = false },
{ trig = [[\z]], wordTrig = false },
t('ζ')
),
-- Other operators
s(
{ trig = [[neg]], wordTrig = false },
{ trig = [[\neg]], wordTrig = false },
t('¬')
),
s(
{ trig = [[αn]], wordTrig = false },
{ trig = [[\and]], wordTrig = false },
t('')
),
s(
{ trig = [[or]], wordTrig = false },
{ trig = [[\or]], wordTrig = false },
t('')
),
s(
{ trig = [[imp]], wordTrig = false },
t('')
),
s(
{ trig = [[iff]], wordTrig = false },
{ trig = [[\iff]], wordTrig = false },
t('')
),
s(
{ trig = [[cap]], wordTrig = false },
{ trig = [[\imp]], wordTrig = false },
t('')
),
s(
{ trig = [[\cap]], wordTrig = false },
t('')
),
s(
{ trig = [[cup]], wordTrig = false },
{ trig = [[\cup]], wordTrig = false },
t('')
),
s(
{ trig = [[eq]], wordTrig = false },
{ trig = [[\leq]], wordTrig = false },
t('')
),
s(
{ trig = [[γeq]], wordTrig = false },
{ trig = [[\geq]], wordTrig = false },
t('')
),
s(
{ trig = [[\in]], wordTrig = false },
t('')
),
s(
{ trig = [[\notin]], wordTrig = false },
t('')
),
}

View File

@ -31,9 +31,7 @@ let
plugin = pkgs.vimPlugins.luasnip;
config = ''
require('utils.luasnip').setup()
require('luasnip').add_snippets('all', require('utf8.snippets'), {
type = 'autosnippets',
})
require('luasnip').add_snippets('all', require('utf8.snippets'))
${config.programs.neovim.nvim-snippets}
'';
};