Permalink
Browse files

lua!

  • Loading branch information...
1 parent 8005920 commit 6fd3cd42e01d3c2bd8bbf9aa1629451ea4c8955e @defunkt committed May 18, 2011
Showing with 1,185 additions and 0 deletions.
  1. +33 −0 defunkt/lua.el
  2. +1 −0 defunkt/modes.el
  3. +1,151 −0 vendor/lua-mode.el
View
@@ -0,0 +1,33 @@
+;; use an indentation width of two spaces
+(setq lua-indent-level 2)
+
+;; Add dangling '(', remove '='
+;; (setq lua-cont-eol-regexp
+;; (eval-when-compile
+;; (concat
+;; "\\((\\|\\_<"
+;; (regexp-opt '("and" "or" "not" "in" "for" "while"
+;; "local" "function") t)
+;; "\\_>\\|"
+;; "\\(^\\|[^" lua-operator-class "]\\)"
+;; (regexp-opt '("+" "-" "*" "/" "^" ".." "==" "<" ">" "<=" ">=" "~=") t)
+;; "\\)"
+;; "\\s *\\=")))
+
+;; (defun lua-calculate-indentation (&optional parse-start)
+;; "Overwrites the default lua-mode function that calculates the
+;; column to which the current line should be indented to."
+;; (save-excursion
+;; (when parse-start
+;; (goto-char parse-start))
+
+;; ;; We calculate the indentation column depending on the previous
+;; ;; non-blank, non-comment code line. Also, when the current line
+;; ;; is a continuation of that previous line, we add one additional
+;; ;; unit of indentation.
+;; (+ (if (lua-is-continuing-statement-p) lua-indent-level 0)
+;; (if (lua-goto-nonblank-previous-line)
+;; (+ (current-indentation) (lua-calculate-indentation-right-shift-next))
+;; 0))))
+
+;; (defun lua-calculate-indentation-right-shift-next (&optional parse-start)
View
@@ -11,6 +11,7 @@
(load "defunkt/coffee")
(load "defunkt/markdown")
(load "defunkt/css")
+(load "defunkt/lua")
;; all modes
(add-hook 'before-save-hook 'delete-trailing-whitespace)
Oops, something went wrong.

0 comments on commit 6fd3cd4

Please sign in to comment.