Skip to content

kengonakajima/lua-mode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Yet another lua-mode that is suitable for luvit or any callback-based programming

Default emacs' lua-mode indents like this:

local foo = function()
               print("Hello, world")
            end

It takes too many indents, apparently corrupt..

Here you will get:

local foo = function()
  print("Hello, world!")
end

Nice, isnt it.

Put my-lua.el anywhere and append this:

(add-hook 'lua-mode-hook 
          (lambda () (unless (fboundp 'lua-calculate-indentation-right-shift-next)
                       (load-file (locate-file "my-lua.el" load-path)))))

in your .emacs .

Related discussions

See how to configure indentation in emacs lua-mode : stack overflow

In this repository it fixes the bug in above code.

About

yet another lua-mode that corrects function() indentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published