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
enum Option[+A]: | |
case Some(value: A) | |
case None | |
def map[B](f: A => B): Option[B] = this match | |
case None => None | |
case Some(value) => Some(f(value)) | |
def flatMap[B](f: A => Option[B]): Option[B] = this match | |
case None => None |
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
{ jdk ? "jdk11" }: | |
let | |
pkgs = import <nixpkgs> { inherit jdk; }; | |
in | |
pkgs.mkShell { | |
name = "indigo-shell"; | |
buildInputs = [ | |
pkgs.coursier |
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
import os, strformat, options | |
## Get the locations(paths) of a given `font` in a string | |
func getFontsDir(): seq[string] = | |
when defined(windows): | |
# TODO use winim to get Windows installation location | |
result = @[r"C:\Windows\Fonts\"] | |
elif defined(macosx): | |
result = @[r"/Library/Fonts"] | |
elif defined(linux): |
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
(module magic.plugin.snap | |
{autoload {snap snap}}) | |
(let [fzf (snap.get :consumer.fzf) | |
limit (snap.get :consumer.limit) | |
producer-file (snap.get :producer.ripgrep.file) | |
producer-jumplist (snap.get :producer.vim.jumplist) | |
producer-git (snap.get :producer.git.file) | |
producer-luv-file (snap.get :producer.luv.file) | |
producer-vimgrep (snap.get :producer.ripgrep.vimgrep) |
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
(module magic.init | |
{autoload {plugin magic.plugin | |
nvim aniseed.nvim}}) | |
;;; Introduction | |
;; Aniseed compiles this (and all other Fennel files under fnl) into the lua | |
;; directory. The init.lua file is configured to load this file when ready. | |
;; We'll use modules, macros and functions to define our configuration and |
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
local lspconfig = require'lspconfig' | |
local configs = require'lspconfig/configs' | |
local M = {} | |
M.setup = function() | |
-- Check if it's already defined for when reloading this file | |
if not lspconfig.ltex_ls then | |
configs.ltex_ls = { | |
default_config = { |
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
-- :version | |
-- NVIM v0.5.0-dev | |
-- Build type: RelWithDebInfo | |
-- LuaJIT 2.1.0-beta3 | |
local execute = vim.api.nvim_command | |
local fn = vim.fn | |
local cmd = vim.cmd | |
local g = vim.g |
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
{ pkgs ? import <nixpkgs> {} }: | |
with pkgs; | |
let | |
erlang = erlangR23; | |
elixir = elixir_1_11; | |
nodejs = nodejs-14_x; | |
inputs = [ |
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
{ pkgs ? import <nixpkgs> {} }: | |
with pkgs; | |
let inputs = [ | |
gleam | |
erlang | |
rebar3 | |
]; |
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
let vao = block: | |
var res: GLuint | |
glGenVertextArrays(1, addr res) | |
res | |
glBindVertextArray(vao) |