This commit is contained in:
Christian Nieves
2025-03-01 08:21:09 -06:00
parent 3b3f3c05bd
commit 3554761a0c
3 changed files with 260 additions and 255 deletions

View File

@ -1,3 +1,3 @@
{ {
"lazy.nvim": { "branch": "main", "commit": "d8f26efd456190241afd1b0f5235fe6fdba13d4a" } "lazy.nvim": { "branch": "main", "commit": "e5e9bf48211a13d9ee6c1077c88327c49c1ab4a0" }
} }

View File

@ -1,145 +1,146 @@
local use_google = require("utils").use_google local use_google = require("utils").use_google
return { return {
"sindrets/diffview.nvim", "tikhomirov/vim-glsl",
{ "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" } }, "sindrets/diffview.nvim",
{ { "folke/todo-comments.nvim", dependencies = { "nvim-lua/plenary.nvim" } },
"MagicDuck/grug-far.nvim", {
config = function() "MagicDuck/grug-far.nvim",
require("grug-far").setup({ config = function()
-- search and replace engines configuration require("grug-far").setup({
engines = { -- search and replace engines configuration
-- see https://github.com/BurntSushi/ripgrep engines = {
ripgrep = { -- see https://github.com/BurntSushi/ripgrep
-- ripgrep executable to use, can be a different path if you need to configure ripgrep = {
path = "rg", -- ripgrep executable to use, can be a different path if you need to configure
-- extraArgs = "-.", path = "rg",
}, -- extraArgs = "-.",
}, },
}) },
end, })
}, end,
{ },
"shellRaining/hlchunk.nvim", {
event = { "BufReadPre", "BufNewFile" }, "shellRaining/hlchunk.nvim",
opts = { event = { "BufReadPre", "BufNewFile" },
line_num = { enable = true }, opts = {
chunk = { line_num = { enable = true },
enable = true, chunk = {
priority = 15, enable = true,
style = { priority = 15,
{ fg = "#393d4c" }, style = {
}, { fg = "#393d4c" },
chars = { },
horizontal_line = "", chars = {
-- vertical_line = "│", horizontal_line = "",
vertical_line = "", -- vertical_line = "│",
left_top = "", vertical_line = "",
left_bottom = "", left_top = "",
right_arrow = ">", left_bottom = "",
}, right_arrow = ">",
use_treesitter = true, },
textobject = "", use_treesitter = true,
max_file_size = 1024 * 1024, textobject = "",
error_sign = true, max_file_size = 1024 * 1024,
-- animation related error_sign = true,
duration = 0, -- animation related
delay = 0, duration = 0,
}, delay = 0,
}, },
}, },
"RRethy/vim-illuminate", },
"kdheepak/lazygit.nvim", "RRethy/vim-illuminate",
"flwyd/vim-conjoin", "kdheepak/lazygit.nvim",
"rafcamlet/nvim-luapad", "flwyd/vim-conjoin",
"vim-scripts/vcscommand.vim", "rafcamlet/nvim-luapad",
"AndrewRadev/tagalong.vim", "vim-scripts/vcscommand.vim",
"AndrewRadev/yankwin.vim", "AndrewRadev/tagalong.vim",
{ "squk/gdrama-syntax.vim", ft = "gdrama" }, "AndrewRadev/yankwin.vim",
{ "nvim-lua/plenary.nvim", lazy = false }, { "squk/gdrama-syntax.vim", ft = "gdrama" },
{ "squk/java-syntax.vim", ft = "java" }, { "nvim-lua/plenary.nvim", lazy = false },
{ "udalov/kotlin-vim", event = "VeryLazy", ft = "kotlin" }, { "squk/java-syntax.vim", ft = "java" },
{ "andymass/vim-matchup", event = "VimEnter" }, { "udalov/kotlin-vim", event = "VeryLazy", ft = "kotlin" },
{ "jghauser/mkdir.nvim", event = "BufWritePre" }, { "andymass/vim-matchup", event = "VimEnter" },
{ { "jghauser/mkdir.nvim", event = "BufWritePre" },
"rmagatti/auto-session", {
dependencies = { "rmagatti/auto-session",
"nvim-telescope/telescope.nvim", -- Only needed if you want to use session lens dependencies = {
}, "nvim-telescope/telescope.nvim", -- Only needed if you want to use session lens
config = function() },
require("auto-session").setup({ config = function()
auto_session_suppress_dirs = { "~/", "~/Projects", "~/Downloads", "/" }, require("auto-session").setup({
args_allow_single_directory = false, auto_session_suppress_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
bypass_save_filetypes = { "netrw" }, args_allow_single_directory = false,
}) bypass_save_filetypes = { "netrw" },
end, })
}, end,
"tpope/vim-abolish", },
{ "tpope/vim-abolish",
"johmsalas/text-case.nvim", {
dependencies = { "nvim-telescope/telescope.nvim" }, "johmsalas/text-case.nvim",
config = function() dependencies = { "nvim-telescope/telescope.nvim" },
require("textcase").setup({}) config = function()
require("telescope").load_extension("textcase") require("textcase").setup({})
end, require("telescope").load_extension("textcase")
cmd = { end,
"Subs", cmd = {
}, "Subs",
},
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>tc", "<cmd>TextCaseOpenTelescope<CR>", mode = { "n", "v" }, desc = "Telescope" }, { "<leader>tc", "<cmd>TextCaseOpenTelescope<CR>", mode = { "n", "v" }, desc = "Telescope" },
}, },
}, },
{ {
"NvChad/nvim-colorizer.lua", "NvChad/nvim-colorizer.lua",
ft = "lua", ft = "lua",
config = function() config = function()
require("colorizer").setup() require("colorizer").setup()
end, end,
}, },
{ {
"andweeb/presence.nvim", "andweeb/presence.nvim",
cond = not use_google(), cond = not use_google(),
config = function() config = function()
require("presence").setup({ require("presence").setup({
main_image = "file", main_image = "file",
show_time = false, show_time = false,
}) })
end, end,
}, },
{ {
"ntpeters/vim-better-whitespace", "ntpeters/vim-better-whitespace",
config = function() config = function()
vim.g.better_whitespace_filetypes_blacklist = { "dashboard" } vim.g.better_whitespace_filetypes_blacklist = { "dashboard" }
end, end,
}, },
{ {
"mbbill/undotree", "mbbill/undotree",
cmd = "UndotreeToggle", cmd = "UndotreeToggle",
config = function() config = function()
vim.g.undotree_SetFocusWhenToggle = 1 vim.g.undotree_SetFocusWhenToggle = 1
end, end,
-- stylua: ignore -- stylua: ignore
keys = { { "<leader>ut", ":UndotreeToggle<CR>" } }, keys = { { "<leader>ut", ":UndotreeToggle<CR>" } },
}, },
{ {
"stevearc/aerial.nvim", "stevearc/aerial.nvim",
opts = {}, opts = {},
cmd = { "AerialToggle", "AerialOn" }, cmd = { "AerialToggle", "AerialOn" },
-- stylua: ignore -- stylua: ignore
keys = { { "<leader>so", ":AerialToggle<CR>", desc = "[S]symbols [O]utline" } }, keys = { { "<leader>so", ":AerialToggle<CR>", desc = "[S]symbols [O]utline" } },
}, },
{ {
"andrewferrier/debugprint.nvim", "andrewferrier/debugprint.nvim",
opts = {}, opts = {},
-- Dependency only needed for NeoVim 0.8 -- Dependency only needed for NeoVim 0.8
dependencies = { dependencies = {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
}, },
-- Remove the following line to use development versions, -- Remove the following line to use development versions,
-- not just the formal releases -- not just the formal releases
version = "*", version = "*",
-- stylua: ignore -- stylua: ignore
keys = { keys = {
{ "<leader>dp", ":lua require('debugprint').debugprint()<cr>", desc = "Debug print" }, { "<leader>dp", ":lua require('debugprint').debugprint()<cr>", desc = "Debug print" },
@ -147,5 +148,5 @@ return {
{ "<leader>dq", ":lua require('debugprint').debugprint({variable = true})<cr>", desc = "Debug print" }, { "<leader>dq", ":lua require('debugprint').debugprint({variable = true})<cr>", desc = "Debug print" },
{ "<leader>dQ", ":lua require('debugprint').debugprint({variable = true, above = true})<cr>", desc = "Debug print", }, { "<leader>dQ", ":lua require('debugprint').debugprint({variable = true, above = true})<cr>", desc = "Debug print", },
}, },
}, },
} }

View File

@ -2,130 +2,134 @@ local use_google = require("utils").use_google
local flags = require("utils").flags local flags = require("utils").flags
return { return {
-- { -- {
-- "ray-x/lsp_signature.nvim", -- "ray-x/lsp_signature.nvim",
-- event = "VeryLazy", -- event = "VeryLazy",
-- opts = { -- opts = {
-- floating_window = true, -- floating_window = true,
-- hint_prefix = "󰡱 ", -- hint_prefix = "󰡱 ",
-- }, -- },
-- config = function(_, opts) -- config = function(_, opts)
-- require("lsp_signature").setup(opts) -- require("lsp_signature").setup(opts)
-- end, -- end,
-- }, -- },
{ {
"kosayoda/nvim-lightbulb", "kosayoda/nvim-lightbulb",
commit = "1cae7b7153ae98dcf1b11173a443ac1b6d8e3d49", commit = "1cae7b7153ae98dcf1b11173a443ac1b6d8e3d49",
event = { "LspAttach" }, event = { "LspAttach" },
opts = { opts = {
autocmd = { enabled = true }, autocmd = { enabled = true },
virtual_text = { virtual_text = {
enabled = true, enabled = true,
text = " 󱐋", text = " 󱐋",
hl = "DiagnosticWarn", hl = "DiagnosticWarn",
}, },
sign = { enabled = false }, sign = { enabled = false },
}, },
}, },
{ {
"L3MON4D3/LuaSnip", "L3MON4D3/LuaSnip",
build = "make install_jsregexp", build = "make install_jsregexp",
config = function() config = function()
require("luasnip.loaders.from_vscode").lazy_load() require("luasnip.loaders.from_vscode").lazy_load()
end, end,
dependencies = { "rafamadriz/friendly-snippets" }, dependencies = { "rafamadriz/friendly-snippets" },
}, },
{ {
"ray-x/go.nvim", "ray-x/go.nvim",
dependencies = { -- optional packages dependencies = { -- optional packages
"ray-x/guihua.lua", "ray-x/guihua.lua",
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
}, },
-- cond = not use_google(), -- cond = not use_google(),
config = function() config = function()
local capabilities = flags.blink local capabilities = flags.blink
and require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities()) and require("blink.cmp").get_lsp_capabilities(vim.lsp.protocol.make_client_capabilities())
or require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities()) or require("cmp_nvim_lsp").default_capabilities(vim.lsp.protocol.make_client_capabilities())
capabilities.offsetEncoding = { "utf-16" } capabilities.offsetEncoding = { "utf-16" }
require("go").setup({ require("go").setup({
lsp_cfg = { capabilities = capabilities }, lsp_cfg = { capabilities = capabilities },
lsp_keymaps = false, lsp_keymaps = false,
lsp_inlay_hints = { lsp_inlay_hints = {
enable = not use_google(), -- doesn't work with ciderlsp enable = not use_google(), -- doesn't work with ciderlsp
}, },
}) })
-- Run gofmt + goimports on save -- Run gofmt + goimports on save
local format_sync_grp = vim.api.nvim_create_augroup("goimports", {}) local format_sync_grp = vim.api.nvim_create_augroup("goimports", {})
vim.api.nvim_create_autocmd("BufWritePre", { vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.go", pattern = "*.go",
callback = function() callback = function()
require("go.format").goimports() require("go.format").goimports()
end, end,
group = format_sync_grp, group = format_sync_grp,
}) })
end, end,
ft = { "go", "gomod" }, ft = { "go", "gomod" },
build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries
}, },
{ {
"neovim/nvim-lspconfig", "neovim/nvim-lspconfig",
dependencies = { dependencies = {
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
"saghen/blink.cmp", "saghen/blink.cmp",
"saghen/blink.compat", "saghen/blink.compat",
"nvim-lua/lsp-status.nvim", "nvim-lua/lsp-status.nvim",
"VonHeikemen/lsp-zero.nvim", "VonHeikemen/lsp-zero.nvim",
}, },
keys = { keys = {
{ "<leader>F", ":lua vim.lsp.buf.format()<CR>" }, { "<leader>F", ":lua vim.lsp.buf.format()<CR>" },
{ "<leader>rn", ":lua vim.lsp.buf.rename()<CR>" }, { "<leader>rn", ":lua vim.lsp.buf.rename()<CR>" },
{ "L", ":lua vim.lsp.buf.hover()<CR>" }, { "L", ":lua vim.lsp.buf.hover()<CR>" },
{ "gr", ":Telescope lsp_references<CR>" }, { "gr", ":Telescope lsp_references<CR>" },
{ "gd", ":lua vim.lsp.buf.definition()<CR>" }, { "gd", ":lua vim.lsp.buf.definition()<CR>" },
-- { "gd", "<cmd>Telescope lsp_definitions<CR>" }, -- { "gd", "<cmd>Telescope lsp_definitions<CR>" },
{ "gD", ":tab split | lua vim.lsp.buf.definition()<CR>" }, { "gD", ":tab split | lua vim.lsp.buf.definition()<CR>" },
{ "gi", ":lua vim.lsp.buf.implementation()<CR>" }, { "gi", ":lua vim.lsp.buf.implementation()<CR>" },
{ "gI", ":lua vim.lsp.buf.implementation()<CR>" }, { "gI", ":lua vim.lsp.buf.implementation()<CR>" },
{ "gR", ":lua vim.lsp.buf.references()<CR>" }, { "gR", ":lua vim.lsp.buf.references()<CR>" },
{ "gt", ":lua vim.lsp.buf.type_definition()<CR>" }, { "gt", ":lua vim.lsp.buf.type_definition()<CR>" },
{ "<C-g>", ":lua vim.lsp.buf.signature_help()<CR>" }, { "<C-g>", ":lua vim.lsp.buf.signature_help()<CR>" },
{ "<C-g>", ":lua vim.lsp.buf.signature_help()<CR>", mode = "i" }, { "<C-g>", ":lua vim.lsp.buf.signature_help()<CR>", mode = "i" },
}, },
config = function() config = function()
local nvim_lspconfig = require("lspconfig") local nvim_lspconfig = require("lspconfig")
local lsp_configs = require("lspconfig.configs") local lsp_configs = require("lspconfig.configs")
lsp_configs.ciderlsp = { lsp_configs.ciderlsp = {
default_config = { default_config = {
cmd = { cmd = {
"/google/bin/releases/cider/ciderlsp/ciderlsp", "/google/bin/releases/cider/ciderlsp/ciderlsp",
"--tooltag=nvim-lsp", "--tooltag=nvim-lsp",
"--noforward_sync_responses", "--noforward_sync_responses",
}, },
filetypes = { filetypes = {
"c", "c",
"cpp", "cpp",
"java", "java",
"kotlin", "kotlin",
"objc", "objc",
"proto", "proto",
"textproto", "textproto",
"go", "go",
"python", "python",
"bzl", "bzl",
"typescript", "typescript",
}, },
offset_encoding = "utf-8", offset_encoding = "utf-8",
root_dir = nvim_lspconfig.util.root_pattern(".citc"), root_dir = nvim_lspconfig.util.root_pattern(".citc"),
settings = {}, settings = {},
}, },
} }
nvim_lspconfig.ciderlsp.setup({}) if use_google() then
vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]]) nvim_lspconfig.ciderlsp.setup({})
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]]) end
end, nvim_lspconfig.wgsl_analyzer.setup({})
},
vim.cmd([[autocmd FileType gdscript setlocal commentstring=#\ %s]])
vim.cmd([[autocmd FileType gdscript setlocal autoindent noexpandtab tabstop=4 shiftwidth=4]])
end,
},
} }