0

I am working with Lua in VS Code and using two extensions:

  1. LuaHelper by Tencent (provides debugging and formatting features).
  2. MTA:SA Lua by Dominic Hock (provides syntax highlighting for MTA-specific functions).

The issue arises when I enable LuaHelper after MTA:SA Lua is already active. LuaHelper seems to override the syntax highlighting provided by MTA:SA Lua, causing the MTA-specific syntax highlighting to disappear.

I want to disable syntax highlighting in LuaHelper while keeping its other features, such as the debugger and formatter.

Is there a way to achieve this?

Steps to reproduce:

  1. Install and activate the MTA:SA Lua extension.
  2. Enable the LuaHelper extension.
  3. Notice that MTA:SA Lua's syntax highlighting is overridden.

What I've tried:

  • Checking LuaHelper's settings for an option to disable syntax highlighting (couldn't find one).
  • Reordering the extensions in VS Code's settings (didn't help).

Any advice or workarounds would be greatly appreciated!

Environment:

  • VS Code Version: version 1.96.1
  • LuaHelper Version: version 0.2.29
  • MTA:SA Lua Version: version 2.4.0 GitHub

1 Answer 1

0

https://github.com/Subtixx/vscode-mtalua will need to update their extension.
They are overriding the default source.lua scopeName instead of supplying their own.
Should change it to something like source.lua.mta.

You can manually fix it by going into the extension files.
Update "scopeName": "source.lua" in both extensions\subtixx.mtasa-lua-2.3.6\syntaxes\mtalua.tmLanguage.json and extensions\subtixx.mtasa-lua-2.3.6\package.json

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.