Giter Site home page Giter Site logo

lua-mode's Introduction

Lua mode

lua-mode is a major mode for editing Lua sources in Emacs. After a rather long hiatus, it's back in active development stage, so make sure to visit homepage frequently enough.

If you have a problem or a suggestion about lua-mode, please, let me know about it via github's Issue Tracker.

INSTALLATION

EL-GET INSTALLATION

El-get is a package manager which greatly simplifies adding modules to your Emacs and keeping them up-to-date. Once you have el-get set up, installing lua-mode can be done with

<M-x> el-get-install "lua-mode"

and updating is no more than

<M-x> el-get-update "lua-mode"`

Please, consult with el-get documentation for further information.

MANUAL INSTALLATION

To install, you need to make sure that lua-mode.el is on your load-path (and optionally byte-compile it) and to set up Emacs to automatically enable lua-mode for *.lua files or ones that contain lua hash-bang line (#!/usr/bin/lua). Putting this snippet to .emacs should be enough in most cases:

    ;;;; This snippet enables lua-mode

    ;; This line is not necessary, if lua-mode.el is already on your load-path
    (add-to-list 'load-path "/path/to/directory/where/lua-mode-el/resides")

    (autoload 'lua-mode "lua-mode" "Lua editing mode." t)
    (add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
    (add-to-list 'interpreter-mode-alist '("lua" . lua-mode))

USAGE

lua-mode supports some formatting and sending of lines/regions/files to a Lua interpreter. An interpreter (see variable lua-default-application) will be started if you try to send some code and none is running. You can use the process-buffer (named after the application you chose) as if it were an interactive shell. See the documentation for comint.el for details.

Lua-mode also works with Hide Show minor mode (see hs-minor-mode).

TODO

Currently, there're a lot of features that need fixing (or reimplementing), including but not limited to:

  1. implementing autotesting of indentation engine
  2. supporting line-continuation commas
  3. fixing close-brace/paren positioning
  4. fix syntax handling of multiline comments/literals (including both highlighting & indentation)
  5. implementing a crisp scheme of customizing the way lua-mode indents the code
  6. cleaning up existing code
  7. extending docs & comments

CEDET/Semantic integration

Also, there's a rather distant goal to integrate lua-mode with cedet's semantic. This would mean an almost complete rewrite, but I think the challenge is worth it. There's a slightest concern about the overhead brought by this dependency, but semantic is already being shipped with Emacs, so there might be no problem after all.

Use wisent-generated grammar

First stage would be to rewrite syntax handling with help of semantic/wisent-generated parser based on the actual Lua grammar. Currently, syntax analysis is done ad-hoc and, despite the model is oversimplified and doesn't treat corner situation well, it's still very tricky and really hard to grasp.

Extend cedet/semantic facilities onto Lua

And there's the cherry on the pie: after completing the wisent-generated parser, the next step will be to provide semantic with all the information it needs to do it's magic of code analysis and generation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.