Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f7a2b45
Added my initial changes to kickstart.nvim.
Capscience Dec 12, 2023
b633984
Fixed moving highlighted lines up and down.
Capscience Dec 21, 2023
2f96cf5
Show gitignored files and fix keymap not working.
Capscience Aug 6, 2024
a4c6b9b
Merge branch 'master' of https://github.com/nvim-lua/kickstart.nvim i…
Capscience Aug 6, 2024
aee96b1
Merge branch 'nvim-lua-master'
Capscience Aug 6, 2024
fa10632
Merge pull request #2 from nvim-lua/master
Capscience Dec 3, 2024
8a1f4d3
Update nvim config.
Capscience Dec 3, 2024
f96e7f4
Properly disable copilot
Capscience Dec 3, 2024
31e3da4
Merge branch 'master' of github.com:nvim-lua/kickstart.nvim into nvim…
Capscience May 7, 2025
6ed2e6e
Merge branch 'nvim-lua-master'
Capscience May 7, 2025
0719d87
Remove old lines to fix config.
Capscience May 7, 2025
17bee8e
Fix theme and change back to enter autocompletion.
Capscience May 11, 2025
e678569
Added oil.nvim for directory manipulation.
Capscience May 12, 2025
090b1f5
Add configurations for autopairs
Capscience Jun 5, 2025
b14e4c6
Add centering to some vertical move keybinds
Capscience Jun 5, 2025
f2ef881
Fix having two themes at the same time
Capscience Jun 5, 2025
ea5c726
Modularize the config for easier merges from kickstart.nvim
Capscience Jun 5, 2025
b719c4d
Add neorg plugin
Capscience Jun 5, 2025
b6bf66b
Remove plugin duplicate
Capscience Jun 12, 2025
bda928c
Enable virtual lines for nicer error messages
Capscience Jun 12, 2025
6e17425
Add some plugins
Capscience Jun 12, 2025
83f447d
Disable <leader>tt in insert mode
Capscience Jun 12, 2025
563f568
Add more filetypes for some autopairs
Capscience Jun 17, 2025
84841a2
Comment out the unused neo-tree plugin
Capscience Jun 17, 2025
1fce6c5
Added rustaceanvim plugin
Capscience Jun 25, 2025
7b706c3
Merge branch 'kickstart'
Capscience Jun 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ tags
test.sh
.luarc.json
nvim
lazy-lock.json

spell/
lazy-lock.json
69 changes: 47 additions & 22 deletions init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ vim.g.mapleader = ' '
vim.g.maplocalleader = ' '

-- 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 ]]
-- See `:help vim.o`
Expand All @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false
vim.o.number = true
-- You can also add relative line numbers, to help with jumping.
-- Experiment for yourself to see if you like it!
-- vim.o.relativenumber = true
vim.o.relativenumber = true

-- Enable mouse mode, can be useful for resizing splits for example!
vim.o.mouse = 'a'
Expand Down Expand Up @@ -176,6 +176,17 @@ vim.keymap.set('n', '<Esc>', '<cmd>nohlsearch<CR>')
-- Diagnostic keymaps
vim.keymap.set('n', '<leader>q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' })

-- Move highlighted lines up and down
vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
vim.keymap.set('v', 'K', ":m '>-2<CR>gv=gv")

-- Center search results
vim.keymap.set('n', 'n', 'nzz')
vim.keymap.set('n', 'N', 'Nzz')
vim.keymap.set('n', 'G', 'Gzz')
vim.keymap.set('n', '<C-u>', '<C-u>zz')
vim.keymap.set('n', '<C-d>', '<C-d>zz')

-- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier
-- for people to discover. Otherwise, you normally need to press <C-\><C-n>, which
-- is not what someone will guess without a bit more experience.
Expand Down Expand Up @@ -249,6 +260,10 @@ require('lazy').setup({
-- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link).
'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically

-- Git related plugins
'tpope/vim-fugitive',
'tpope/vim-rhubarb',

-- NOTE: Plugins can also be added by using a table,
-- with the first argument being the link and the following
-- keys can be used to configure plugin behavior/loading/etc.
Expand Down Expand Up @@ -284,6 +299,19 @@ require('lazy').setup({
},
},

{
-- Set lualine as statusline
'nvim-lualine/lualine.nvim',
-- See `:help lualine.txt`
opts = {
options = {
icons_enabled = false,
theme = 'oxocarbon',
-- component_separators = '|',
-- section_separators = '',
},
},
},
-- NOTE: Plugins can also be configured to run Lua code when they are loaded.
--
-- This is often very useful to both group configuration, as well as handle
Expand Down Expand Up @@ -653,6 +681,9 @@ require('lazy').setup({
return diagnostic_message[diagnostic.severity]
end,
},
virtual_lines = {
current_line = true,
},
}

-- LSP servers and clients are able to communicate to each other what features they support.
Expand Down Expand Up @@ -799,12 +830,12 @@ require('lazy').setup({
-- `friendly-snippets` contains a variety of premade snippets.
-- See the README about individual language/framework/plugin snippets:
-- https://github.com/rafamadriz/friendly-snippets
-- {
-- 'rafamadriz/friendly-snippets',
-- config = function()
-- require('luasnip.loaders.from_vscode').lazy_load()
-- end,
-- },
{
'rafamadriz/friendly-snippets',
config = function()
require('luasnip.loaders.from_vscode').lazy_load()
end,
},
},
opts = {},
},
Expand Down Expand Up @@ -835,7 +866,7 @@ require('lazy').setup({
-- <c-k>: Toggle signature help
--
-- See :h blink-cmp-config-keymap for defining your own keymap
preset = 'default',
preset = 'enter',

-- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see:
-- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps
Expand Down Expand Up @@ -881,20 +912,14 @@ require('lazy').setup({
-- change the command in the config to whatever the name of that colorscheme is.
--
-- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`.
'folke/tokyonight.nvim',
'nyoom-engineering/oxocarbon.nvim',
priority = 1000, -- Make sure to load this before all the other start plugins.
config = function()
---@diagnostic disable-next-line: missing-fields
require('tokyonight').setup {
styles = {
comments = { italic = false }, -- Disable italics in comments
},
}

-- Load the colorscheme here.
-- Like many other themes, this one has different styles, and you could load
-- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'.
vim.cmd.colorscheme 'tokyonight-night'
vim.cmd.colorscheme 'oxocarbon'
vim.opt.background = 'dark'
end,
},

Expand Down Expand Up @@ -974,17 +999,17 @@ require('lazy').setup({
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
--
-- require 'kickstart.plugins.debug',
-- require 'kickstart.plugins.indent_line',
require 'kickstart.plugins.indent_line',
-- require 'kickstart.plugins.lint',
-- require 'kickstart.plugins.autopairs',
require 'kickstart.plugins.autopairs',
-- require 'kickstart.plugins.neo-tree',
-- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps
require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps

-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
-- 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.
-- { import = 'custom.plugins' },
{ import = 'custom.plugins' },
--
-- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec`
-- Or use telescope!
Expand Down
104 changes: 103 additions & 1 deletion lua/custom/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,106 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}
return {
-- Undotree for saving file editing history
'mbbill/undotree',

-- TS Autotag for html auto tag close
'windwp/nvim-ts-autotag',

-- Better jinja2 support
'HiPhish/jinja.vim',

-- Navigation integration for tmux
'christoomey/vim-tmux-navigator',

-- More convenient way to use terminal from neovim
{
'akinsho/toggleterm.nvim',
config = function()
require('toggleterm').setup {
size = function(term)
if term.direction == 'horizontal' then
return 15
elseif term.direction == 'vertical' then
return vim.o.columns * 0.4
end
end,
open_mapping = '<leader>tt',
insert_mappings = false,
direction = 'float',
shell = '/usr/bin/fish',
}
end,
},

-- Harpoon for fast navigation within a project
{
'theprimeagen/harpoon',
config = function()
local mark = require 'harpoon.mark'
local ui = require 'harpoon.ui'

vim.keymap.set('n', '<C-a>', mark.add_file)
vim.keymap.set('n', '<C-e>', ui.toggle_quick_menu)

vim.keymap.set('n', '<C-t>', function()
ui.nav_file(1)
end)
vim.keymap.set('n', '<C-n>', function()
ui.nav_file(2)
end)
vim.keymap.set('n', '<C-s>', function()
ui.nav_file(3)
end)
end,
},

-- Oil.nvim for directory manipulation
{
'stevearc/oil.nvim',
---@module 'oil'
---@type oil.SetupOpts
opts = {},
-- Optional dependencies
dependencies = { { 'echasnovski/mini.icons', opts = {} } },
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
lazy = false,
config = function()
require('oil').setup()
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
end,
},

{
'nvim-neorg/neorg',
lazy = false,
version = '*',
config = function()
require('neorg').setup {
load = {
['core.defaults'] = {},
['core.concealer'] = {},
['core.dirman'] = {
config = {
workspaces = {
notes = '~/notes',
},
default_workspace = 'notes',
},
},
['core.summary'] = {},
},
}

vim.wo.foldlevel = 99
vim.wo.conceallevel = 2
end,
},

-- INFO: Previously used, now disabled plugins

-- Github copilot
-- 'github/copilot.vim',
}
5 changes: 5 additions & 0 deletions lua/custom/plugins/rustaceanvim.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
return {
'mrcjkb/rustaceanvim',
version = '^6',
lazy = false,
}
46 changes: 45 additions & 1 deletion lua/kickstart/plugins/autopairs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,49 @@
return {
'windwp/nvim-autopairs',
event = 'InsertEnter',
opts = {},
config = function()
local npairs = require 'nvim-autopairs'
npairs.setup {}
local Rule = require 'nvim-autopairs.rule'
local cond = require 'nvim-autopairs.conds'

-- INFO: Add 'ins' inside 'a1' and 'a2' for specified language(s)

local function rule2(a1, ins, a2, lang)
npairs.add_rule(Rule(ins, ins, lang)
:with_pair(function(opts)
return a1 .. a2 == opts.line:sub(opts.col - #a1, opts.col + #a2 - 1)
end)
:with_move(cond.none())
:with_cr(cond.none())
:with_del(function(opts)
local col = vim.api.nvim_win_get_cursor(0)[2]
return a1 .. ins .. ins .. a2 == opts.line:sub(col - #a1 - #ins + 1, col + #ins + #a2) -- insert only works for #ins == 1 anyway
end))
end

rule2('{', '%', '}', { 'html', 'htmldjango', 'jinja' })
rule2('{%', ' ', '%}', { 'html', 'htmldjango', 'jinja' })
rule2('{', ':', '}', 'norg')
rule2('(', ' ', ')')
rule2('[', ' ', ']')
rule2('{', ' ', '}')

-- INFO: Add autopairs <> mainly for rust types and generics
npairs.add_rule(Rule('<', '>', {
-- if you use nvim-ts-autotag, you may want to exclude these filetypes from this rule
-- so that it doesn't conflict with nvim-ts-autotag
'-html',
'-javascriptreact',
'-typescriptreact',
}):with_pair(
-- regex will make it so that it will auto-pair on
-- `a<` but not `a <`
-- The `:?:?` part makes it also
-- work on Rust generics like `some_func::<T>()`
cond.before_regex('%a+:?:?$', 3)
):with_move(function(opts)
return opts.char == '>'
end))
end,
}
Loading