Snippet after preceding letter, with subsequent words. #895
Replies: 5 comments 10 replies
-
Unfortunately there's no global setting, you'll have to set local parse = ls.parser.parse_snippet
local wordTrig_parse = ls.extend_decorator.apply(parse, {wordTrig = true})
ls.add_snippets("all", {wordTrig_parse("_i", "ᵢ")}, {key = "asdf"}) That second example looks a bit like we may be messing up multibyte characters, I'll check it out |
Beta Was this translation helpful? Give feedback.
-
Thank you indeed for your reply.
For 2) I have found the problem, I had to remove:
(apologies, my fault) |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hello, just tried the |
Beta Was this translation helpful? Give feedback.
-
I now think that the issue is related to the definition of the word, which is (following the docs), |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I have a snippet
" or a special character as "
"ᵢ, _i": { "prefix": "_i", "body": ["ᵢ"], "description": "sub i" },
,which should expand
ᵢ
when typing_i
.With standard settings, the snippet is offered in a dropdown after a blank "
+
" or "λ
", say, but not after a regular character (as "a
", e.g.).Next, this snippet will insert
±
when typing\pm
,"pm, ±": { "prefix": ["\\pm", "plus minus"], "body": ["±"], "description": "plus minus" },
.With standard settings, the snippet will remove the subsequent text when expanding,
\pm21+12
will be±+12
after expansion, e.g. (the desired output is±21+12
).(I assume this should be straight forward, but unfortunately, I could not find the answer after quite some research. Thanks in advance.)
Beta Was this translation helpful? Give feedback.
All reactions