Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
1,185 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.