Skip to content

Instantly share code, notes, and snippets.

View willothy's full-sized avatar

Will Hopkins willothy

View GitHub Profile
@MariaSolOs
MariaSolOs / builtin-compl.lua
Last active November 13, 2025 07:24
Built-in completion + snippet Neovim setup
---Utility for keymap creation.
---@param lhs string
---@param rhs string|function
---@param opts string|table
---@param mode? string|string[]
local function keymap(lhs, rhs, opts, mode)
opts = type(opts) == 'string' and { desc = opts }
or vim.tbl_extend('error', opts --[[@as table]], { buffer = bufnr })
mode = mode or 'n'
vim.keymap.set(mode, lhs, rhs, opts)
@mobily
mobily / intro.lua
Last active December 17, 2024 20:27
local n = require("nui-components")
local spinner_formats = require("nui-components.utils.spinner-formats")
local renderer = n.create_renderer({
width = 100,
height = 24,
})
local signal = n.create_signal({
active_tab = "tab-1",

introduction

inspired by a friend’s fledgling language design and motivated by the JeanHeyd Meneide RustConf Fiasco™ and improving the story for compile-time introspection, i decided i needed a place to spew the last year’s musings on variadic generics in Rust in one mighty, less-than-understandable catharsis.

i think somewhere in here is a considered and reasonable design, so that’s neat!

perhaps i’ll make this an RFC one day. probably not. you have my express permission to do that yourself.

variadic generics?

this nugget of language jargon encapsulates the idea that we might want to bind to an arbitrarily large list of generic parameters, all at once. there are many reasons to want to do this:

@datawookie
datawookie / unicode symbols
Last active November 9, 2025 09:50
Useful Unicode characters
https://github.com/muan/unicode-emoji-json
° — degree
× — times
🇿🇦
🇬🇧
🛜 — wireless
🔗 — link
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active November 2, 2025 23:00
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@fnky
fnky / ANSI.md
Last active November 16, 2025 20:16
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@betaboon
betaboon / refind-builder.py
Created July 8, 2018 22:59
refind-nixos-module
#! @python3@/bin/python3 -B
import argparse
import os
import os.path
import sys
import errno
import subprocess
import glob
import datetime
import shutil