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
local luasnip = require("luasnip") | |
local fzf_lua = require("fzf-lua") | |
local function search_snippets() | |
-- Get available snippets | |
local snippets = luasnip.available() | |
-- Flatten the snippets table and prepare entries for fzf-lua | |
local entries = {} | |
for category, snippet_list in pairs(snippets) do |
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
local Job = require("plenary.job") | |
local Popup = require("nui.popup") | |
-- Function to calculate popup height based on message length | |
local function calculate_popup_height(message) | |
local lines = vim.split(message, "\n") | |
local line_count = #lines | |
return math.min(line_count + 2, 50) -- max 50 lines long | |
end |
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
\pset tuples_only on | |
SELECT 'WARNING: Instance shutdown triggered, rebooting in 3 seconds ...' ; | |
SELECT 'Press CTRL-ALT-9 + CTRL-ALT-5 to abort' ; | |
SELECT pg_sleep(3); | |
SELECT 'Just joking ;)' ; | |
\pset tuples_only off |