Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to disable molang checking in specific file extensions #579

Open
stirante opened this issue May 19, 2024 · 0 comments
Open

Comments

@stirante
Copy link
Contributor

stirante commented May 19, 2024

Is your feature request related to a problem? Please describe.
I do a lot of addons with the help of JSONte and often I do a little snippets of molang, that I template in some places so an example of it would be

{
  "isItem": "(id) => 'q.is_item_name_any(\\'slot.weapon.mainhand\\', 0, \\'' + id + '\\')'",
}

Somehow even in .templ files, the molang diagnoser kicks in when it sees q.is_item_name_any and I get a bunch of errors like Molang expression is complex and should end with a ';'.

Describe the solution you'd like
I'd like the diagnoser to only consider actual file extensions used in raw files like .json and maybe add a configuration to add more if someone desires so. Alternatively it could be a list of disabled extensions and patterns (for example I would do *.templ,*.modl,packs/data/jsonte/*.json)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant