stuff and things

This commit is contained in:
Christian Nieves
2025-02-20 00:40:59 -06:00
parent 4d94c9cad7
commit 2e945be118
9 changed files with 331 additions and 346 deletions

View File

@ -1,6 +1,6 @@
[font]
size = 12
normal = { family = "ComicCodeLigatures Nerd Font Light" }
size = 14
normal = { family = "CommitMono Nerd Font" }
[window]
option_as_alt = "OnlyLeft"

View File

@ -1,14 +1,15 @@
vim.cmd("source " .. vim.env.HOME .. "/.vimrc")
vim.g.maplocalleader = ","
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
vim.opt.rtp:prepend(vim.env.HOME .. "/.vim")
@ -21,16 +22,16 @@ require("config.tmpl")
require("config.zip")
require("lazy").setup({
-- this entry tells lazy.nvim to load the list of of *.lua files from plugins/
import = "plugins" ,
-- Dev configuration
dev = {
-- Directory where you store your local plugin projects
path = "~/neovim-plugins/squk/",
-- @type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub
patterns = { "squk" },
fallback = false, -- Fallback to git when local plugin doesn't exist
},
-- this entry tells lazy.nvim to load the list of of *.lua files from plugins/
import = "plugins",
-- Dev configuration
dev = {
-- Directory where you store your local plugin projects
path = "~/neovim-plugins/squk/",
-- @type string[] plugins that match these patterns will use your local versions instead of being fetched from GitHub
patterns = { "squk" },
fallback = false, -- Fallback to git when local plugin doesn't exist
},
})
vim.opt.undodir = vim.fn.expand("$HOME") .. "/.undo/"

View File

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

View File

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

View File

@ -77,11 +77,10 @@ return {
["_"] = { "trim_whitespace" },
},
formatters = {
ronfmt = {
command = "ronfmt",
args = { "$FILENAME" },
stdin = false,
},
-- ronfmt = {
-- command = "ronfmt",
-- args = { "-d", "$FILENAME" },
-- },
gdformat = {
prepend_args = { "-l", "100" },
},

View File

@ -1,4 +1,5 @@
-- disable underline
local use_google = require("utils").use_google
vim.diagnostic.handlers.underline.show = function() end
local signs = {
@ -35,34 +36,36 @@ return {
{ "]g", ":lua vim.diagnostic.goto_next()<CR>" },
},
},
-- {
-- "rachartier/tiny-inline-diagnostic.nvim",
-- event = "LspAttach",
-- priority = 1000, -- needs to be loaded in first
-- config = function()
-- vim.diagnostic.config({ virtual_text = false })
--
-- require("tiny-inline-diagnostic").setup({
-- preset = "classic", -- Can be: "modern", "classic", "minimal", "powerline", ghost", "simple", "nonerdfont", "amongus"
--
-- -- Show the source of the diagnostic.
-- show_source = false,
--
-- -- Use your defined signs in the diagnostic config table.
-- use_icons_from_diagnostic = true,
--
-- -- Enable diagnostic message on all lines.
-- multilines = true,
--
-- -- Show all diagnostics on the cursor line.
-- show_all_diags_on_cursorline = false,
-- })
-- end,
-- },
{
"rachartier/tiny-inline-diagnostic.nvim",
event = "LspAttach",
priority = 1000, -- needs to be loaded in first
cond = not use_google(),
config = function()
vim.diagnostic.config({ virtual_text = false })
require("tiny-inline-diagnostic").setup({
preset = "classic", -- Can be: "modern", "classic", "minimal", "powerline", ghost", "simple", "nonerdfont", "amongus"
-- Show the source of the diagnostic.
show_source = false,
-- Use your defined signs in the diagnostic config table.
use_icons_from_diagnostic = true,
-- Enable diagnostic message on all lines.
multilines = true,
-- Show all diagnostics on the cursor line.
show_all_diags_on_cursorline = false,
})
end,
},
{
"ErichDonGubler/lsp_lines.nvim",
event = { "LspAttach" },
name = "lsp_lines.nvim",
cond = use_google(),
config = function()
require("lsp_lines").setup()

View File

@ -1,6 +0,0 @@
return {
"ggandor/leap.nvim",
config = function()
require("leap").add_default_mappings()
end,
}

View File

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

View File

@ -1,11 +1,10 @@
return {
{ "ron-rs/ron.vim" },
{
"mrcjkb/rustaceanvim",
version = "^5", -- Recommended
lazy = false, -- This plugin is already lazy
keys = {
-- { "" },
},
keys = {},
},
{
"saecki/crates.nvim",