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
vim.api.nvim_create_autocmd({ "TextYankPost" }, { | |
pattern = "term://*", | |
callback = function() | |
local width = vim.api.nvim_win_get_width(0) - 2 | |
local offset = vim.api.nvim_win_get_cursor(0)[2] | |
local yanked_text = vim.fn.getreg("+") | |
local new_str = "" | |
local count = 1 | |
while true do | |
local next_index = string.find(yanked_text, "\n", count) |
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
htmx.defineExtension("hx-astro-view-transition", { | |
onEvent: function (name, evt: any) { | |
if (name === "htmx:afterRequest") { | |
const attributes = evt.target.attributes; | |
const viewTransitionTarget = | |
attributes["hx-view-transition"]?.value; | |
if (!viewTransitionTarget) { | |
console.log(evt); | |
return; | |
} |
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 * as fs from "fs"; | |
import * as glob from "glob"; | |
const routes = glob.globSync("**/app/**/route.ts", {}); | |
const constDef: string[] = []; | |
const typeDef: string[] = []; | |
const routeTypes: string[] = []; | |
function toConstDef(varName: string, path: string): string { |