Compare commits

...

3 Commits

Author SHA1 Message Date
Rodney
0e5cf0a52b update init.lua 2025-07-16 14:02:13 -04:00
Rodney
c5884fdcd6 update init.lua 2025-07-16 13:43:11 -04:00
Rodney
c3a48abd86 update init.lua 2025-07-16 13:34:02 -04:00
4 changed files with 213 additions and 6 deletions

View File

@@ -895,6 +895,39 @@ require('lazy').setup({
-- By default, you may press `<c-space>` to show the documentation.
-- Optionally, set `auto_show = true` to show the documentation after a delay.
documentation = { auto_show = false, auto_show_delay_ms = 500 },
menu = {
draw = {
components = {
-- customize the drawing of kind icons
kind_icon = {
text = function(ctx)
-- default kind icon
local icon = ctx.kind_icon
-- if LSP source, check for color derived from documentation
if ctx.item.source_name == "LSP" then
local color_item = require("nvim-highlight-colors").format(ctx.item.documentation, { kind = ctx.kind })
if color_item and color_item.abbr ~= "" then
icon = color_item.abbr
end
end
return icon .. ctx.icon_gap
end,
highlight = function(ctx)
-- default highlight group
local highlight = "BlinkCmpKind" .. ctx.kind
-- if LSP source, check for color derived from documentation
if ctx.item.source_name == "LSP" then
local color_item = require("nvim-highlight-colors").format(ctx.item.documentation, { kind = ctx.kind })
if color_item and color_item.abbr_hl_group then
highlight = color_item.abbr_hl_group
end
end
return highlight
end,
},
},
},
},
},
sources = {

View File

@@ -1,5 +1,67 @@
return {
{
'brenoprata10/nvim-highlight-colors'
'brenoprata10/nvim-highlight-colors',
opts = {
---Render style
---@usage 'background'|'foreground'|'virtual'
render = 'background',
---Set virtual symbol (requires render to be set to 'virtual')
virtual_symbol = '',
---Set virtual symbol suffix (defaults to '')
virtual_symbol_prefix = '',
---Set virtual symbol suffix (defaults to ' ')
virtual_symbol_suffix = ' ',
---Set virtual symbol position()
---@usage 'inline'|'eol'|'eow'
---inline mimics VS Code style
---eol stands for `end of column` - Recommended to set `virtual_symbol_suffix = ''` when used.
---eow stands for `end of word` - Recommended to set `virtual_symbol_prefix = ' ' and virtual_symbol_suffix = ''` when used.
virtual_symbol_position = 'inline',
---Highlight hex colors, e.g. '#FFFFFF'
enable_hex = true,
---Highlight short hex colors e.g. '#fff'
enable_short_hex = true,
---Highlight rgb colors, e.g. 'rgb(0 0 0)'
enable_rgb = true,
---Highlight hsl colors, e.g. 'hsl(150deg 30% 40%)'
enable_hsl = true,
---Highlight ansi colors, e.g '\033[0;34m'
enable_ansi = true,
-- Highlight hsl colors without function, e.g. '--foreground: 0 69% 69%;'
enable_hsl_without_function = true,
---Highlight CSS variables, e.g. 'var(--testing-color)'
enable_var_usage = true,
---Highlight named colors, e.g. 'green'
enable_named_colors = true,
---Highlight tailwind colors, e.g. 'bg-blue-500'
enable_tailwind = true,
---Set custom colors
---Label must be properly escaped with '%' to adhere to `string.gmatch`
--- :help string.gmatch
custom_colors = {
{ label = '%-%-theme%-primary%-color', color = '#0f1219' },
{ label = '%-%-theme%-secondary%-color', color = '#5a5d64' },
},
-- Exclude filetypes or buftypes from highlighting e.g. 'exclude_buftypes = {'text'}'
exclude_filetypes = {},
exclude_buftypes = {},
-- Exclude buffer from highlighting e.g. 'exclude_buffer = function(bufnr) return vim.fn.getfsize(vim.api.nvim_buf_get_name(bufnr)) > 1000000 end'
exclude_buffer = function(bufnr) end
},
},
}

View File

@@ -4,12 +4,13 @@
-- See the kickstart.nvim README for more information
-- local job_id = 0
-- vim.g.termguicolors = true
return {
-- vim.opt_local.shiftwidth = 2
-- vim.opt.clipboard = 'unnamedplus'
-- vim.opt_local.number = true
-- vim.opt_local.relativenummber = true
-- vim.g.python3_host_prog = vim.fs.joinpatth(vim.fn.stdpath('config'), '.pynvim/bin/python'),
vim.api.nvim_set_option_value('shiftwidth', 2, { scope = 'local' }),
vim.api.nvim_set_option_value('number', true, { scope = 'local' }),
-- vim.api.nvim_set_option_value('relativenumber', true, { scope = 'local' }),
vim.api.nvim_set_option_value('termguicolors', true, { scope = 'global' }),
-- vim.api.nvim_set_option_value('clipboard', 'unnamedplus', { scope = 'global' }),
vim.api.nvim_set_var('python3_host_prog', vim.fs.joinpath(vim.fn.stdpath 'config', '.pynvim/bin/python')),
vim.keymap.set('n', '<space>rf', '<cmd>source %<CR>', { desc = '[R]eload [F]ile' }),

View File

@@ -0,0 +1,111 @@
return {
{
'swaits/universal-clipboard.nvim',
opts = {
-- Whether to log stuff to the vim console
verbose = false,
-- Copy/paste tools to check for
tools = {
-- macOS clipboard
{
name = "pbcopy",
detect = function()
return vim.fn.executable("pbcopy") == 1 and vim.fn.executable("pbpaste") == 1
end,
commands = {
copy = "pbcopy",
paste = "pbpaste",
},
},
-- Wayland and wl-copy/wl-paste
{
name = "wl-clipboard",
detect = function()
local wayland_display = os.getenv("WAYLAND_DISPLAY")
local wayland_runtime = os.getenv("XDG_RUNTIME_DIR")
local socket_path = (wayland_runtime or "") .. "/" .. (wayland_display or "")
return (vim.fn.executable("wl-copy") == 1)
and (vim.fn.executable("wl-paste") == 1)
and wayland_display ~= ""
and (vim.fn.filereadable(socket_path) == 1)
end,
commands = {
copy = "wl-copy",
paste = "wl-paste --no-newline",
},
},
-- Alternative Wayland tools
{
name = "waycopy",
detect = function()
local wayland_display = os.getenv("WAYLAND_DISPLAY")
return vim.fn.executable("waycopy") == 1
and vim.fn.executable("waypaste") == 1
and wayland_display ~= nil
end,
commands = {
copy = "waycopy",
paste = "waypaste --no-newline",
},
},
-- X11 and xclip
{
name = "xclip",
detect = "xclip", -- Just a string, means "check if `xclip` is executable"
commands = {
copy = "xclip -selection clipboard",
paste = "xclip -selection clipboard -o",
},
},
-- X11 and xsel
{
name = "xsel",
detect = "xsel",
commands = {
copy = "xsel --clipboard --input",
paste = "xsel --clipboard --output",
},
},
-- tmux clipboard
{
name = "tmux",
detect = function()
return os.getenv("TMUX") ~= nil and vim.fn.executable("tmux") == 1
end,
commands = {
copy = "tmux load-buffer -",
paste = "tmux save-buffer -",
},
},
-- Lemonade (SSH)
{
name = "lemonade",
detect = "lemonade",
commands = {
copy = "lemonade copy",
paste = "lemonade paste",
},
},
-- DoIt client (SSH)
{
name = "doitclient",
detect = "doitclient",
commands = {
copy = "doitclient wclip",
paste = "doitclient rclip",
},
},
-- Windows win32yank
{
name = "win32yank",
detect = "win32yank.exe",
commands = {
copy = "win32yank.exe -i --crlf",
paste = "win32yank.exe -o --lf",
},
},
},
},
},
}