Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Lua Development Tools » Range-based indenting?
Range-based indenting? [message #1776973] Thu, 23 November 2017 10:48 Go to next message
Vadim Peretokin is currently offline Vadim PeretokinFriend
Messages: 1
Registered: November 2017
Junior Member
How does LDT allow to indent just a selection of the code? I've had a look at the formatter.lua that's used and it doesn't seem to have that option, it can only indent the whole block.

I'm looking to use the formatter in my project as well and would like to provide the users with an option to format just a section of the code, so I'm reaching out here for advice!
Re: Range-based indenting? [message #1778801 is a reply to message #1776973] Thu, 21 December 2017 15:34 Go to previous message
Simon Bernard is currently offline Simon BernardFriend
Messages: 345
Registered: July 2009
Senior Member
AFAIK, we format the whole file then we replace only the selected line. As the formatter is not really a formatter but just an indenter this should be ok.

See : https://git.eclipse.org/c/ldt/org.eclipse.ldt.git/tree/plugins/org.eclipse.ldt.ui/src/org/eclipse/ldt/ui/internal/editor/formatter/LuaFormatter.java#n120
Previous Topic:Cant do Existing Install - Repository Empty
Next Topic:How to config LDT to support a big number of functions in one doclua file?
Goto Forum:
  


Current Time: Sat Apr 27 02:03:29 GMT 2024

Powered by FUDForum. Page generated in 0.03892 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top