1
0
Fork 0

Add ‘oni-lua’

This commit is contained in:
Tom Willemse 2020-09-07 14:44:32 -07:00
parent 2e672668d9
commit 1e2b6678de
3 changed files with 51 additions and 0 deletions

View file

@ -320,6 +320,12 @@ integration-test-oni-json:
- package - package
script: make integration-test-oni-json TEST_ARCHIVE=$(realpath bin/) script: make integration-test-oni-json TEST_ARCHIVE=$(realpath bin/)
integration-test-oni-lua:
stage: integration-test
dependencies:
- package
script: make integration-test-oni-lua TEST_ARCHIVE=$(realpath bin/)
integration-test-oni-org: integration-test-oni-org:
stage: integration-test stage: integration-test
dependencies: dependencies:

34
oni-lua.el Normal file
View file

@ -0,0 +1,34 @@
;;; oni-lua.el --- Configuration for programming in Lua -*- lexical-binding: t; -*-
;; Copyright (C) 2020 Tom Willemse
;; Author: Tom Willemse <chelys@rincewind>
;; Keywords: local
;; Version: 2020.0906.130231
;; Package-Requires: (lua-mode rainbow-delimiters)
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; This is my configuration for working with Lua files.
;;; Code:
(add-hook 'lua-mode-hook 'rainbow-delimiters-mode)
;;;###autoload(with-eval-after-load 'lua-mode (require 'oni-lua))
(provide 'oni-lua)
;;; oni-lua.el ends here

11
test/integration/oni-lua.bats Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bats
@test "Opening a .lua file loads oni-lua" {
run emacs -batch -l package -f package-initialize \
-visit test.lua \
-eval "(prin1 (featurep 'oni-lua))"
echo "$output"
[[ "$output" == *"t" ]]
}