updte and added some plugins fav is Harpoon :)

This commit is contained in:
Delvin Yamoah 2026-03-13 22:23:43 +00:00
parent 58170c7ae3
commit 618bf42ab5
7 changed files with 148 additions and 120 deletions

1
.gitignore vendored
View File

@ -8,6 +8,5 @@ spell/
# You likely want to comment this, since it's recommended to track lazy-lock.json in version # You likely want to comment this, since it's recommended to track lazy-lock.json in version
# control, see https://lazy.folke.io/usage/lockfile # control, see https://lazy.folke.io/usage/lockfile
# For kickstart, it makes sense to leave it ignored. # For kickstart, it makes sense to leave it ignored.
lazy-lock.json
.DS_Store .DS_Store

190
init.lua
View File

@ -1,97 +1,14 @@
--[[ -- Thanks TJ :)
=====================================================================
==================== READ THIS BEFORE CONTINUING ====================
=====================================================================
======== .-----. ========
======== .----------------------. | === | ========
======== |.-""""""""""""""""""-.| |-----| ========
======== || || | === | ========
======== || KICKSTART.NVIM || |-----| ========
======== || || | === | ========
======== || || |-----| ========
======== ||:Tutor || |:::::| ========
======== |'-..................-'| |____o| ========
======== `"")----------------(""` ___________ ========
======== /::::::::::| |::::::::::\ \ no mouse \ ========
======== /:::========| |==hjkl==:::\ \ required \ ========
======== '""""""""""""' '""""""""""""' '""""""""""' ========
======== ========
=====================================================================
=====================================================================
What is Kickstart?
Kickstart.nvim is *not* a distribution.
Kickstart.nvim is a starting point for your own configuration.
The goal is that you can read every line of code, top-to-bottom, understand
what your configuration is doing, and modify it to suit your needs.
Once you've done that, you can start exploring, configuring and tinkering to
make Neovim your own! That might mean leaving Kickstart just the way it is for a while
or immediately breaking it into modular pieces. It's up to you!
If you don't know anything about Lua, I recommend taking some time to read through
a guide. One possible example which will only take 10-15 minutes:
- https://learnxinyminutes.com/docs/lua/
After understanding a bit more about Lua, you can use `:help lua-guide` as a
reference for how Neovim integrates Lua.
- :help lua-guide
- (or HTML version): https://neovim.io/doc/user/lua-guide.html
Kickstart Guide:
TODO: The very first thing you should do is to run the command `:Tutor` in Neovim.
If you don't know what this means, type the following:
- <escape key>
- :
- Tutor
- <enter key>
(If you already know the Neovim basics, you can skip this step.)
Once you've completed that, you can continue working through **AND READING** the rest
of the kickstart init.lua.
Next, run AND READ `:help`.
This will open up a help window with some basic information
about reading, navigating and searching the builtin help documentation.
This should be the first place you go to look when you're stuck or confused
with something. It's one of my favorite Neovim features.
MOST IMPORTANTLY, we provide a keymap "<space>sh" to [s]earch the [h]elp documentation,
which is very useful when you're not exactly sure of what you're looking for.
I have left several `:help X` comments throughout the init.lua
These are hints about where to find more information about the relevant settings,
plugins or Neovim features used in Kickstart.
NOTE: Look for lines like this
Throughout the file. These are for you, the reader, to help you understand what is happening.
Feel free to delete them once you know what you're doing, but they should serve as a guide
for when you are first encountering a few different constructs in your Neovim config.
If you experience any errors while trying to install kickstart, run `:checkhealth` for more info.
I hope you enjoy your Neovim journey,
- TJ
P.S. You can delete this when you're done too. It's your config now! :)
--]]
-- Set <space> as the leader key -- Set <space> as the leader key
-- See `:help mapleader` -- See `:help mapleader`
-- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used)
vim.g.mapleader = ' ' vim.g.mapleader = ' '
vim.g.maplocalleader = ' ' vim.g.maplocalleader = ' '
vim.opt.guicursor = ''
-- Set to true if you have a Nerd Font installed and selected in the terminal -- Set to true if you have a Nerd Font installed and selected in the terminal
vim.g.have_nerd_font = false vim.g.have_nerd_font = true
-- [[ Setting options ]] -- [[ Setting options ]]
-- See `:help vim.o` -- See `:help vim.o`
@ -100,9 +17,7 @@ vim.g.have_nerd_font = false
-- Make line numbers default -- Make line numbers default
vim.o.number = true vim.o.number = true
-- You can also add relative line numbers, to help with jumping. vim.o.relativenumber = true
-- Experiment for yourself to see if you like it!
-- vim.o.relativenumber = true
-- Enable mouse mode, can be useful for resizing splits for example! -- Enable mouse mode, can be useful for resizing splits for example!
vim.o.mouse = 'a' vim.o.mouse = 'a'
@ -114,13 +29,35 @@ vim.o.showmode = false
-- Schedule the setting after `UiEnter` because it can increase startup-time. -- Schedule the setting after `UiEnter` because it can increase startup-time.
-- Remove this option if you want your OS clipboard to remain independent. -- Remove this option if you want your OS clipboard to remain independent.
-- See `:help 'clipboard'` -- See `:help 'clipboard'`
vim.schedule(function() vim.o.clipboard = 'unnamedplus' end) -- vim.schedule(function() vim.o.clipboard = 'unnamedplus' end)
vim.keymap.set('n', '<leader>y', '"+y')
vim.keymap.set('v', '<leader>y', '"+y')
vim.keymap.set('n', '<leader>yap', '"+yap')
vim.keymap.set('v', '<leader>yap', '"+yap')
vim.keymap.set('n', '<leader>p', '"+p')
-- Navigating highlighted text after vap or v-j or k
vim.keymap.set('v', '<A-j>', ":m '>+1<CR>gv=gv")
vim.keymap.set('v', '<A-k>', ":m '<-2<CR>gv=gv")
vim.keymap.set('v', '<A-h>', '<gv')
-- Deleting buffers
vim.keymap.set('n', '<leader>bd', vim.cmd.bdelete)
-- go to project view
vim.keymap.set('n', '<leader>pv', vim.cmd.Ex)
-- Enable break indent -- Enable break indent
vim.o.breakindent = true vim.o.breakindent = true
vim.keymap.set('v', '<A-l>', '>gv')
-- Enable break indent
-- vim.o.breakindent = true
-- Enable undo/redo changes even after closing and reopening a file -- Enable undo/redo changes even after closing and reopening a file
vim.o.undofile = true vim.o.undofile = true
vim.opt.swapfile = false
vim.opt.undodir = os.getenv 'HOME' .. '/.vim/undodir'
-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term -- Case-insensitive searching UNLESS \C or one or more capital letters in the search term
vim.o.ignorecase = true vim.o.ignorecase = true
@ -129,6 +66,11 @@ vim.o.smartcase = true
-- Keep signcolumn on by default -- Keep signcolumn on by default
vim.o.signcolumn = 'yes' vim.o.signcolumn = 'yes'
-- color column
vim.opt.colorcolumn = '100'
-- most disgusting keymap to quit
vim.keymap.set('n', '<leader>qq', vim.cmd.q)
-- Decrease update time -- Decrease update time
vim.o.updatetime = 250 vim.o.updatetime = 250
@ -150,6 +92,11 @@ vim.o.splitbelow = true
vim.o.list = true vim.o.list = true
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' } vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = false
-- Preview substitutions live, as you type! -- Preview substitutions live, as you type!
vim.o.inccommand = 'split' vim.o.inccommand = 'split'
@ -167,6 +114,9 @@ vim.o.confirm = true
-- [[ Basic Keymaps ]] -- [[ Basic Keymaps ]]
-- See `:help vim.keymap.set()` -- See `:help vim.keymap.set()`
-- making jj to act like Esc
vim.keymap.set('i', 'jj', '<Esc>')
-- Clear highlights on search when pressing <Esc> in normal mode -- Clear highlights on search when pressing <Esc> in normal mode
-- See `:help hlsearch` -- See `:help hlsearch`
vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>') vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
@ -303,27 +253,28 @@ require('lazy').setup({
-- Then, because we use the `opts` key (recommended), the configuration runs -- Then, because we use the `opts` key (recommended), the configuration runs
-- after the plugin has been loaded as `require(MODULE).setup(opts)`. -- after the plugin has been loaded as `require(MODULE).setup(opts)`.
{ -- Useful plugin to show you pending keybinds. -- I'd intentionally hide which key... might see its use later
'folke/which-key.nvim', -- { -- Useful plugin to show you pending keybinds.
event = 'VimEnter', -- 'folke/which-key.nvim',
---@module 'which-key' -- event = 'VimEnter',
---@type wk.Opts -- ---@module 'which-key'
---@diagnostic disable-next-line: missing-fields -- ---@type wk.Opts
opts = { -- ---@diagnostic disable-next-line: missing-fields
-- delay between pressing a key and opening which-key (milliseconds) -- opts = {
delay = 0, -- -- delay between pressing a key and opening which-key (milliseconds)
icons = { mappings = vim.g.have_nerd_font }, -- delay = 0,
-- icons = { mappings = vim.g.have_nerd_font },
-- Document existing key chains --
spec = { -- -- Document existing key chains
{ '<leader>s', group = '[S]earch', mode = { 'n', 'v' } }, -- spec = {
{ '<leader>t', group = '[T]oggle' }, -- { '<leader>s', group = '[S]earch', mode = { 'n', 'v' } },
{ '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } }, -- Enable gitsigns recommended keymaps first -- { '<leader>t', group = '[T]oggle' },
{ 'gr', group = 'LSP Actions', mode = { 'n' } }, -- { '<leader>h', group = 'Git [H]unk', mode = { 'n', 'v' } }, -- Enable gitsigns recommended keymaps first
}, -- { 'gr', group = 'LSP Actions', mode = { 'n' } },
}, -- },
}, -- },
-- },
--
-- NOTE: Plugins can specify dependencies. -- NOTE: Plugins can specify dependencies.
-- --
-- The dependencies are proper plugin specifications as well - anything -- The dependencies are proper plugin specifications as well - anything
@ -360,7 +311,7 @@ require('lazy').setup({
{ 'nvim-telescope/telescope-ui-select.nvim' }, { 'nvim-telescope/telescope-ui-select.nvim' },
-- Useful for getting pretty icons, but requires a Nerd Font. -- Useful for getting pretty icons, but requires a Nerd Font.
{ 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, { 'nvim-tree/nvim-web-devicons', disabled = vim.g.have_nerd_font },
}, },
config = function() config = function()
-- Telescope is a fuzzy finder that comes with a lot of different things that -- Telescope is a fuzzy finder that comes with a lot of different things that
@ -589,9 +540,9 @@ require('lazy').setup({
-- code, if the language server you are using supports them -- code, if the language server you are using supports them
-- --
-- This may be unwanted, since they displace some of your code -- This may be unwanted, since they displace some of your code
if client and client:supports_method('textDocument/inlayHint', event.buf) then -- if client and client:supports_method('textDocument/inlayHint', event.buf) then
map('<leader>th', function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) end, '[T]oggle Inlay [H]ints') -- map('<leader>th', function() vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) end, '[T]oggle Inlay [H]ints')
end -- end
end, end,
}) })
@ -600,9 +551,9 @@ require('lazy').setup({
-- See `:help lsp-config` for information about keys and how to configure -- See `:help lsp-config` for information about keys and how to configure
---@type table<string, vim.lsp.Config> ---@type table<string, vim.lsp.Config>
local servers = { local servers = {
-- clangd = {}, clangd = {},
-- gopls = {}, -- gopls = {},
-- pyright = {}, pyright = {},
-- rust_analyzer = {}, -- rust_analyzer = {},
-- --
-- Some languages (like typescript) have entire language plugins that can be useful: -- Some languages (like typescript) have entire language plugins that can be useful:
@ -811,6 +762,7 @@ require('lazy').setup({
styles = { styles = {
comments = { italic = false }, -- Disable italics in comments comments = { italic = false }, -- Disable italics in comments
}, },
transparent = true,
} }
-- Load the colorscheme here. -- Load the colorscheme here.
@ -854,7 +806,7 @@ require('lazy').setup({
-- and try some other statusline plugin -- and try some other statusline plugin
local statusline = require 'mini.statusline' local statusline = require 'mini.statusline'
-- set use_icons to true if you have a Nerd Font -- set use_icons to true if you have a Nerd Font
statusline.setup { use_icons = vim.g.have_nerd_font } statusline.setup { use_icons = false }
-- You can configure sections in the statusline by overriding their -- You can configure sections in the statusline by overriding their
-- default behavior. For example, here we set the section for -- default behavior. For example, here we set the section for
@ -920,7 +872,7 @@ require('lazy').setup({
-- This is the easiest way to modularize your config. -- This is the easiest way to modularize your config.
-- --
-- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going.
-- { import = 'custom.plugins' }, { import = 'custom.plugins' },
-- --
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope! -- Or use telescope!

27
lazy-lock.json Normal file
View File

@ -0,0 +1,27 @@
{
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
"blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
"fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" },
"gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
"hardtime.nvim": { "branch": "main", "commit": "b4e431934af1fe224a3a801f632c008278cb7628" },
"harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "a676ab7282da8d651e175118bcf54483ca11e46d" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
"mini.nvim": { "branch": "main", "commit": "9990c41f10f54f29a888d13024c9f765037bde23" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-lspconfig": { "branch": "master", "commit": "883c6495b53fccbd35d0938aac8bdf72f6d499c0" },
"nvim-treesitter": { "branch": "main", "commit": "493890b87a81dfe6a7e577dbc364ae33fa482da9" },
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
"undotree": { "branch": "main", "commit": "0e6d41d55ad147407e4ba00a292973de8db0b836" },
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }
}

View File

@ -0,0 +1,4 @@
return {
'tpope/vim-fugitive',
config = function() vim.keymap.set('n', '<leader>gs', vim.cmd.Git, { desc = 'fugitive git status' }) end,
}

View File

@ -0,0 +1,18 @@
return {
'm4xshen/hardtime.nvim',
dependencies = { 'MunifTanjim/nui.nvim', 'nvim-lua/plenary.nvim' },
opts = {
-- Set to false if you want to keep using your mouse while learning
disable_mouse = true,
-- After 3 repeated presses of a key, it will block you for 1 second
max_time = 1000,
max_count = 3,
-- This will give you hints like "Use 5j instead of jjjjj"
hint = true,
-- You can disable it for specific filetypes like the Lazy dashboard
disabled_filetypes = { 'qf', 'netrw', 'NvimTree', 'lazy', 'mason' },
},
}

View File

@ -0,0 +1,19 @@
return {
'ThePrimeagen/harpoon',
-- No branch needed; defaults to master (Harpoon 1)
dependencies = { 'nvim-lua/plenary.nvim' },
config = function()
local mark = require 'harpoon.mark'
local ui = require 'harpoon.ui'
-- Keymaps for Harpoon 1
vim.keymap.set('n', '<leader>h', mark.add_file)
vim.keymap.set('n', '<leader>H', ui.toggle_quick_menu)
-- Quick Jumps
vim.keymap.set('n', '<leader>1', function() ui.nav_file(1) end)
vim.keymap.set('n', '<leader>2', function() ui.nav_file(2) end)
vim.keymap.set('n', '<leader>3', function() ui.nav_file(3) end)
-- Add more as needed
end,
}

View File

@ -0,0 +1,9 @@
return {
'jiaoshijie/undotree',
opts = {
-- your options
},
keys = { -- load the plugin only when using it's keybinding:
{ '<leader>u', "<cmd>lua require('undotree').toggle()<cr>" },
},
}