Skip to content

Instantly share code, notes, and snippets.

View delphinus's full-sized avatar

JINNOUCHI Yasushi delphinus

View GitHub Profile
@delphinus
delphinus / demo_kitty.lua
Last active April 20, 2026 15:13
md-render.nvim: Kitty Graphics Protocol で画像を表示する最小デモ
-- demo_kitty.lua
-- Kitty Graphics Protocol で画像を表示する最小デモ
-- md-render.nvim の image モジュールを使用
--
-- 使い方: Kitty / WezTerm / Ghostty 上で
-- nvim -u NONE -l demo_kitty.lua /path/to/image.png
--
-- md-render.nvim が runtimepath に無い場合はパスを指定:
-- nvim -u NONE --cmd 'set rtp+=~/.local/share/nvim/lazy/md-render.nvim' -l demo_kitty.lua /path/to/image.png

nvim-treesitter がアーカイブされた理由

直接のきっかけ

メンテナーの clason 氏がユーザーとの衝突を経て、自らリポジトリをアーカイブしたのが直接の原因。

GitHub Discussion #8627 で以下のやり取りがあった:

  1. Neovim 0.12 リリース当日(2026-04-03)に nvim-treesitter が 0.11 サポートを打ち切った。ユーザー shushtain 氏が「0.12 リリース初日に 0.11 を切るのは酷い。せめて猶予期間を」と指摘。
  2. clason 氏が反論:「このプラグインは公式に 0.12 を要求している。README を読まない人が issue や PR を開き続けるから、0.11 をハードエラーにせざるを得なかった。あなたのような人が "insane burden" だ」と発言。
@delphinus
delphinus / term.lua
Last active March 19, 2025 07:30
Useful mappings moving around Neovim terminal buffers
vim.keymap.set("n", "<A-j>", "<C-w>w", { desc = "時計回りにウィンドウ間を移動する" })
vim.keymap.set("n", "<A-k>", "<C-w>W", { desc = "反時計回りにウィンドウ間を移動する" })
vim.keymap.set("t", "<A-j>", [[<C-\><C-n><C-w>w]], { desc = "時計回りにウィンドウ間を移動する" })
vim.keymap.set("t", "<A-k>", [[<C-\><C-n><C-w>W]], { desc = "反時計回りにウィンドウ間を移動する" })
vim.keymap.set("n", "<A-o>", [[<C-w>o]], { desc = "他のウィンドウを全部消す" })
vim.keymap.set("t", "<A-o>", [[<C-\><C-n><C-w>oi]], { desc = "他のウィンドウを全部消す" })
vim.keymap.set("n", "<A-->", [[<C-w>_]], { desc = "ウィンドウの高さを最大化する" })
vim.keymap.set("t", "<A-->", [[<C-\><C-n><C-w>_i]], { desc = "ウィンドウの高さを最大化する" })
vim.keymap.set("t", "<A-r>", function()
return [[<C-\><C-n>]] .. vim.fn.nr2char(vim.fn.getchar()) .. "pi"
@delphinus
delphinus / config.fish
Last active February 17, 2025 13:01
Notify when slow commands finished in background (v2)
set -gx NOTIFY_ON_COMMAND_DURATION 5000
function fish_right_prompt
set -f check_neovim
if test -n "$CMD_DURATION"; and test $CMD_DURATION -gt $NOTIFY_ON_COMMAND_DURATION
if type -q wezterm; and test -n "$WEZTERM_PANE"
set -l active_pid (osascript -e 'tell application "System Events" to get the unix id of first process whose frontmost is true')
set -l active_pane (wezterm cli list-clients | perl -anle 'print $F[$#F] if $F[2] == '$active_pid)
if test -n "$active_pane"; and test $WEZTERM_PANE -eq $active_pane
set -f check_neovim 1
end
@delphinus
delphinus / bench-nvim.pl
Last active December 18, 2024 04:17
Alternative vim-startuptime
#!/usr/bin/env perl
=head1 DESCRIPTION
Alternative vim-startuptime
=head1 SYNOPSIS
bench-nvim
# Run nvim 10 times after 1 warmup
@delphinus
delphinus / lazy_semver.lua
Created December 10, 2024 08:33
Check semver in lazy.nvim
vim.api.nvim_create_user_command("LazySemver", function(opts)
if #opts.fargs ~= 2 then
vim.notify("needs 2 args: spec and version", vim.log.levels.ERROR)
return
end
local sv = require("lazy.manage.semver")
local matched = sv.range(opts.fargs[1]):matches(opts.fargs[2])
vim.notify(matched and "OK" or "NG", vim.log.levels[matched and "info" or "WARN"])
end, { nargs = "*" })
@delphinus
delphinus / config.fish
Last active June 30, 2025 03:05
Notify when slow commands finished in background
set -gx NOTIFY_ON_COMMAND_DURATION 5000
function fish_right_prompt
set -f check_neovim
if test -n "$CMD_DURATION"; and test $CMD_DURATION -gt $NOTIFY_ON_COMMAND_DURATION
if type -q wezterm; and test -n "$WEZTERM_PANE"
set -l active_pid (osascript -e 'tell application "System Events" to get the unix id of first process whose frontmost is true')
set -l active_pane (wezterm cli list-clients --format json | /usr/bin/ruby -r json -e 'puts JSON.parse($<.read).find{|x|x["pid"]=='$active_pid'}&.[]"focused_pane_id"')
if test -n "$active_pane"; and test $WEZTERM_PANE -eq $active_pane
set -f check_neovim 1
end
@delphinus
delphinus / telescope-kensaku.lua
Created April 27, 2024 04:03
ローマ字で :Telescope live_grep する
require("telescope.builtin").live_grep {
---@param prompt string
---@return { prompt?: string, updated_finder?: TelescopeFinder }
on_input_filter_cb = function(prompt)
return {
prompt = vim.fn["kensaku#query"](prompt, {
rxop = vim.g["kensaku#rxop#javascript"],
}),
}
end,
@delphinus
delphinus / lua-ls-lint.sh
Last active July 28, 2023 09:22
Dump diagnostics from lua-language-server with errorformat
#!/bin/bash
DIR=${1:-lua}
TMP=$(mktemp -d)
lua-language-server --check "$DIR" --configpath "$PWD/.luarc.json" --logpath "$TMP"
RESULT="$TMP/check.json"
if [[ -r $RESULT ]]; then
jq --arg pwd "$PWD" -r '
to_entries[] |
(.key | gsub("^file://\($pwd)/"; "")) as $filename |
.value[] |
# syntax = docker/dockerfile:1.3-labs
FROM ubuntu:latest
RUN yes | unminimize
RUN apt-get update && apt-get install -y tzdata
# https://sleepless-se.net/2018/07/31/docker-build-tzdata-ubuntu/
ENV TZ=Asia/Tokyo
RUN apt-get install -y ninja-build gettext libtool libtool-bin autoconf automake cmake g++ \
pkg-config unzip git man-db libsqlite3-dev \