This file contains hidden or 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
| ---------------------------------------------------- | |
| -- text-case | |
| -- https://github.com/johmsalas/text-case.nvim#setup | |
| ---------------------------------------------------- | |
| vim.pack.add({ | |
| "https://github.com/johmsalas/text-case.nvim", | |
| }) | |
| local textcase = require("textcase") |
This file contains hidden or 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
| -- 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 |
This file contains hidden or 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
| -- 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 |
This file contains hidden or 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
| -- save in lua/auto_calculate.lua | |
| -- load in your init file with `require("auto_calculate")` | |
| -- Shows math expression results as virtual text at the end of each line. | |
| -- Works in markdown files. | |
| -- | |
| -- Example: | |
| -- "2 * (20 + 1)" → displays "= 42" | |
| -- "- 100 / 3" → displays "= 33.333333" (markdown list item) | |
| -- "3 + cos(3)" → displays "= 2.0100075" (using sandboxed math functions) | |
| -- "hello world" → no virtual text (not a math expression) |
This file contains hidden or 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
| -- automatically reload configuration on change | |
| hs.loadSpoon("ReloadConfiguration") | |
| spoon.ReloadConfiguration:start() | |
| -- cmd + alt + v types the clipboard contents as keystrokes | |
| hs.hotkey.bind({ "cmd", "alt" }, "V", function() | |
| hs.eventtap.keyStrokes(hs.pasteboard.getContents()) | |
| end) | |
| -- move windows like Rectangle app using https://www.hammerspoon.org/Spoons/WindowHalfsAndThirds.html |
This file contains hidden or 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
| -- real-estate.nvim | |
| -- Plugin para visualizar qué teclas están ocupadas/libres en tus keymaps | |
| local M = {} | |
| -------------------------------------------------------------------------------- | |
| -- LAYOUTS: Distribución de teclas por modo | |
| -- Cada fila es un string, las teclas especiales van entre < > | |
| -------------------------------------------------------------------------------- | |
| M.layouts = { |
This file contains hidden or 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
| ----------------------------------------------------------------- | |
| -- Neovim commands to simplify context creation in markdown files | |
| -- | |
| -- Save as: lua/context.lua | |
| -- | |
| -- How to use: require("_context").setup() | |
| -- | |
| ----------------------------------------------------------------- | |
| local M = {} |
This file contains hidden or 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
| { | |
| "permissions": { | |
| "allow": [ | |
| "Bash(php artisan make:migration:*)", | |
| "Bash(php artisan:*)", | |
| "Bash(find:*)", | |
| "Bash(grep:*)", | |
| "Bash(docker compose exec:*)", | |
| "Bash(mkdir:*)", | |
| "Bash(php:*)", |
This file contains hidden or 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
| # Git branch cleanup function for zsh | |
| git_cleanup_merged_branches() { | |
| # Require main branch parameter | |
| if [[ -z "$1" ]]; then | |
| echo "Usage: git_cleanup_merged_branches <main-branch>" | |
| return 1 | |
| fi | |
| local main_branch="$1" | |
| # Check if we're currently on the main branch - must be on main to see what's merged into it |
This file contains hidden or 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
| -- Command to dictate in Neovim with hear | |
| -- Usage: :Hear | |
| -- https://github.com/sveinbjornt/hear | |
| vim.api.nvim_create_user_command("Hear", function() | |
| -- Save current buffer and cursor position | |
| local original_buf = vim.api.nvim_get_current_buf() | |
| local original_win = vim.api.nvim_get_current_win() | |
| local cursor_pos = vim.api.nvim_win_get_cursor(original_win) | |
| -- Create temporary buffer for terminal | |
| local buf = vim.api.nvim_create_buf(false, true) |
NewerOlder