Update lazyvim to v14

Removed a bunch of plugins that are no longer needed.
This commit is contained in:
2025-01-10 12:16:07 -05:00
parent 4fb33dac6a
commit aa39f326cc
13 changed files with 131 additions and 571 deletions

11
lua/plugins/blink.lua Normal file
View File

@@ -0,0 +1,11 @@
return {
"saghen/blink.cmp",
opts = {
completion = {
trigger = {
show_in_snippet = false,
},
},
keymap = { preset = "super-tab" },
},
}

View File

@@ -1,50 +0,0 @@
return {
"jackMort/ChatGPT.nvim",
event = "VeryLazy",
opts = {
api_key_cmd = "cat " .. os.getenv("HOME") .. "/.config/.openai-api-key",
popup_input = {
submit = "<C-s>",
},
openai_params = {
model = "gpt-4o",
},
openai_edit_params = {
model = "gpt-4o",
},
},
keys = {
{ "<leader>kc", "<cmd>ChatGPT<CR>", desc = "ChatGPT" },
{ "<leader>ke", "<cmd>ChatGPTEditWithInstruction<CR>", desc = "Edit with instruction", mode = { "n", "v" } },
{ "<leader>kg", "<cmd>ChatGPTRun grammar_correction<CR>", desc = "Grammar Correction", mode = { "n", "v" } },
{ "<leader>kt", "<cmd>ChatGPTRun translate<CR>", desc = "Translate", mode = { "n", "v" } },
{ "<leader>kk", "<cmd>ChatGPTRun keywords<CR>", desc = "Keywords", mode = { "n", "v" } },
{ "<leader>kd", "<cmd>ChatGPTRun docstring<CR>", desc = "Docstring", mode = { "n", "v" } },
{ "<leader>ka", "<cmd>ChatGPTRun add_tests<CR>", desc = "Add Tests", mode = { "n", "v" } },
{ "<leader>ko", "<cmd>ChatGPTRun optimize_code<CR>", desc = "Optimize Code", mode = { "n", "v" } },
{ "<leader>ks", "<cmd>ChatGPTRun summarize<CR>", desc = "Summarize", mode = { "n", "v" } },
{ "<leader>kf", "<cmd>ChatGPTRun fix_bugs<CR>", desc = "Fix Bugs", mode = { "n", "v" } },
{ "<leader>kx", "<cmd>ChatGPTRun explain_code<CR>", desc = "Explain Code", mode = { "n", "v" } },
{
"<leader>kl",
"<cmd>ChatGPTRun code_readability_analysis<CR>",
desc = "Code Readability Analysis",
mode = { "n", "v" },
},
},
dependencies = {
"MunifTanjim/nui.nvim",
"nvim-lua/plenary.nvim",
"folke/trouble.nvim",
"nvim-telescope/telescope.nvim",
{
"folke/which-key.nvim",
optional = true,
opts = {
spec = {
{ "<leader>k", group = "ChatGPT" },
},
},
},
},
}

13
lua/plugins/codesnap.lua Normal file
View File

@@ -0,0 +1,13 @@
return {
"mistricky/codesnap.nvim",
build = "make",
keys = {
{ "<leader>cp", "<cmd>CodeSnap<cr>", mode = "x", desc = "Save selected code snapshot into clipboard" },
{ "<leader>cP", "<cmd>CodeSnapSave<cr>", mode = "x", desc = "Save selected code snapshot in ~/Pictures" },
},
opts = {
save_path = "~/Pictures",
has_breadcrumbs = true,
bg_color = "#535c68",
},
}

View File

@@ -1,265 +0,0 @@
-- since this is just an example spec, don't actually load anything here and return an empty spec
-- stylua: ignore
if true then return {} end
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
--
-- In your plugin files, you can:
-- * add extra plugins
-- * disable/enabled LazyVim plugins
-- * override the configuration of LazyVim plugins
return {
-- add gruvbox
{ "ellisonleao/gruvbox.nvim" },
-- Configure LazyVim to load gruvbox
{
"LazyVim/LazyVim",
opts = {
colorscheme = "gruvbox",
},
},
-- change trouble config
{
"folke/trouble.nvim",
-- opts will be merged with the parent spec
opts = { use_diagnostic_signs = true },
},
-- disable trouble
{ "folke/trouble.nvim", enabled = false },
-- add symbols-outline
{
"simrat39/symbols-outline.nvim",
cmd = "SymbolsOutline",
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
config = true,
},
-- override nvim-cmp and add cmp-emoji
{
"hrsh7th/nvim-cmp",
dependencies = { "hrsh7th/cmp-emoji" },
---@param opts cmp.ConfigSchema
opts = function(_, opts)
table.insert(opts.sources, { name = "emoji" })
end,
},
-- change some telescope options and a keymap to browse plugin files
{
"nvim-telescope/telescope.nvim",
keys = {
-- add a keymap to browse plugin files
-- stylua: ignore
{
"<leader>fp",
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
desc = "Find Plugin File",
},
},
-- change some options
opts = {
defaults = {
layout_strategy = "horizontal",
layout_config = { prompt_position = "top" },
sorting_strategy = "ascending",
winblend = 0,
},
},
},
-- add telescope-fzf-native
{
"telescope.nvim",
dependencies = {
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
config = function()
require("telescope").load_extension("fzf")
end,
},
},
-- add pyright to lspconfig
{
"neovim/nvim-lspconfig",
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- pyright will be automatically installed with mason and loaded with lspconfig
pyright = {},
},
},
},
-- add tsserver and setup with typescript.nvim instead of lspconfig
{
"neovim/nvim-lspconfig",
dependencies = {
"jose-elias-alvarez/typescript.nvim",
init = function()
require("lazyvim.util").on_attach(function(_, buffer)
-- stylua: ignore
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
end)
end,
},
---@class PluginLspOpts
opts = {
---@type lspconfig.options
servers = {
-- tsserver will be automatically installed with mason and loaded with lspconfig
tsserver = {},
},
-- you can do any additional lsp server setup here
-- return true if you don't want this server to be setup with lspconfig
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
setup = {
-- example to setup with typescript.nvim
tsserver = function(_, opts)
require("typescript").setup({ server = opts })
return true
end,
-- Specify * to use this function as a fallback for any server
-- ["*"] = function(server, opts) end,
},
},
},
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
{ import = "lazyvim.plugins.extras.lang.typescript" },
-- add more treesitter parsers
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"bash",
"html",
"javascript",
"json",
"lua",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"tsx",
"typescript",
"vim",
"yaml",
},
},
},
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
-- would overwrite `ensure_installed` with the new value.
-- If you'd rather extend the default config, use the code below instead:
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- add tsx and treesitter
vim.list_extend(opts.ensure_installed, {
"tsx",
"typescript",
})
end,
},
-- the opts function can also be used to change the default opts:
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function(_, opts)
table.insert(opts.sections.lualine_x, "😄")
end,
},
-- or you can return new options to override all the defaults
{
"nvim-lualine/lualine.nvim",
event = "VeryLazy",
opts = function()
return {
--[[add your custom lualine config here]]
}
end,
},
-- use mini.starter instead of alpha
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
{ import = "lazyvim.plugins.extras.lang.json" },
-- add any tools you want to have installed below
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"stylua",
"shellcheck",
"shfmt",
"flake8",
},
},
},
-- Use <tab> for completion and snippets (supertab)
-- first: disable default <tab> and <s-tab> behavior in LuaSnip
{
"L3MON4D3/LuaSnip",
keys = function()
return {}
end,
},
-- then: setup supertab in cmp
{
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-emoji",
},
---@param opts cmp.ConfigSchema
opts = function(_, opts)
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local luasnip = require("luasnip")
local cmp = require("cmp")
opts.mapping = vim.tbl_extend("force", opts.mapping, {
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
-- this way you will only jump inside the snippet region
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
})
end,
},
}

View File

@@ -0,0 +1,8 @@
return {
"zeioth/garbage-day.nvim",
dependencies = "neovim/nvim-lspconfig",
event = "VeryLazy",
opts = {
-- your options here
},
}

View File

@@ -7,5 +7,13 @@ return {
filetypes = { "c", "cpp", "objc", "objcpp", "cuda" },
},
},
-- Disable eslint formatting as it's slow and timing out on big projects
-- taken from
-- https://github.com/LazyVim/LazyVim/pull/4225/files
setup = {
eslint = function()
return
end,
},
},
}

View File

@@ -1,7 +0,0 @@
-- Disable <tab> and <s-tab> behavior in luasnip for supertab: https://www.lazyvim.org/configuration/recipes#supertab
return {
"L3MON4D3/LuaSnip",
keys = function()
return {}
end,
}

View File

@@ -1,83 +0,0 @@
-- Configure nvim-cmp with "supertab"-like behavior for LuaSnip integration: https://www.lazyvim.org/configuration/recipes#supertab
-- Also, prevent autocomplete from automatically selecting the first item in the list on <CR>, and instead require the user to press <Tab> to select the first item.
return {
"hrsh7th/nvim-cmp",
dependencies = {
"hrsh7th/cmp-calc",
"hrsh7th/cmp-emoji",
"hrsh7th/cmp-cmdline",
"petertriho/cmp-git",
},
---@param opts cmp.ConfigSchema
opts = function(_, opts)
local has_words_before = function()
unpack = unpack or table.unpack
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
end
local luasnip = require("luasnip")
local cmp = require("cmp")
opts.mapping = vim.tbl_extend("force", opts.mapping, {
["<Tab>"] = cmp.mapping(function(fallback)
-- This bit is for preventing auto-completion auto-triggering from copilot-cmp:
-- https://github.com/zbirenbaum/copilot-cmp?tab=readme-ov-file#tab-completion-configuration-highly-recommended
if cmp.visible() and has_words_before() then
-- You could replace select_next_item() with confirm({ select = true }) to get VS Code autocompletion behavior
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
-- this way you will only jump inside the snippet region
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
elseif has_words_before() then
cmp.complete()
else
fallback()
end
end, { "i", "s" }),
["<S-Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { "i", "s" }),
["<CR>"] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
})
-- Do not auto-select the first auto-complete item, require a <Tab> to select the first item.
opts.completion.completeopt = "menu,menuone,noinsert,noselect"
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, {
{ name = "emoji" },
{ name = "git" },
{ name = "calc" },
}))
-- `/` cmdline setup.
cmp.setup.cmdline("/", {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "buffer" },
},
})
-- `:` cmdline setup.
cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = "path" },
}, {
{
name = "cmdline",
option = {
ignore_cmds = { "Man", "!" },
},
},
}),
})
end,
}

View File

@@ -16,6 +16,7 @@ return {
"Trouble",
"fish",
"zsh",
"snacks_dashboard",
},
colorcolumn = "120",
},

View File

@@ -1,42 +0,0 @@
return {
"telescope.nvim",
dependencies = {
{
"debugloop/telescope-undo.nvim",
keys = { { "<leader>U", "<cmd>Telescope undo<cr>" } },
config = function()
require("telescope").load_extension("undo")
end,
},
{
"xiyaowong/telescope-emoji.nvim",
keys = { { "<leader>fj", "<cmd>Telescope emoji<cr>" } },
config = function()
require("telescope").load_extension("undo")
end,
},
},
keys = {
{
"<leader>fp",
function()
require("telescope.builtin").find_files({
cwd = require("lazy.core.config").options.root,
})
end,
desc = "Find Plugin File",
},
{
"<leader>8",
function()
require("telescope.builtin").grep_string()
end,
desc = "Search word under cursor",
},
{
"<leader>s1", -- remap clashing structural replace key map
"<cmd>Telescope resume<cr>",
desc = "Telescope resume",
},
},
}

View File

@@ -1,19 +0,0 @@
return {
"Pocco81/true-zen.nvim",
cmd = { "TZNarrow", "TZFocus", "TZMinimalist", "TZAtaraxis" },
keys = {
{ "<leader>zn", [[<Cmd>:TZNarrow<CR>]], desc = "[Z]oom [N]arrow current line" },
{ "<leader>zn", [[<Cmd>:'<,'>TZNarrow<CR>]], mode = "v", desc = "[Z]oom [N]arrow selected lines" },
{ "<leader>zf", [[<Cmd>:TZFocus<CR>]], desc = "[Z]oom [N]arrow current buffer in new tab" },
{ "<leader>zm", [[<Cmd>:TZMinimalist<CR>]], desc = "[Z] Toggle minimalist nvim UI mode" },
{ "<leader>za", [[<Cmd>:TZAtaraxis<CR>]], desc = "[Z]oom [A]taraxis current buffer minimalist mode" },
{
"<C-w>z",
[[<Cmd>:TZFocus<CR>]],
mode = { "n", "t" },
desc = "Toggle [Z]oom current buffer in new tab",
},
-- tmux memory for fullscreening nvim window
{ "<C-a>z", [[<Cmd>:TZFocus<CR>]], mode = { "n", "t" }, desc = "Toggle [Z]oom current buffer in new tab" },
},
}