diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a97561b..1816d24 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -320,6 +320,12 @@ integration-test-oni-json: - package 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: stage: integration-test dependencies: diff --git a/oni-lua.el b/oni-lua.el new file mode 100644 index 0000000..53c6ce1 --- /dev/null +++ b/oni-lua.el @@ -0,0 +1,34 @@ +;;; oni-lua.el --- Configuration for programming in Lua -*- lexical-binding: t; -*- + +;; Copyright (C) 2020 Tom Willemse + +;; Author: Tom Willemse +;; 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 . + +;;; 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 diff --git a/test/integration/oni-lua.bats b/test/integration/oni-lua.bats new file mode 100755 index 0000000..4040518 --- /dev/null +++ b/test/integration/oni-lua.bats @@ -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" ]] +}