Skip to content

Instantly share code, notes, and snippets.

@eduardoarandah
eduardoarandah / markdown.lua
Created August 27, 2026 23:41
luasnip snippets to create forms in markdown, useful for agents
-- https://github.com/L3MON4D3/LuaSnip/blob/master/Examples/snippets.lua
-- extract functions from luasnips
local ls = require("luasnip")
local snippet = ls.snippet
local text_node = ls.text_node
local insert_node = ls.insert_node
local function_node = ls.function_node
local fmt = require("luasnip.extras.fmt").fmt
@eduardoarandah
eduardoarandah / .tmux.conf
Last active August 14, 2026 17:56
awesome tmux config
# ============================================================================
# NOTES
# ============================================================================
# Show help: prefix + ?
# ============================================================================
# CONFIG MANAGEMENT
# ============================================================================
@eduardoarandah
eduardoarandah / lsp_commands.lua
Created July 1, 2026 20:43
Useful neovim commands to control native LSP (Neovim 0.12+) :LspInfo, :LspRestart, :LspStop
-- User commands to control native LSP (Neovim 0.12+)
-- Replace :LspInfo, :LspRestart, :LspStop, etc. that used to be provided by nvim-lspconfig
--
-- :LspList → clients attached to the current buffer
-- :LspInfo → :checkhealth vim.lsp (the official replacement for LspInfo)
-- :LspLog → opens the LSP log in a new tab
-- :LspStop [name] → stops clients (! to force)
-- :LspStart → re-triggers autostart on the current buffer
-- :LspRestart [name] → restarts clients and re-attaches the buffers
-- :LspCapabilities → inspect the server's capabilities
@eduardoarandah
eduardoarandah / sql_commands.lua
Last active July 24, 2026 17:26
Sql commands for neovim
-- Comands:
--
-- SqlExecute: execute sql
-- SqlDescribe: describe a table
-- SqlShowIndexes: show indexes
-- SqlShowCreateTable: show create table
-- SqlShowTables: show all tables
-- SqlToCsv: From sql to csv
-- Executes a sql query, retuns result
@eduardoarandah
eduardoarandah / markdown_to_pdf.lua
Created June 3, 2026 13:12
neovim print to pdf using markdown
-- markdown_to_pdf.lua
-- Generates a PDF from a Markdown file in two steps:
-- 1. Markdown -> HTML with pandoc (with embedded CSS)
-- 2. HTML -> PDF with Google Chrome in headless mode
-- The intermediate HTML file is deleted at the end, leaving only the PDF.
--
-- Usage: :MarkdownToPDF (converts the current buffer)
-- :MarkdownToPDF path.md (converts the given file)
--
-- Requires Neovim 0.10+ (uses vim.system).
@eduardoarandah
eduardoarandah / commands.lua
Created May 12, 2026 22:03
Neovim command to Get work hours, read from markdown files in ./logs folder
-- Get work hours, read from markdown files in ./logs folder
--
-- example:
---
-- ---
-- date: 2026-05-12
-- summary: some work summary here
-- hours: 3
-- ---
-- usage: :GetWorkLogInLogFolder
@eduardoarandah
eduardoarandah / ascii_box.lua
Created April 26, 2026 20:24
neovim generate an ascii table around text
-- use:
--
-- require("ascii_box").setup()
local M = {}
--- Genera una tabla ASCII alrededor del texto dado
--- @param lines string[] Lista de líneas de texto
--- @return string[] Líneas con la caja ASCII
function M.make_box(lines)
-- Encontrar el ancho máximo para que todas las líneas encajen
@eduardoarandah
eduardoarandah / textcase.lua
Created April 22, 2026 17:42
neovim text-case improved
----------------------------------------------------
-- text-case
-- https://github.com/johmsalas/text-case.nvim#setup
----------------------------------------------------
vim.pack.add({
"https://github.com/johmsalas/text-case.nvim",
})
local textcase = require("textcase")
@eduardoarandah
eduardoarandah / tldr.lua
Last active April 16, 2026 17:52
Neovim plugin to browse tldr-pages cheatsheets directly from the editor
-- tldr.lua
-- Neovim command to browse tldr-pages cheatsheets directly from the editor
-- save as ~/.config/nvim/lua/tldr.lua
-- load with: require("tldr")
-- Commands:
-- :Tldr
-- :Tldr <topic>
vim.api.nvim_create_user_command("Tldr", function(args)
if args.args == "" then
@eduardoarandah
eduardoarandah / cht_sh.lua
Last active April 16, 2026 17:52
Neovim plugin to query cht.sh cheatsheets from within the editor
-- cht_sh.lua
-- Neovim command to query cht.sh cheatsheets from within the editor
-- save as ~/.config/nvim/lua/cht_sh.lua
-- load with: require("cht_sh")
-- Commands:
-- :Cht
-- :Cht <topic>
vim.api.nvim_create_user_command("Cht", function(args)
if args.args == "" then