LuaHelper icon indicating copy to clipboard operation
LuaHelper copied to clipboard

Support for non-standard symbols?

Open zfbx opened this issue 2 years ago • 4 comments

I'm working on a project that has a build process that runs as a preprocessor and converts backticks to convert values before runtime. so I could have

local test = `somevalue`
-- or
local test2 = {
    [`weapon_name`] = "information"
}

Then before the code is run those would be converted to hash values. In another resource it makes use of Lua › Runtime: Nonstandard Symbol which saves to settings.json as:

"Lua.runtime.nonstandardSymbol": [
    "`"
],

Would it be possible to add support for something like that? I'd just like them to be treated just as a string would just without auto-replacement and not throwing errors, nothing fancy. There's a whole community using this same system. read more

zfbx avatar Oct 28 '21 13:10 zfbx

This is not very versatile, can you automatically convert it in advance?

yinfei8 avatar Oct 29 '21 01:10 yinfei8

not without making it unreadable. also we have added support for safe navigation which would be nice to have support for also

zfbx avatar Nov 05 '21 18:11 zfbx

This is the only thing stopping me from switching to this extension at the moment, unfortunately. Would love to see this added

napei avatar Nov 13 '21 10:11 napei

I'm very sorry, backticks are not Lua's standard string display. If I support this, I should change Lua's lexical analysis, it is not very versatile..

yinfei8 avatar Nov 13 '21 11:11 yinfei8