updates :3

This commit is contained in:
zack 2024-11-23 18:12:57 -05:00
parent 5eec7f512f
commit b61ff7e2f4
No known key found for this signature in database
GPG key ID: 5F873416BCF59F35
15 changed files with 488 additions and 456 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

View file

@ -25,7 +25,8 @@
"lazyvim.plugins.extras.test.core",
"lazyvim.plugins.extras.util.dot",
"lazyvim.plugins.extras.util.mini-hipatterns",
"lazyvim.plugins.extras.coding.luasnip"
"lazyvim.plugins.extras.coding.luasnip",
"lazyvim.plugins.extras.coding.blink"
],
"news": {
"NEWS.md": "6520"

View file

@ -119,3 +119,4 @@ end
-- Set up the keybinding (you can modify this to your preferred key combination)
vim.keymap.set("n", "<leader>zc", create_gist, { noremap = true, silent = true, expr = true })
vim.keymap.set("n", "<leader>T", "<cmd>TimerlyToggle<CR>", { noremap = true })

View file

@ -7,97 +7,7 @@ return {
},
},
"f-person/git-blame.nvim",
{
"3rd/image.nvim",
build = false,
lazy = false,
config = function()
require("image").setup({
backend = "kitty",
kitty_method = "normal",
processor = "magick_cli",
integrations = {
markdown = {
enabled = true,
},
},
})
end,
},
{
"nvimdev/dashboard-nvim",
event = "VimEnter",
lazy = true,
opts = function()
local logo = ""
logo = string.rep("\n", 12) .. logo .. "\n\n"
local opts = {
theme = "hyper",
hide = {
statusline = true,
},
config = {
header = vim.split(logo, "\n"),
shortcut = {
{
desc = "Find File",
action = "lua LazyVim.pick()()",
key = "f",
},
{
desc = "New File",
action = "ene | startinsert",
key = "n",
},
{
desc = "Lazy",
action = "Lazy",
icon = "󰒲 ",
key = "l",
},
{
desc = "Quit",
action = function()
vim.api.nvim_input("<cmd>qa<cr>")
end,
key = "q",
},
},
packages = { enable = true }, -- show how many plugins neovim loaded
project = { enable = true, limit = 8 },
mru = { limit = 10 },
},
}
-- Handle reopening dashboard after closing lazy
if vim.o.filetype == "lazy" then
vim.api.nvim_create_autocmd("WinClosed", {
pattern = tostring(vim.api.nvim_get_current_win()),
once = true,
callback = function()
vim.schedule(function()
vim.api.nvim_exec_autocmds("UIEnter", { group = "dashboard" })
end)
end,
})
end
return opts
end,
},
{ "nvim-lualine/lualine.nvim", enabled = false },
-- {
-- "nvim-neorg/neorg",
-- lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default
-- version = "*", -- Pin Neorg to the latest stable release
-- config = true,
-- opts = {
-- load = {
-- ["core.defaults"] = {},
-- ["core.concealer"] = {},
-- },
-- },
-- },
{ "echasnovski/mini.statusline", opts = {} },
{
"stevearc/conform.nvim",
@ -108,10 +18,16 @@ return {
typescriptreact = { "prettierd" },
javascriptreact = { "prettierd" },
javascript = { "prettierd" },
htmlangular = { "prettierd" },
},
},
},
{ "hrsh7th/nvim-cmp", enabled = false },
{
"saghen/blink.cmp",
opts = {
nerd_font_variant = "normal",
},
},
{
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
@ -137,76 +53,10 @@ return {
require("force-cul").setup()
end,
},
{
"saghen/blink.cmp",
lazy = false, -- lazy loading handled internally
-- optional: provides snippets for the snippet source
dependencies = { "rafamadriz/friendly-snippets", "saghen/blink.compat" },
build = "cargo build --release",
sources = {
completion = {
enabled_providers = { "lsp", "path", "snippets", "buffer", "dadbod", "crates" },
},
providers = {
dadbod = {
name = "vim-dadbod-completion",
module = "blink.compat",
opts = {},
},
crates = {
name = "crates",
module = "blink.compat",
opts = {},
},
},
},
---@module 'blink.cmp'
---@type blink.cmp.Config
opts = {
keymap = {
["<C-b>"] = { "scroll_documentation_down", "fallback" },
["<C-f>"] = { "scroll_documentation_up", "fallback" },
["<C-p>"] = { "select_prev", "fallback" },
["<C-n>"] = { "select_next", "fallback" },
["<C-space>"] = { "show", "show_documentation", "hide_documentation" },
["<CR>"] = {
function(cmp)
if cmp.is_in_snippet() then
return cmp.accept()
else
return cmp.select_and_accept()
end
end,
"snippet_forward",
"fallback",
},
},
windows = {
documentation = {
auto_show = true,
},
},
highlight = {
-- sets the fallback highlight groups to nvim-cmp's highlight groups
-- useful for when your theme doesn't support blink.cmp
-- will be removed in a future release, assuming themes add support
use_nvim_cmp_as_default = true,
},
-- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
-- adjusts spacing to ensure icons are aligned
nerd_font_variant = "normal",
-- experimental auto-brackets support
-- accept = { auto_brackets = { enabled = true } }
-- experimental signature help support
-- trigger = { signature_help = { enabled = true } }
},
},
-- {
-- "supermaven-inc/supermaven-nvim",
-- config = function()
-- require("supermaven-nvim").setup({})
-- end,
-- },
}

View file

@ -0,0 +1,5 @@
return {
"nvzone/volt",
{ "nvzone/timerly", cmd = "TimerlyToggle" },
{ "nvzone/showkeys", cmd = "ShowkeysToggle" },
}

View file

@ -139,89 +139,6 @@ in {
vim.opt.rtp:prepend(lazypath)
require('config.lazy')
local dashboardImage = vim.api.nvim_create_augroup("DashboardImage", { clear = true })
local img = require("image").from_file("${./NeoVim.png}")
local is_visible = false
-- Known image dimensions
local IMG_WIDTH = 50 -- characters
local IMG_HEIGHT = 14 -- lines
-- Debug notification function
local function debug_notify(message)
-- vim.notify(message, vim.log.levels.INFO)
end
-- Function to calculate centered position
local function center_image()
local win_width = vim.o.columns
local win_height = vim.o.lines
local x = math.floor((win_width - IMG_WIDTH) / 2)
local y = math.floor((win_height - IMG_HEIGHT) / 6)
return math.max(0, x), math.max(0, y)
end
-- Function to update image position
local function update_image()
debug_notify("Attempting to update image. is_visible = " .. tostring(is_visible))
if is_visible then
local x, y = center_image()
debug_notify("Positioning image at x=" .. x .. ", y=" .. y)
img:clear()
img:render()
img:move(x, y)
end
end
-- Show image on both VimEnter and when dashboard buffer is created
vim.api.nvim_create_autocmd({ "VimEnter", "BufWinEnter", "BufEnter" }, {
group = dashboardImage,
callback = function(ev)
local filetype = vim.api.nvim_buf_get_option(ev.buf, "filetype")
debug_notify("Event triggered: " .. ev.event .. ", filetype: " .. filetype)
if filetype == "dashboard" then
debug_notify("Dashboard detected, setting visible")
is_visible = true
vim.schedule(update_image)
end
end,
})
-- Handle window resize
vim.api.nvim_create_autocmd("VimResized", {
group = dashboardImage,
callback = function()
debug_notify("Window resized")
update_image()
end,
})
-- Clear image when leaving dashboard
vim.api.nvim_create_autocmd("BufLeave", {
group = dashboardImage,
callback = function()
debug_notify("Leaving buffer")
is_visible = false
img:clear()
end,
})
-- Catch when returning to dashboard
vim.api.nvim_create_autocmd("FileType", {
group = dashboardImage,
pattern = "dashboard",
callback = function()
debug_notify("FileType dashboard detected")
is_visible = true
vim.schedule(update_image)
end,
})
-- Initial debug message
debug_notify("Dashboard image setup loaded")
'';
};