luaSupport - plugin detail

Lua Language Support with syntax and grammar errors highlighting

NetBeans Plugin - luaSupport
Plugin owner: arcanefoam
Website: http://luatopping.sourceforge.net
Added: 2010-06-03
License: GPL
Category: Programming Languages
Downloaded: 7,673 times
Rating:
 4.48, by 2 users

Plugin Log Show log

Versions available

Download plugin   Download size: 0.07 MB   Last Update: 2013-11-23

What's new in this version

- Fixed bug with ParserResult

Verifications for NetBeans versions

Plugin is not subject to any verification

Download plugin   Download size: 0.06 MB   Last Update: 2012-12-19

What's new in this version

- Support for decimal numbers starting with "." - Support for hexadecimals

Verifications for NetBeans versions

Plugin is not subject to any verification

Download plugin   Download size: 0.11 MB   Last Update: 2011-05-02

What's new in this version

- Created the UNEXPECTED_CHAR token to catch all unrecognized tokens.

Verifications for NetBeans versions

Plugin is not subject to any verification



Introduction

Module to support lua language in NetBeans. It provides syntax highlighting based on the lua language specification: http://www.lua.org/. TODO: - Add support for nested multi-line comments - Add support for nested literal strings - Add code folding

[ You have to be logged in to be able to comment. ]

User Comments

  

Thank you!

Hi arcane,

thank you for looking into this! I tried the 7.4 version and I don't get the class cast exception anymore. Also, lua files are recognized correctly and syntax highlighting works fine.

However, auto-completion does not seem to work on my machine. It didn't work on 7.3 either, so I am not sure whether this is a specific issue for my setup. Auto-completion is not really essential for me, but it would be nice to have it. So my question is, do you have auto-completion on your installation? Regards,

-seb
Posted by Sebastian.Meier on Dec 02, 2013
  

Issue with multi-line comments

Hi mstyles,

Multi-line comments are tricky and have been giving me headaches since I first try to support them. Still trying to figure out how to make them work.

Cheers,
Posted by arcanefoam on Nov 23, 2013
  

NetBeans 7.4

Hi Seb,

Sorry for the delay, finally found some time to look into this. The 7.4 version should work for you.

Cheers,
Posted by arcanefoam on Nov 23, 2013
  

Issue with multi-line comments

@arcanefoam

Thanks for the great plugin! I'm experiencing the same issue as @Branden, where I am unable to type 2 '[' left brackets to make a multi-line comment. I type the first bracket, and then any attempt to type another one after that will be prevented (it also shifts the syntax highlighting of all the text on the page...). Using NetBeans 7.2
Posted by mstyles on Nov 21, 2013
  

Netbeans 7.4

Hi arcane,

did you get around to have a look at the exception? Regards,

-seb
Posted by Sebastian.Meier on Sep 09, 2013
  

@Sebastian`

Hi,
Haven't been doing much lua development lately so haven't been working on the plugin either. Most certainly something in the parser API changed and needs to be fixed. Will try to work on this issue this week.
Thanks for the report!
Posted by arcanefoam on Sep 03, 2013
  

ClassCastException on Netbeans 7.4 and above

I am getting a class cast exception on Netbeans 7.4 and above (tried nightly builds as well). This happens when I open any Lua file, always. If you need more info, just ask.

java.lang.ClassCastException: net.sourceforge.luatopping.luasupport.parser.LuaSupportParser$LuaParserResult cannot be cast to org.netbeans.modules.csl.spi.ParserResult
at org.netbeans.modules.csl.hints.infrastructure.HintsTask.run(HintsTask.java:74)
at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:568)
[catch] at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:744)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2042)
Posted by Sebastian.Meier on Sep 03, 2013
  

File extensions

Working for me in NB 7.3
But still had to restart IDE to take effekt on open project. No problem though ;-)
Thanks for the handy plugin.
Posted by troglodyt on Jun 17, 2013
  

.lua files

@troglodyt The plugin specifies .lua files to be recognized by the plugin. I could only imagine the C++ plugin overriding my plugin definitions.
Posted by arcanefoam on Dec 19, 2012
  

False Error

@twpster I think it has to do with the decimal numbers without a 0, i.e., ".25".
Posted by arcanefoam on Dec 19, 2012
  

False error indication

The plugin shows the line containing the first "line" call as an error (but not the other line calls). It says encountered " "(" "("" at line 326, column 13 (which is "(")

-- Make the up arrow

strokeWidth(3)
stroke(0, 0, 0, 255)
line(self.right + (.25 * self.scrollWidth),
self.top + inset - (.5 * self.scrollWidth),
self.right + (.5 * self.scrollWidth),
self.top - inset)

line(self.right + (.5 * self.scrollWidth),
self.top + inset - (.85 * self.scrollWidth),
self.right + (.5 * self.scrollWidth),
self.top - inset)

line(self.right + self.scrollWidth - (.25 * self.scrollWidth),
self.top + inset - (.5 * self.scrollWidth),
self.right + (.5 * self.scrollWidth),
self.top - inset)

strokeWidth(1)

Thought I'd let you know. Thanks for making a Lua plugin for Netbeans. Its great to do Lua editing in my favorite IDE!
Posted by twpster on Dec 18, 2012
  

Giving a hand

@dukeofgaming If you decide to try working on this, the code is available at sourceforge. If you get any fixes you can submit them as a patch.
Posted by arcanefoam on Nov 26, 2012
  

Problem with hex numbers

I have a file with hex numbers (e.g. 0x2d3) and the plugin indicates it is a syntax error.
Posted by dukeofgaming on Nov 25, 2012
  

Thanks!

Thanks for updating this plugin!, I was just about to embark myself into starting a project for adding netbeans support, but guess I can use that time for something else now :)

I might start experimenting later with this to add support for codefolding and whatnot.

Thanks again
Posted by dukeofgaming on Nov 24, 2012
  

Wrong default file extension

In my Netbeans 7.2 ".lua" is linked to C++ by default. Had to change it by hand. No effort but made me think the plugin didn't work for some minutes. Maybe there's a way to do this when installing the plugin?
Posted by troglodyt on Oct 11, 2012
  

Suggestions

@arcanefoam

I'm doing development for Garry's Mod, so a "Garry's Mod" project would be awesome.


Ah, I misread. I'm getting the following bug:
When I type: --[[ to start a multiline comment, it doesn't let me type after the first the [

So, I type: "--[" and I can't add the second [
Posted by Branden on Sep 23, 2012
  

Suggestions

@Branden The lua project is feasable. A short survey tells me there is no prefered structure, so probably just a root folder with a main.lua initial file or something. Suggestions are welcome. In the NetBeans API, projects of a certain type are recognized by the files/fodlers in the root of the project. So for example I have a project type for wow addons in which a .toc with the same name as the project must exists. Perhaps what you need is a project type for a specifc game/framework. I will be a happy to help if you provide more details.

Multiline comments are working for me... are you talking about nested multi-line as in the TODO list?
Posted by arcanefoam on Sep 23, 2012
  

Love Love Love! But few suggestions!

Have been waiting for this for a very long time, as I develop stuff for games.

I'd like to see project support, not just file support. By that, if I want a "Lua" project, I need to create the base project under a different language (ex: PHP) and then make only Lua files.

As to mentioned, it doesn't allow for multi-line comments: --[[ ]]

I'd also like to see the Ctrl+Shift+F function work, (this auto-formats the code.


Again, great work, love it!
Posted by Branden on Sep 23, 2012
  

Error while trying to instal under Netbeans 7.1

I'm getting the following message for Netbeans 7.1: "The plugin Editor Library is requested in version >= 1.44.1.9.2 (release version 1) but only 3.17.1.19.25 (of release version different from 1) was found". This error won't let me install the plugin.

I'd really appreciate an updated versoin.
Posted by dukeofgaming on Feb 21, 2012
  

update

I'm having the same problem. I need one for 6.9
Posted by dm7210 on Dec 28, 2011
  

Update

Do you require a 6.9 or a 7 version?
Posted by arcanefoam on Oct 26, 2011
  

update

hi, needs updating for latest netbeans version. Getting the 'Some plugins require plugin Editor Library to be installed'
when trying to install.

Same problem as here...
http://forums.netbeans.org/topic24084.html
Posted by delmontiman on Oct 26, 2011
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo