Skip to content
Discussion options

You must be logged in to vote

Oh ‼️ I think I know the resaon ‼️

  • the logic of the demo plugin is that your test file needs to have --## as the first line
  • but your main.lua didn't have this, so you actually did not trigger the logic of the plugin to transform your text buffer 😂
function OnSetText(uri, text)
    if text:sub(1, 4) ~= '--##' then  --<<<<<< this means if the file buffer is not started with `--##` then **skip**
        return nil
    end
...

From the attached screenshot in my previous comment, you can see that my main.lua has this first line --##
But there is none in your main.lua 🙈

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
2 replies
@zhengx2000
Comment options

@tomlau10
Comment options

Comment options

You must be logged in to vote
2 replies
@tomlau10
Comment options

@zhengx2000
Comment options

Answer selected by zhengx2000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants