-
-
Notifications
You must be signed in to change notification settings - Fork 422
How to create the plugin example in official wiki? #3400
-
|
Hi, everyone I follow the Setup in wiki, but I fail. And there is no diffed.lua in my log file. The followings are my vs code file screenshot. Are there any step that I miss? Or could you give me some information about how to make this plugin.lua work? |
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 2 comments · 4 replies
-
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.
All reactions
-
😕 1
-
|
log file looks good to me
=> so the log says plugin not found
=> and the as a comparison here is my log when it is working click to show
|
Beta Was this translation helpful? Give feedback.
All reactions
-
|
Oh
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 |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
btw here are few more examples on what can be achieved by a plugin |
Beta Was this translation helpful? Give feedback.
All reactions
-
Beta Was this translation helpful? Give feedback.







Oh‼️ I think I know the resaon ‼️
--##as the first linemain.luadidn't have this, so you actually did not trigger the logic of the plugin to transform your text buffer 😂From the attached screenshot in my previous comment, you can see that my
main.luahas this first line--##But there is none in your
main.lua🙈