Hello,
Is there a way to configure LuaLS to completely ignore lines starting with #, in particular lines like this #include mapcarTutorialRaw.lua ?
I tried writing my own plugin but commenting such line still triggers diagnostic warnings
function OnSetText(uri, text)
local diffs = {}
for start, line in text:gmatch("()([^\n]*)\n?") do
if line and line:match("^#include") then
local text = "-- "..line
diffs[#diffs + 1] = {
start = start,
finish = start+line:len(),
text = text
}
end
end
return diffs
end
Also putting ---@diagnostic disable-next-line: exp-in-action, undefined-global before such line still gives warnings I don't know how to suppress
[Warn type:1], `#` can not start
[Warn type:1], expression cannot be used as a statement
[Warn type:1], expression cannot be used as a statement
Hello, Is there a way to configure LuaLS to completely ignore lines starting with #, in particular lines like this
#include mapcarTutorialRaw.lua
?I tried writing my own plugin but commenting such line still triggers diagnostic warnings
Also putting
---@diagnostic disable-next-line: exp-in-action, undefined-global
before such line still gives warnings I don't know how to suppress