Skip to content

Commit

Permalink
update-dotfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanbas21 committed Feb 28, 2025
1 parent bb88e4e commit 4badaf6
Show file tree
Hide file tree
Showing 15 changed files with 127 additions and 41 deletions.
12 changes: 5 additions & 7 deletions nvim/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ vim.opt.rtp:prepend(lazypath)
local lazy = require "lazy"
local lazy_config = require "configs.lazy"

vim.schedule(function()
require "mappings"
require "nvchad.autocmds"
require "autocmds"
end)
-- load plugins
lazy.setup({
{
Expand All @@ -28,13 +33,6 @@ lazy.setup({
{ import = "plugins" },
}, lazy_config)

require "nvchad.autocmds"
require "autocmds"

vim.schedule(function()
require "mappings"
end)

-- load theme
dofile(vim.g.base46_cache .. "defaults")
dofile(vim.g.base46_cache .. "statusline")
14 changes: 7 additions & 7 deletions nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
"git-conflict.nvim": { "branch": "main", "commit": "4bbfdd92d547d2862a75b4e80afaf30e73f7bbb4" },
"gitlinker.nvim": { "branch": "master", "commit": "296ad98061ca31706a7d890a0f13baed6e137c79" },
"gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" },
"goto-preview": { "branch": "main", "commit": "4751e70a6ebce4fb78327b097cb8fdff55f38f3a" },
"headlines.nvim": { "branch": "master", "commit": "bf17c96a836ea27c0a7a2650ba385a7783ed322e" },
"hover.nvim": { "branch": "main", "commit": "140c4d0ae9397b76baa46b87c574f5377de09309" },
"inc-rename.nvim": { "branch": "main", "commit": "f9b9e5b9a75074810f40881b7e254b5bbeaf122e" },
"indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" },
"lazy.nvim": { "branch": "main", "commit": "e5e9bf48211a13d9ee6c1077c88327c49c1ab4a0" },
"lazy.nvim": { "branch": "main", "commit": "a8c6db5da7bd382094606340eed015d14fbb5654" },
"leetcode.nvim": { "branch": "master", "commit": "db7e1cd6b9191b34b4c1f2f96e4e3949cde9f951" },
"lsp-lens.nvim": { "branch": "main", "commit": "48bb1a7e271424c15f3d588d54adc9b7c319d977" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
Expand All @@ -45,15 +44,15 @@
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
"nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" },
"nvim-cmp": { "branch": "main", "commit": "5a11682453ac6b13dbf32cd403da4ee9c07ef1c3" },
"nvim-dap": { "branch": "master", "commit": "6e0e8ab4d8ed520076971465a4388dfe54a91d83" },
"nvim-dap": { "branch": "master", "commit": "379cf26e9c457b66a0152cd5d018418c03720d47" },
"nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" },
"nvim-dev-container": { "branch": "main", "commit": "ba9666bdaec23cfe8087c0b6bb0a15c93ec8ba87" },
"nvim-lint": { "branch": "master", "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" },
"nvim-lspconfig": { "branch": "master", "commit": "9e932edb0af4e20880685ddb96a231669fbe8091" },
"nvim-mdlink": { "branch": "main", "commit": "17f1ba488cafa18ddad415ae9cd7b8f7538f30c2" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-tree.lua": { "branch": "master", "commit": "6709463b2d18e77f7a946027917aa00d4aaed6f4" },
"nvim-treesitter": { "branch": "master", "commit": "f2bd62c6568de54ca1b8fb0a8de04a41442934cb" },
"nvim-treesitter": { "branch": "master", "commit": "e6d02ec9efd396d294a7793f2066e2527b07b03a" },
"nvim-web-devicons": { "branch": "master", "commit": "1020869742ecb191f260818234517f4a1515cfe8" },
"nx.nvim": { "branch": "main", "commit": "f8a3a21b3d540889401a40d1f2803083794c0372" },
"oil.nvim": { "branch": "master", "commit": "975a77cce3c8cb742bc1b3629f4328f5ca977dad" },
Expand All @@ -62,20 +61,21 @@
"orgmode": { "branch": "master", "commit": "ac6e02ab638ee324b3e3894e2a05488aad0b467c" },
"other.nvim": { "branch": "main", "commit": "933aa489ad02f8f973269a565bfea16cc784cbbf" },
"otter.nvim": { "branch": "main", "commit": "21f042f4d1a9ff4788634ad76a10033eed13c7f2" },
"package-info.nvim": { "branch": "master", "commit": "3de4f3569ce60e248707df042b72769b3ec343b8" },
"pipeline.nvim": { "branch": "main", "commit": "82f382cbc452d87fdf514cac6002042ac05b40b6" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"quicker.nvim": { "branch": "master", "commit": "76bfadd8f29895e79429fe0d30f0b3df82cd466a" },
"rayso.nvim": { "branch": "main", "commit": "4a94c6fa2410e3800cf47a03b8f5e5315595ba99" },
"refjump.nvim": { "branch": "main", "commit": "3459d17ad750d49458fec5b315e3181c525c6b27" },
"satellite.nvim": { "branch": "main", "commit": "bce591cb5e379bd989623993c604c774633e7ed9" },
"schemastore.nvim": { "branch": "main", "commit": "503f3221543d4fe897d600f66816cc54c4bf825f" },
"schemastore.nvim": { "branch": "main", "commit": "776d60cc8fd7e2f450c1756c9491e353c12b16fa" },
"search.nvim": { "branch": "main", "commit": "7b8f2315d031be73e14bc2d82386dfac15952614" },
"telescope-egrepify.nvim": { "branch": "master", "commit": "a8070970a661330c4e00450d25f874f6c2b00af9" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" },
"telescope-import.nvim": { "branch": "main", "commit": "6fd69447679a99b463025e7f2f787e8b185dd740" },
"telescope-orgmode.nvim": { "branch": "main", "commit": "eabff061c3852a9aa94e672a7d2fa4a1ef63f9e2" },
"telescope-project.nvim": { "branch": "master", "commit": "ce2c9fe209a68c7a924acde42d94ed8a2b2a52c5" },
"telescope-tabs": { "branch": "master", "commit": "0a678eefcb71ebe5cb0876aa71dd2e2583d27fd3" },
"telescope.nvim": { "branch": "master", "commit": "589910694bafe3975d0f025a750dcabc09824126" },
"telescope.nvim": { "branch": "master", "commit": "814f102cd1da3dc78c7d2f20f2ef3ed3cdf0e6e4" },
"tiny-code-action.nvim": { "branch": "main", "commit": "cc2f6045e67e01355c49fea10568baba856e844a" },
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
"ts-error-translator.nvim": { "branch": "main", "commit": "47e5ba89f71b9e6c72eaaaaa519dd59bd6897df4" },
Expand Down
4 changes: 2 additions & 2 deletions nvim/lua/chadrc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
local M = {}

M.base46 = {
theme = "chadracula",
theme = "tokyonight",
transparency = false,
}

Expand All @@ -17,7 +17,7 @@ M.lsp = {
M.ui = {
cmp = {
lspkind_text = true,
style = "atom", -- default/flat_light/flat_dark/atom/atom_colored
style = "atom_colored", -- default/flat_light/flat_dark/atom/atom_colored
format_colors = {
tailwind = false,
},
Expand Down
21 changes: 21 additions & 0 deletions nvim/lua/configs/lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@ local servers = {
eslint = {},
angularls = {},
bashls = {},
elmls = {
init_options = {
--elmReviewDiagnostics = "error",
elmAnalyseTrigger = "save",
onlyUpdateDiagnosticsOnSave = true,
},
handlers = {
-- See https://github.com/elm-tooling/elm-language-server/discussions/961
-- See https://github.com/joakin/nvim/blob/be72c11ff2d2c3ee6d6350f2221aabcca373adae/lua/plugins/lspconfig.lua#L148-L157
["window/showMessageRequest"] = function(whatever, result)
-- For some reason, the showMessageRequest handler doesn't work with
-- the format failed error. It just hangs on the screen and can't
-- interact with the vim.ui.select thingy. So skip it.
if result.message:find("Running elm-format failed", 1, true) then
print(result.message)
return vim.NIL
end
return vim.lsp.handlers["window/showMessageRequest"](whatever, result)
end,
},
},
-- biome = {},
clojure_lsp = {},
cssls = {},
Expand Down
2 changes: 2 additions & 0 deletions nvim/lua/configs/telescope_config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ M.telescope = {
"import",
"telescope-tabs",
"egrepify",
"project",
},
extensions = {
project = {},
egrepify = {
prefixes = {
-- matches all lines that do not comprise sorter
Expand Down
1 change: 1 addition & 0 deletions nvim/lua/plugins/conform.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ return {
formatters_by_ft = {
lua = { "stylua" },
css = { "prettier", "biome", stop_after_first = true },
elm = { "elm_format" },
html = { "prettierd", "prettier", "biome", stop_after_first = true },
typescript = { "prettier", "biome", stop_after_first = true },
javascript = { "prettier", "biome", stop_after_first = true },
Expand Down
26 changes: 26 additions & 0 deletions nvim/lua/plugins/diffview.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
return {
"sindrets/diffview.nvim", -- optional - Diff integration
cmd = { "DiffviewOpen", "DiffviewClose", "DiffviewToggleFiles", "DiffviewFocusFiles" },
opts = {
default_args = {
DiffviewOpen = {},
},
},
keys = {
{
"<leader>pr",
":DiffviewOpen origin/main...HEAD --imply-local<CR>",
{ desc = "Review PR / branch" },
},
{
"dv",
":DiffviewOpen<CR>",
{ desc = "Open Diffview" },
},
{
"dc",
":DiffviewClose<CR>",
{ desc = "Close Diffview" },
},
},
}
33 changes: 32 additions & 1 deletion nvim/lua/plugins/goto-preview.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,39 @@
return {
"rmagatti/goto-preview",
event = "LspAttach",
config = true, -- necessary as per https://github.com/rmagatti/goto-preview/issues/88
opts = {
default_mappings = true,
},
keys = {
{
"<leader>pd",
"<cmd>lua require('goto-preview').goto_preview_definition()<CR>",
noremap = true,
desc = "goto preview definition",
},
{
"<leader>pD",
"<cmd>lua require('goto-preview').goto_preview_declaration()<CR>",
noremap = true,
desc = "goto preview declaration",
},
{
"<leader>pi",
"<cmd>lua require('goto-preview').goto_preview_implementation()<CR>",
noremap = true,
desc = "goto preview implementation",
},
{
"<leader>py",
"<cmd>lua require('goto-preview').goto_preview_type_definition()<CR>",
noremap = true,
desc = "goto preview type definition",
},
{
"<leader>P",
"<cmd>lua require('goto-preview').close_all_win()<CR>",
noremap = true,
desc = "close all preview windows",
},
},
}
27 changes: 9 additions & 18 deletions nvim/lua/plugins/luasnip.lua
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
-- vim.api.nvim_create_autocmd("InsertLeave", {
-- callback = function()
-- if
-- require("luasnip").session.current_nodes[vim.api.nvim_get_current_buf()]
-- and not require("luasnip").session.jump_active
-- then
-- require("luasnip").unlink_current()
-- end
-- end,
-- })
return {
"L3MON4D3/LuaSnip",
-- follow latest release.
version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
-- install jsregexp (optional!).
build = "make install_jsregexp",
"L3MON4D3/LuaSnip",
-- follow latest release.
version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
-- install jsregexp (optional!).
build = "make install_jsregexp",
dependencies = {
{
"rafamadriz/friendly-snippets",
config = function()
require("luasnip.loaders.from_vscode").lazy_load()
require("luasnip.loaders.from_lua").load({ paths = "./lua/luasnippets" })
require("luasnip.loaders.from_lua").load { paths = "./lua/luasnippets" }
end,
},
}
}
},
}

6 changes: 2 additions & 4 deletions nvim/lua/plugins/neotest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ return {
require "neotest-vitest" {
env = { CI = true },
},
require "neotest-jest" {
jestCommand = "pnpm jest",
},
require "neotest-jest" {},
require("neotest-playwright").adapter {
options = {
persist_project_selection = false,
Expand All @@ -121,7 +119,7 @@ return {
-- Otherwise, `vim.ui.select` is used.
-- In normal mode, `<Tab>` toggles the project under the cursor.
-- `<CR>` (enter key) applies the selection.
enabled = false,
enabled = true,
opts = {},
},
},
Expand Down
4 changes: 4 additions & 0 deletions nvim/lua/plugins/rayso.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
return {
"TobinPalmer/rayso.nvim",
cmd = { "Rayso" },
}
2 changes: 1 addition & 1 deletion nvim/lua/plugins/search.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ return {
function()
require("search").open { tab_id = 1 }
end,
{ desc = "search all files" },
{ desc = "search all files", noremap = true },
},
{
"<leader><leader>",
Expand Down
7 changes: 7 additions & 0 deletions nvim/lua/plugins/telescope-project.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
return {
"nvim-telescope/telescope-project.nvim",
event = "LspAttach",
dependencies = {
"nvim-telescope/telescope.nvim",
},
}
7 changes: 7 additions & 0 deletions nvim/lua/plugins/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,12 @@ return {
end,
{ desc = "Whaler change dir", noremap = true },
},
{
"<C-p>",
function()
require("telescope").extensions.project.project {}
end,
{ desc = "Telescope project", noremap = true, silent = true },
},
},
}
2 changes: 1 addition & 1 deletion nvim/lua/plugins/tinycodeaction.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ return {
end,
keys = {
{
"<leader>ca",
"<leader>qf",
function()
require("tiny-code-action").code_action {}
end,
Expand Down

0 comments on commit 4badaf6

Please sign in to comment.