UDL: Help with lua.
-
I already know there is syntax highlighting for Lua. I am a Roblox Developer and I installed notepad++ just for aesthetics effects, cuz Roblox Studio doesn’t have custom highlighting I decided to put the Luau language in notepad++ using UDL. Roblox has removed a lot of stuff from the original Lua and they have added more to it. There is a huge lack of documentation on UDL and it becomes really difficult for me to do a language on it. I don’t even know any programing language, neither XML. Can anyone help me? I want to make it so it behaves exactly like the original Lua syntax that has notepad++. I already have all the key words, comments are ready, strings are ready, but I am having weird “bugs” idk how to fix them. I need help, thanks if you answer! :D
-
@Moises-Napoles said in UDL: Help with lua.:
I want to make it so it behaves exactly like the original Lua syntax that has notepad++
That’s not going to happen. UDL was not designed to give you all the subtle nuances of a full-blown lexer; it was provided as an alternative for people who don’t want to learn how to program a lexer/plugin.
There is a huge lack of documentation on UDL
Wow. I feel exactly the opposite. The npp-user-manual.org’s UDL page gives an good overview, and that manual and the UDL dialog itself both link to the excellent, long-standing detailed UDL reference provided by Ivan Radić.
-
@PeterJones Thanks for your reply! Look this is what’s happening.
Is there any other program your recommend me to use, maybe you can’t say it but I would like to know. I want a program that has something like notepad++ has, I need custom syntax highlighting.
-
Sorry, I know nothing about Lua or the Roblox variant, so I don’t know what you think is wrong with that image. And, as I said, the UDL system was designed for basic highlighting, and wasn’t designed for the complex, nuanced cases often handled by full dedicated lexers.
Personally, if I were wanting syntax highlighting that was based on Lua, I would just add User Defined keywords to the INSTRUCTION WORD and FUNC1,FUNC2,FUNC3 keyword types in Lua’s Style Configurator section, and not worry about the keywords that Roblox “removed a lot of stuff from Lua”
-
@PeterJones Oh the only thing that is wrong are the colors.
1- Look at the second line, the name should stop highlighting but isn’t doing so.
2- Look at the third line, the numbers are getting highlighted. -
@PeterJones Sorry for pinging you once again, I wanted to edit the notepad++ lua file but changes that I make on the file doesn’t reflect on notepad++. I just want to remove all that the default has, anyway to achieve this?
-
@Moises-Napoles said in UDL: Help with lua.:
I wanted to edit the notepad++ lua file but changes that I make on the file doesn’t reflect on notepad++
If you want to just add keywords, just use the Style Configurator … it’s easier that way.
if you insist on editing the config file manually, you need to understand and follow the sequence in https://npp-user-manual.org/docs/config-files/#editing-configuration-files, or use a different editor to edit the config file (while Notepad++ is not running).