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
local cmp = require('cmp') | |
local lspkind = require('lspkind') | |
--- Function to preview snippet before completion with nvim-cmp | |
---@param entry cmp.Entry | |
---@param vim_item vim.CompletedItem | |
---@return vim.CompletedItem | |
function CmpBefore(entry, vim_item) | |
if entry.completion_item.snippet then | |
local snippet_value = entry.completion_item.snippet.value |
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
#!/bin/bash | |
usage() { | |
echo "Usage: ghcp [--stdout] <file_path> [line_number]" | |
exit 1 | |
} | |
# Initialize variables | |
STDOUT=false |