Skip to content

Snippets not triggering on commented line in typst file #1409

@shivangp76

Description

@shivangp76

I'm not sure why, but snippets are not triggering inside commented lines inside a typst file. They do work in other filetypes.

For example, creating a file called typst.lua with the following content and loading it does not work when the cursor is in a commented line. Renaming this file to all.lua allows this snippet to work in commented lines. I tried naming this file rust.lua and then the snippet did trigger inside a comment in a rust file, so I'm unsure what is causing this behavior.

local ls = require("luasnip")
local s = ls.snippet
local t = ls.text_node
return {
  s({
      trig = "bad",
      snippetType = "autosnippet",
    },
    t("1")
  ),
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions