Skip to content

Commit

Permalink
chore: change theme and other minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham-cpp committed Feb 13, 2025
1 parent d2bb968 commit b012c8c
Show file tree
Hide file tree
Showing 8 changed files with 151 additions and 46 deletions.
4 changes: 3 additions & 1 deletion .config/nvim-astro/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@
"mini.align": { "branch": "main", "commit": "3bdf6f0b91b31db5300a7b04f53f296a7fb150c1" },
"mini.bufremove": { "branch": "main", "commit": "1ee294a97e091d3cf967974df622c0d887890dc2" },
"mini.files": { "branch": "main", "commit": "0db8f49088bcefff23c5cb8498a6c94e46a45a8e" },
"mini.icons": { "branch": "main", "commit": "ec61af6e606fc89ee3b1d8f2f20166a3ca917a36" },
"mini.move": { "branch": "main", "commit": "c8b30e92dd2668dd6e56a9a23cb7d4ee38c2266d" },
"mini.operators": { "branch": "main", "commit": "81e5059268154f5a8b594c95748968febdd539e3" },
"multiple-cursors.nvim": { "branch": "main", "commit": "3915468ed5f4469732d178f39e7d555b8e7c3f2e" },
"multicursor.nvim": { "branch": "1.0", "commit": "17942364aec9c2caeec5fe29ee5f229b2f00c4b1" },
"neo-tree.nvim": { "branch": "main", "commit": "5d172e8315444dbc32867d1c7b04d8e7e68ec4e1" },
"neoconf.nvim": { "branch": "main", "commit": "b8ea8a1fe16b9c24a4dd701c7a03f414aee2c9ff" },
"neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" },
Expand Down Expand Up @@ -110,6 +111,7 @@
"tree-sitter-haskell": { "branch": "master", "commit": "0975ef72fc3c47b530309ca93937d7d143523628" },
"ts-error-translator.nvim": { "branch": "main", "commit": "47e5ba89f71b9e6c72eaaaaa519dd59bd6897df4" },
"tsc.nvim": { "branch": "main", "commit": "59abb6f3f24a3ca80708f694af4e2b727a1a3211" },
"vague.nvim": { "branch": "main", "commit": "8a33468ca4fc73adc1b111b19f89b7663fdfd137" },
"venv-selector.nvim": { "branch": "regexp", "commit": "e82594274bf7b54387f9a2abe65f74909ac66e97" },
"vim-dadbod": { "branch": "master", "commit": "9f0ca8bcef704659820a95c3bbd2c262583a66a1" },
"vim-dadbod-completion": { "branch": "master", "commit": "c7f1be21a08b8fc9d927a19db89a4aa995402787" },
Expand Down
3 changes: 2 additions & 1 deletion .config/nvim-astro/lua/community.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ return {
{ import = "astrocommunity.debugging.persistent-breakpoints-nvim" },

{ import = "astrocommunity.editing-support.dial-nvim" },
{ import = "astrocommunity.editing-support.multiple-cursors-nvim" },
-- { import = "astrocommunity.editing-support.multiple-cursors-nvim" },
{ import = "astrocommunity.editing-support.nvim-treesitter-context" },
{ import = "astrocommunity.editing-support.refactoring-nvim" },

Expand All @@ -54,4 +54,5 @@ return {
{ import = "astrocommunity.motion.vim-matchup" },

{ import = "astrocommunity.recipes.heirline-vscode-winbar" },
{ import = "astrocommunity.icon.mini-icons" },
}
4 changes: 4 additions & 0 deletions .config/nvim-astro/lua/plugins/astrocore.lua
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ return {
desc = "Paste without overriding clipboard",
},
},
o = {
ie = { ':exec "normal! ggVG"<cr>', desc = "Entire File" },
iv = { ':exec "normal! HVL"<cr>', desc = "Entire Visible screen" },
},
},
filetypes = {
filename = {
Expand Down
52 changes: 19 additions & 33 deletions .config/nvim-astro/lua/plugins/astroui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,37 @@ return {
---@type AstroUIOpts
opts = {
-- change colorscheme
colorscheme = "astrodark",
-- colorscheme = "jellybeans",
-- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes
-- colorscheme = "astrodark",
colorscheme = "vague",
highlights = {
-- init = { -- this table overrides highlights in all themes
-- -- Normal = { bg = "#000000" },
-- },
-- astrodark = { -- a table of overrides/changes when applying the astrotheme theme
-- -- Normal = { bg = "#000000" },
-- },
-- this table overrides highlights in all themes
-- init = { },
astrodark = {
QuickScopePrimary = { fg = "#dfbb78", bg = "#505050", bold = true, undercurl = true },
QuickScopeSecondary = { fg = "#61afef", bg = "#505050", bold = true, undercurl = true },
},
vague = {
["@tag.attribute"] = { fg = "#c3c3d5" },
StatusLine = { bg = "#181818" },
WinBar = { bg = "#141415" },
SnacksPickerMatch = { fg = "#f3be7c" },
QuickScopePrimary = { fg = "#f3be7c", bg = "#333738", bold = true, undercurl = true },
QuickScopeSecondary = { fg = "#7e98e8", bg = "#333738", bold = true, undercurl = true },
},
},
-- modify variables used by heirline but not defined in the setup call directly
status = {
colors = function(hl)
hl.buffer_active_bg = "#242642"
-- astrodark
-- hl.buffer_active_bg = "#242642"
hl.buffer_active_bg = "#393960"
return hl
end,
},
-- Icons can be configured throughout the interface
-- icons = {
-- -- configure the loading of the lsp in the status line
-- LSPLoading1 = "⠋",
-- LSPLoading2 = "⠙",
-- LSPLoading3 = "⠹",
-- LSPLoading4 = "⠸",
-- LSPLoading5 = "⠼",
-- LSPLoading6 = "⠴",
-- LSPLoading7 = "⠦",
-- LSPLoading8 = "⠧",
-- LSPLoading9 = "⠇",
-- LSPLoading10 = "⠏",
-- },
},
},
-- {
-- "wtfox/jellybeans.nvim",
-- enabled = true,
-- opts = {
-- ---@type 'dark'|'light'
-- style = "dark",
-- transparent = true,
-- },
-- },
{
"vague2k/vague.nvim",
opts = { transparent = false },
},
}
65 changes: 65 additions & 0 deletions .config/nvim-astro/lua/plugins/multi-cursors.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---@type LazySpec
return {
{
"mg979/vim-visual-multi",
branch = "master",
version = false,
enabled = false,
init = function()
vim.g.VM_maps = {}
vim.g.VM_mouse_mappings = 1
vim.g.VM_maps = {
["Find Under"] = "<M-d>",
["Find Subword Under"] = "<M-d>",
["Skip Region"] = "<C-x>",
["Select All"] = "<M-a>",
["Start Regex Search"] = "\\/",
}
end,
keys = { { "<M-d>", mode = { "n", "v" } }, { "<M-a>", mode = { "n", "v" } } },
},
{
"jake-stewart/multicursor.nvim",
branch = "1.0",
opts = {},
keys = function()
local mc = require "multicursor-nvim"
return {
{ "<leader>mj", function() mc.lineAddCursor(1) end, desc = "add cursor dowm", mode = { "n", "x" } },
{ "<leader>mk", function() mc.lineAddCursor(-1) end, desc = "add cursor up", mode = { "n", "x" } },
{ "<leader>mJ", function() mc.lineSkipCursor(1) end, desc = "skip cursor down", mode = { "n", "x" } },
{ "<leader>mK", function() mc.lineSkipCursor(-1) end, desc = "skip cursor up", mode = { "n", "x" } },
{ "<leader>mn", function() mc.matchAddCursor(1) end, desc = "add cursor to next match", mode = { "n", "x" } },
{ "<leader>mp", function() mc.matchAddCursor(-1) end, desc = "add cursor to prev match", mode = { "n", "x" } },
{ "<leader>mN", function() mc.matchSkipCursor(1) end, desc = "skip cursor to next match", mode = { "n", "x" } },
{
"<leader>mP",
function() mc.matchSkipCursor(-1) end,
desc = "skip cursor to prev match",
mode = { "n", "x" },
},
{ "<leader>ma", mc.matchAllAddCursors, desc = "all matches", mode = { "n", "x" } },
{ "<c-leftmouse>", mc.handleMouse, desc = "multicursor using mouse" },
{ "<leader>mt", mc.toggleCursor, desc = "toggle cursor" },
{ "<leader>mh", mc.prevCursor, desc = "goto prev cursor" },
{ "<leader>ml", mc.nextCursor, desc = "goto next cursor" },
{ "<leader>md", mc.deleteCursor, desc = "delete cursor" },
{
"<esc>",
function()
if not mc.cursorsEnabled() then
mc.enableCursors()
elseif mc.hasCursors() then
mc.clearCursors()
else
vim.cmd "nohl"
return "<esc>"
end
end,
desc = "Escape cursor, No-Highlight",
expr = true,
},
}
end,
},
}
37 changes: 31 additions & 6 deletions .config/nvim-astro/lua/plugins/session.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
-- function for calculating the current session name
local get_session_name = function()
local name = vim.fn.getcwd()
local branch = vim.fn.system "git branch --show-current"
if vim.v.shell_error == 0 then
-- local branch = vim.fn.system "git branch --show-current"
local branch = vim.b.gitsigns_head
if branch == nil then branch = vim.fn.system "git branch --show-current" end
if branch ~= nil or vim.v.shell_error == 0 then
return name .. vim.trim(branch --[[@as string]])
else
return name
Expand Down Expand Up @@ -52,10 +54,33 @@ return {
desc = "Restore previous directory session if neovim opened with no arguments",
nested = true, -- trigger other autocommands as buffers open
callback = function()
-- Only load the session if nvim was started with no args
if vim.fn.argc(-1) == 0 then
-- try to load a directory session using the current working directory
require("resession").load(get_session_name(), { dir = "dirsession", silence_errors = true })
-- Logic copied from https://github.com/AstroNvim/AstroNvim/blob/365aa6e083dcd25fa3d1c8a2515d7e71a03d51d3/lua/astronvim/plugins/alpha.lua#L49
local should_skip
local lines = vim.api.nvim_buf_get_lines(0, 0, 2, false)
if
vim.fn.argc() > 0 -- don't start when opening a file
or #lines > 1 -- don't open if current buffer has more than 1 line
or (#lines == 1 and lines[1]:len() > 0) -- don't open the current buffer if it has anything on the first line
or #vim.tbl_filter(function(bufnr) return vim.bo[bufnr].buflisted end, vim.api.nvim_list_bufs()) > 1 -- don't open if any listed buffers
or not vim.o.modifiable -- don't open if not modifiable
then
should_skip = true
else
for _, arg in pairs(vim.v.argv) do
if arg == "-b" or arg == "-c" or vim.startswith(arg, "+") or arg == "-S" then
should_skip = true
break
end
end
end
if should_skip then return end
-- if possible, load session
if not pcall(function() require("resession").load(get_session_name(), { dir = "dirsession" }) end) then
-- if session was not loaded, if possible, load alpha
require("lazy").load { plugins = { "alpha-nvim" } }
if pcall(function() require("alpha").start(true) end) then
vim.schedule(function() vim.cmd.doautocmd "FileType" end)
end
end
end,
},
Expand Down
12 changes: 9 additions & 3 deletions .config/nvim-astro/lua/plugins/snacks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ return {
},
keys = {
{
"<C-g>",
"<leader>gn",
function() Snacks.lazygit() end,
desc = "Toggle Lazygit",
},
Expand All @@ -78,7 +78,13 @@ return {
},
{
"<C-p>",
function() Snacks.picker.files { layout = { preset = "vscode" } } end,
function()
if vim.b.gitsigns_head or vim.b.gitsigns_head then
Snacks.picker.git_files { layout = { preset = "vscode" } }
else
Snacks.picker.files { layout = { preset = "vscode" } }
end
end,
desc = "Find Files",
},
{
Expand Down Expand Up @@ -110,7 +116,7 @@ return {
},
{
"<leader>fg",
function() Snacks.picker.git_files { layout = { preset = "vscode" } } end,
function() Snacks.picker.git_files { untracked = true, layout = { preset = "vscode" } } end,
desc = "Find Git Files",
},
{
Expand Down
20 changes: 18 additions & 2 deletions .config/nvim/lua/user/plugins/theme.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,30 @@ return {
},
{
'vague2k/vague.nvim',
branch = '1.3',
enabled = false,
priority = 1000,
opts = { transparent = false },
config = function(_, opts)
require('vague').setup(opts)
local vague = require 'vague'
vague.setup(opts)
local palette = vague.get_palette()

vim.cmd.colorscheme 'vague'
vim.api.nvim_set_hl(0, 'StatusLine', { bg = '#181818' })

vim.api.nvim_set_hl(0, '@tag.attribute', { bg = palette.property })
vim.api.nvim_set_hl(0, 'WinBar', { bg = palette.bg })
vim.api.nvim_set_hl(0, 'SnacksPickerMatch', { fg = palette.delta })
vim.api.nvim_set_hl(
0,
'QuickScopePrimary',
{ fg = palette.delta, bg = palette.visual, bold = true, undercurl = true }
)
vim.api.nvim_set_hl(
0,
'QuickScopeSecondary',
{ fg = palette.hint, bg = palette.visual, bold = true, undercurl = true }
)
end,
},
{
Expand Down

0 comments on commit b012c8c

Please sign in to comment.