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 June 26, 2024 08:42
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)
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",
@datawookie
datawookie / unicode symbols
Last active June 17, 2024 12:20
Useful Unicode characters
https://github.com/muan/unicode-emoji-json
° — degree
× — times
🇿🇦
🇬🇧
🛜 — wireless
🔗 — link
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active June 27, 2024 01:08
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 June 28, 2024 21:11
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