Skip to content

Commit 2080d9a

Browse files
committed
Config Update
- Added a bunch of plugins - Added `minicyan` colorscheme
1 parent 5bdde24 commit 2080d9a

File tree

8 files changed

+849
-61
lines changed

8 files changed

+849
-61
lines changed

colors/minicyan.lua

Lines changed: 689 additions & 0 deletions
Large diffs are not rendered by default.

init.lua

Lines changed: 52 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
--[[
2-
32
=====================================================================
43
==================== READ THIS BEFORE CONTINUING ====================
54
=====================================================================
@@ -91,7 +90,7 @@ vim.g.mapleader = ' '
9190
vim.g.maplocalleader = ' '
9291

9392
-- Set to true if you have a Nerd Font installed and selected in the terminal
94-
vim.g.have_nerd_font = false
93+
vim.g.have_nerd_font = true
9594

9695
-- [[ Setting options ]]
9796
-- See `:help vim.opt`
@@ -102,7 +101,7 @@ vim.g.have_nerd_font = false
102101
vim.opt.number = true
103102
-- You can also add relative line numbers, to help with jumping.
104103
-- Experiment for yourself to see if you like it!
105-
-- vim.opt.relativenumber = true
104+
vim.opt.relativenumber = true
106105

107106
-- Enable mouse mode, can be useful for resizing splits for example!
108107
vim.opt.mouse = 'a'
@@ -166,6 +165,17 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
166165
-- Diagnostic keymaps
167166
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })
168167

168+
-- Return to Snacks.nvim Dashboard
169+
vim.keymap.set('n', '<leader>:q', '<cmd>lua Snacks.dashboard()<CR>', { desc = 'Return to Snacks.nvim Dashboard' })
170+
171+
-- Map <leader>i in visual mode to “increment every number‐occurrence per line”
172+
vim.keymap.set('v', '<leader>i', function()
173+
-- Step 1: let i = 0 over the visual range
174+
vim.cmd 'let i = 0'
175+
176+
-- Step 2: for each line in that same range, increment i and replace all \d+ with i
177+
vim.cmd 'g/^/ let i += 1 | s/\\d\\+/\\=i/ge'
178+
end, { noremap = true, silent = true })
169179
-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
170180
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
171181
-- is not what someone will guess without a bit more experience.
@@ -242,18 +252,18 @@ require('lazy').setup({
242252
-- require('gitsigns').setup({ ... })
243253
--
244254
-- See `:help gitsigns` to understand what the configuration keys do
245-
{ -- Adds git related signs to the gutter, as well as utilities for managing changes
246-
'lewis6991/gitsigns.nvim',
247-
opts = {
248-
signs = {
249-
add = { text = '+' },
250-
change = { text = '~' },
251-
delete = { text = '_' },
252-
topdelete = { text = '' },
253-
changedelete = { text = '~' },
254-
},
255-
},
256-
},
255+
-- { -- Adds git related signs to the gutter, as well as utilities for managing changes
256+
-- 'lewis6991/gitsigns.nvim',
257+
-- opts = {
258+
-- signs = {
259+
-- add = { text = '+' },
260+
-- change = { text = '~' },
261+
-- delete = { text = '_' },
262+
-- topdelete = { text = '‾' },
263+
-- changedelete = { text = '~' },
264+
-- },
265+
-- },
266+
-- },
257267

258268
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
259269
--
@@ -458,8 +468,8 @@ require('lazy').setup({
458468
-- Automatically install LSPs and related tools to stdpath for Neovim
459469
-- Mason must be loaded before its dependents so we need to set it up here.
460470
-- NOTE: `opts = {}` is the same as calling `require('mason').setup({})`
461-
{ 'williamboman/mason.nvim', opts = {} },
462-
'williamboman/mason-lspconfig.nvim',
471+
{ 'williamboman/mason.nvim', opts = {}, version = "^1.0.0" },
472+
{ 'williamboman/mason-lspconfig.nvim', version = "^1.0.0" },
463473
'WhoIsSethDaniel/mason-tool-installer.nvim',
464474

465475
-- Useful status updates for LSP.
@@ -590,14 +600,14 @@ require('lazy').setup({
590600
})
591601

592602
-- Change diagnostic symbols in the sign column (gutter)
593-
-- if vim.g.have_nerd_font then
594-
-- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' }
595-
-- local diagnostic_signs = {}
596-
-- for type, icon in pairs(signs) do
597-
-- diagnostic_signs[vim.diagnostic.severity[type]] = icon
598-
-- end
599-
-- vim.diagnostic.config { signs = { text = diagnostic_signs } }
600-
-- end
603+
if vim.g.have_nerd_font then
604+
local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' }
605+
local diagnostic_signs = {}
606+
for type, icon in pairs(signs) do
607+
diagnostic_signs[vim.diagnostic.severity[type]] = icon
608+
end
609+
vim.diagnostic.config { signs = { text = diagnostic_signs } }
610+
end
601611

602612
-- LSP servers and clients are able to communicate to each other what features they support.
603613
-- By default, Neovim doesn't support everything that is in the LSP specification.
@@ -618,7 +628,8 @@ require('lazy').setup({
618628
local servers = {
619629
-- clangd = {},
620630
-- gopls = {},
621-
-- pyright = {},
631+
pyright = {},
632+
hls = {},
622633
-- rust_analyzer = {},
623634
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
624635
--
@@ -659,12 +670,18 @@ require('lazy').setup({
659670
-- You can add other tools here that you want Mason to install
660671
-- for you, so that they are available from within Neovim.
661672
local ensure_installed = vim.tbl_keys(servers or {})
673+
local ensure_installed_lsps = vim.tbl_keys(servers or {})
662674
vim.list_extend(ensure_installed, {
663675
'stylua', -- Used to format Lua code
664676
})
677+
vim.list_extend(ensure_installed_lsps, {
678+
'ruff',
679+
})
665680
require('mason-tool-installer').setup { ensure_installed = ensure_installed }
666681

667682
require('mason-lspconfig').setup {
683+
ensure_installed = ensure_installed_lsps,
684+
automatic_installation = false,
668685
handlers = {
669686
function(server_name)
670687
local server = servers[server_name] or {}
@@ -843,13 +860,13 @@ require('lazy').setup({
843860
-- change the command in the config to whatever the name of that colorscheme is.
844861
--
845862
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
846-
'folke/tokyonight.nvim',
863+
'EdenEast/nightfox.nvim',
847864
priority = 1000, -- Make sure to load this before all the other start plugins.
848865
init = function()
849866
-- Load the colorscheme here.
850867
-- Like many other themes, this one has different styles, and you could load
851868
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
852-
vim.cmd.colorscheme 'tokyonight-night'
869+
vim.cmd.colorscheme 'minicyan'
853870

854871
-- You can configure highlights by doing something like:
855872
vim.cmd.hi 'Comment gui=none'
@@ -876,7 +893,9 @@ require('lazy').setup({
876893
-- - sd' - [S]urround [D]elete [']quotes
877894
-- - sr)' - [S]urround [R]eplace [)] [']
878895
require('mini.surround').setup()
879-
896+
require('mini.align').setup()
897+
require('mini.sessions').setup()
898+
require('mini.colors').setup()
880899
-- Simple and easy statusline.
881900
-- You could remove this setup call if you don't like it,
882901
-- and try some other statusline plugin
@@ -931,18 +950,15 @@ require('lazy').setup({
931950
-- Here are some example plugins that I've included in the Kickstart repository.
932951
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
933952
--
934-
-- require 'kickstart.plugins.debug',
935-
-- require 'kickstart.plugins.indent_line',
936-
-- require 'kickstart.plugins.lint',
937-
-- require 'kickstart.plugins.autopairs',
938-
-- require 'kickstart.plugins.neo-tree',
939-
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
953+
require 'kickstart.plugins.debug',
954+
require 'kickstart.plugins.autopairs',
955+
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
940956

941957
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
942958
-- This is the easiest way to modularize your config.
943959
--
944960
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
945-
-- { import = 'custom.plugins' },
961+
{ import = 'custom.plugins' },
946962
--
947963
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
948964
-- Or use telescope!

lua/custom/plugins/harpoon.lua

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
return {
2+
'ThePrimeagen/harpoon',
3+
branch = 'harpoon2',
4+
opts = {
5+
menu = {
6+
width = vim.api.nvim_win_get_width(0) - 4,
7+
},
8+
settings = {
9+
save_on_toggle = true,
10+
},
11+
},
12+
keys = function()
13+
local keys = {
14+
{
15+
'<leader>a',
16+
function()
17+
require('harpoon'):list():add()
18+
end,
19+
desc = 'Harpoon File',
20+
},
21+
{
22+
'<leader>H',
23+
function()
24+
local harpoon = require 'harpoon'
25+
harpoon.ui:toggle_quick_menu(harpoon:list())
26+
end,
27+
desc = 'Harpoon Quick Menu',
28+
},
29+
}
30+
31+
for i = 1, 5 do
32+
table.insert(keys, {
33+
'<leader>' .. i,
34+
function()
35+
require('harpoon'):list():select(i)
36+
end,
37+
desc = 'Harpoon to File ' .. i,
38+
})
39+
end
40+
return keys
41+
end,
42+
}

lua/custom/plugins/lazygit.lua

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
-- nvim v0.8.0
2+
return {
3+
'kdheepak/lazygit.nvim',
4+
lazy = true,
5+
cmd = {
6+
'LazyGit',
7+
'LazyGitConfig',
8+
'LazyGitCurrentFile',
9+
'LazyGitFilter',
10+
'LazyGitFilterCurrentFile',
11+
},
12+
-- optional for floating window border decoration
13+
dependencies = {
14+
'nvim-lua/plenary.nvim',
15+
},
16+
-- setting the keybinding for LazyGit with 'keys' is recommended in
17+
-- order to load the plugin when the command is run for the first time
18+
keys = {
19+
{ '<leader>lg', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
20+
},
21+
}

lua/custom/plugins/leetcode.lua

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
return {
2+
'kawre/leetcode.nvim',
3+
build = ':TSUpdate html', -- if you have `nvim-treesitter` installed
4+
dependencies = {
5+
'nvim-telescope/telescope.nvim',
6+
-- "ibhagwan/fzf-lua",
7+
'nvim-lua/plenary.nvim',
8+
'MunifTanjim/nui.nvim',
9+
},
10+
opts = {
11+
lang = 'python',
12+
-- configuration goes here
13+
},
14+
}

lua/custom/plugins/oil.lua

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
return {
2+
'stevearc/oil.nvim',
3+
---@module 'oil'
4+
---@type oil.SetupOpts
5+
opts = {},
6+
-- Optional dependencies
7+
dependencies = { { "echasnovski/mini.icons", opts = {} } },
8+
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
9+
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
10+
lazy = false,
11+
}

lua/custom/plugins/snacks.lua

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
return {
2+
'folke/snacks.nvim',
3+
priority = 1000,
4+
lazy = false,
5+
---@type snacks.Config
6+
opts = {
7+
-- your configuration comes here
8+
-- or leave it empty to use the default settings
9+
-- refer to the configuration section below
10+
bigfile = { enabled = true },
11+
dashboard = { example = 'advanced' },
12+
indent = { enabled = true },
13+
input = { enabled = true },
14+
notifier = { enabled = true },
15+
quickfile = { enabled = true },
16+
scroll = { enabled = true },
17+
statuscolumn = { enabled = true },
18+
words = { enabled = true },
19+
},
20+
}

lua/kickstart/plugins/neo-tree.lua

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)