This file contains hidden or 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
| -- light | |
| local style = require "core.style" | |
| local common = require "core.common" | |
| local NIGHT_MODE_INTENSITY = 30 -- [0, 1, ... 100] | |
| local function clamp(min, max, value) | |
| return math.max(min, math.min(max, value)) | |
| end |
This file contains hidden or 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
| -- mod-version:3 | |
| local core = require "core" | |
| local command = require "core.command" | |
| local keymap = require "core.keymap" | |
| ------------------- | |
| -- Configuration -- | |
| ------------------- |
This file contains hidden or 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
| ## | |
| PersistentVector | |
| 32-way persistent vector, equivalent to Clojure's PersistentVector. | |
| Public API: | |
| Instantiation: | |
| let vec = PersistentVector.empty() |
This file contains hidden or 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
| --[[ | |
| -- =========== | |
| -- Usage | |
| -- =========== | |
| local F = require("frequration") | |
| -- Full list of avaliable constructors can be found in the source code. | |
| F.register_globals() | |
| -- ====================================================== |
This file contains hidden or 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
| pp = function(t) | |
| print("{ " .. table.concat(t, ", ") .. " }") | |
| end | |
| a = function() return 1, 2 end | |
| b = function() return 11, 12 end | |
| pp { a(), b(), "why?"} -- { 1, 11, "why?" } |
This file contains hidden or 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
| local function unzip(input_path) | |
| -- Open the archive file for reading | |
| local archive_file = io.open(input_path, "r") | |
| if not archive_file then | |
| error("Could not open file: " .. input_path) | |
| end | |
| local current_file = nil | |
| local current_content = {} |
This file contains hidden or 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
| [16] # Version number. Do not delete. | |
| # Based on the original Lite Light theme: | |
| # https://github.com/pragtical/colors/blob/master/colors/lite-light.lua | |
| [colors] | |
| background0: F5F5F5FF | |
| background1: E0E0E0FF | |
| background2: E0E0E0FF | |
| background3: E0E0E0FF |
This file contains hidden or 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
| ------------------ | |
| -- Basic Syntax -- | |
| ------------------ | |
| if condition | |
| do_something! | |
| do_another_thing! | |
| else | |
| do_different_thing! |
This file contains hidden or 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
| -- mod-version:3 | |
| local syntax = require "core.syntax" | |
| --[[ | |
| Here is the list of all pattern types which could be used in themes: | |
| normal | |
| symbol | |
| comment | |
| keyword |
This file contains hidden or 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
| package main | |
| import "core:fmt" | |
| States :: enum { | |
| initial, | |
| state_1, | |
| state_final, | |
| } |
NewerOlder