Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file added .DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ tags
test.sh
.luarc.json
nvim

spell/
lazy-lock.json
275 changes: 225 additions & 50 deletions init.lua

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions lazy-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "73813308abc2eaeff2bc0d3f2f79270c491be9d7" },
"blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" },
"catppuccin": { "branch": "main", "commit": "da33755d00e09bff2473978910168ff9ea5dc453" },
"conform.nvim": { "branch": "master", "commit": "cde4da5c1083d3527776fee69536107d98dae6c9" },
"curl.nvim": { "branch": "main", "commit": "3ee14fbafc8169fc803e80562ce7ac5b4474bdff" },
"fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" },
"git-blame.nvim": { "branch": "master", "commit": "9874ec1ec8bc53beb33b7cd82c092b85271a578b" },
"github-theme": { "branch": "main", "commit": "c106c9472154d6b2c74b74565616b877ae8ed31d" },
"gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" },
"guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" },
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"lazygit.nvim": { "branch": "main", "commit": "2305deed25bc61b866d5d39189e9105a45cf1cfb" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "b1d9a914b02ba5660f1e272a03314b31d4576fe2" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
"mini.icons": { "branch": "main", "commit": "ff2e4f1d29f659cc2bad0f9256f2f6195c6b2428" },
"mini.nvim": { "branch": "main", "commit": "dce9bc4e19d02d5c37fe71c16f40f8a5536b0386" },
"monokai-pro.nvim": { "branch": "master", "commit": "1ac671f6da720cba967d28d25c2f16b8b4e18808" },
"nightfox.nvim": { "branch": "main", "commit": "ba47d4b4c5ec308718641ba7402c143836f35aa9" },
"nvim-lspconfig": { "branch": "master", "commit": "95fe3c170753238d3ca4f760e79a991400677abc" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"oil.nvim": { "branch": "master", "commit": "7e1cd7703ff2924d7038476dcbc04b950203b902" },
"onedark.nvim": { "branch": "master", "commit": "6c10964f91321c6a0f09bcc41dd64e7a6602bc4f" },
"oxocarbon.nvim": { "branch": "main", "commit": "9f85f6090322f39b11ae04a343d4eb9d12a86897" },
"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": "3a12a853ebf21ec1cce9a92290e3013f8ae75f02" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}
Binary file added lua/.DS_Store
Binary file not shown.
70 changes: 70 additions & 0 deletions lua/arnoldlei/remap.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
vim.g.mapleader = ' '
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' })
vim.keymap.set('n', '<leader>pv', '<CMD>Oil<CR>', { desc = 'Open parent directory' })

-- Window splits
vim.keymap.set('n', '|', '<cmd>vsplit<CR>', { desc = 'Split window vertically' })
vim.keymap.set('n', '_', '<cmd>split<CR>', { desc = 'Split window horizontally' })

-- Window navigation
-- vim.keymap.set('n', '<C-h>', '<C-w>h', { desc = 'Move to left window' })
-- vim.keymap.set('n', '<C-j>', '<C-w>j', { desc = 'Move to window below' })
-- vim.keymap.set('n', '<C-k>', '<C-w>k', { desc = 'Move to window above' })
-- vim.keymap.set('n', '<C-l>', '<C-w>l', { desc = 'Move to right window' })

vim.keymap.set('v', 'J', ":m '>+1<CR>gv=gv")
vim.keymap.set('v', 'K', ":m '<-2<CR>gv=gv")

vim.keymap.set('n', 'J', 'mzJ`z')
vim.keymap.set('n', '<C-d>', '<C-d>zz')
vim.keymap.set('n', '<C-u>', '<C-u>zz')
vim.keymap.set('n', 'n', 'nzzzv')
vim.keymap.set('n', 'N', 'Nzzzv')

-- greatest remap ever
vim.keymap.set('x', '<leader>p', [["_dP]])

-- next greatest remap ever : asbjornHaland
vim.keymap.set({ 'n', 'v' }, '<leader>y', [["+y]])
vim.keymap.set('n', '<leader>Y', [["+Y]])

vim.keymap.set({ 'n', 'v' }, '<leader>d', [["_d]])

-- This is going to get me cancelled
vim.keymap.set('i', '<C-c>', '<Esc>')

vim.keymap.set('n', 'Q', '<nop>')
vim.keymap.set('n', '<C-f>', '<cmd>silent !tmux neww tmux-sessionizer<CR>')
vim.keymap.set('n', '<leader>f', vim.lsp.buf.format)

-- vim.keymap.set("n", "<C-k>", "<cmd>cnext<CR>zz")
-- vim.keymap.set("n", "<C-j>", "<cmd>cprev<CR>zz")
vim.keymap.set('n', '<leader>k', '<cmd>lnext<CR>zz')
vim.keymap.set('n', '<leader>j', '<cmd>lprev<CR>zz')

vim.keymap.set('n', '<leader>s', [[:%s/\<<C-r><C-w>\>/<C-r><C-w>/gI<Left><Left><Left>]])
vim.keymap.set('n', '<leader>x', '<cmd>!chmod +x %<CR>', { silent = true })

vim.keymap.set('n', '<leader>vpp', '<cmd>e ~/.dotfiles/nvim/.config/nvim/lua/theprimeagen/packer.lua<CR>')
vim.keymap.set('n', '<leader>mr', '<cmd>CellularAutomaton make_it_rain<CR>')

vim.keymap.set('n', '<leader>sf', ':source $HOME/.config/nvim/init.lua <CR>', { desc = 'Source Neovim config' })

vim.keymap.set('n', '<leader><leader>', function()
vim.cmd 'so'
end)

-- Jump to beginning/end of method
vim.keymap.set('n', '[m', '[m', { desc = 'Jump to beginning of method' })
vim.keymap.set('n', ']m', ']m', { desc = 'Jump to end of method' })

-- Diagnostic navigation with float
vim.keymap.set('n', '[d', function()
vim.diagnostic.goto_prev()
vim.diagnostic.open_float()
end, { desc = 'Go to previous diagnostic' })

vim.keymap.set('n', ']d', function()
vim.diagnostic.goto_next()
vim.diagnostic.open_float()
end, { desc = 'Go to next diagnostic' })
27 changes: 27 additions & 0 deletions lua/arnoldlei/set.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
vim.opt.nu = true
vim.opt.relativenumber = true

vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.expandtab = true

vim.opt.smartindent = true

vim.opt.wrap = false

vim.opt.swapfile = false
vim.opt.backup = false
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
vim.opt.undofile = true

-- vim.opt.hlsearch = false
-- vim.opt.incsearch = true

vim.opt.termguicolors = true

vim.opt.scrolloff = 8
vim.opt.signcolumn = "yes"
vim.opt.isfname:append("@-@")

vim.opt.colorcolumn = "80"
Binary file added lua/custom/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions lua/custom/plugins/TEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[a relative link](../../../README.md.md)
7 changes: 7 additions & 0 deletions lua/custom/plugins/comment.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
return {
'numToStr/Comment.nvim',
opts = {
-- add any options here
},
lazy = false,
}
31 changes: 31 additions & 0 deletions lua/custom/plugins/curl.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
return {
"oysandvik94/curl.nvim",
cmd = { "CurlOpen" },
dependencies = {
"nvim-lua/plenary.nvim",
},
config = true,
keys = {
{ "<leader>cc", "<cmd>lua require('curl').open_curl_tab()<cr>", desc = "Open a curl tab scoped to the current working directory" },
{ "<leader>csc", "<cmd>lua require('curl').create_scoped_collection()<cr>", desc = "Create or open a collection with a name from user input" },
{ "<leader>cgc", "<cmd>lua require('curl').create_global_collection()<cr>", desc = "Create or open a global collection with a name from user input" },
},
on_attach = function (bufnr)
-- These commands will prompt you for a name for your collection
vim.keymap.set("n", "<leader>csc", function()
curl.create_scoped_collection()
end, { desc = "Create or open a collection with a name from user input" })

vim.keymap.set("n", "<leader>cgc", function()
curl.create_global_collection()
end, { desc = "Create or open a global collection with a name from user input" })

vim.keymap.set("n", "<leader>fsc", function()
curl.pick_scoped_collection()
end, { desc = "Choose a scoped collection and open it" })

vim.keymap.set("n", "<leader>fgc", function()
curl.pick_global_collection()
end, { desc = "Choose a global collection and open it" })
end
}
17 changes: 17 additions & 0 deletions lua/custom/plugins/gitblame.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
return {
'f-person/git-blame.nvim',
-- load the plugin at startup
event = 'VeryLazy',
-- Because of the keys part, you will be lazy loading this plugin.
-- The plugin will only load once one of the keys is used.
-- If you want to load the plugin at startup, add something like event = "VeryLazy",
-- or lazy = false. One of both options will work.
opts = {
-- your configuration comes here
-- for example
enabled = true, -- if you want to enable the plugin
message_template = ' <summary> • <date> • <author> • <<sha>>', -- template for the blame message, check the Message template section for more options
date_format = '%m-%d-%Y %H:%M:%S', -- template for the date, check Date format section for more options
virtual_text_column = 1, -- virtual text start column, check Start virtual text at column section for more options
},
}
45 changes: 45 additions & 0 deletions lua/custom/plugins/harpoon.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
return {
'ThePrimeagen/harpoon',
branch = 'harpoon2',
lazy = false,
dependencies = {
'nvim-lua/plenary.nvim',
},
config = function()
local harpoon = require 'harpoon'
harpoon:setup()

-- Keymaps
vim.keymap.set('n', '<leader>a', function()
harpoon:list():add()
end, { desc = 'Harpoon: Mark file' })

vim.keymap.set('n', '<C-e>', function()
harpoon.ui:toggle_quick_menu(harpoon:list())
end, { desc = 'Harpoon: Toggle quick menu' })

vim.keymap.set('n', '<C-j>', function()
harpoon:list():select(1)
end, { desc = 'Harpoon: Go to file 1' })

vim.keymap.set('n', '<C-k>', function()
harpoon:list():select(2)
end, { desc = 'Harpoon: Go to file 2' })

vim.keymap.set('n', '<C-l>', function()
harpoon:list():select(3)
end, { desc = 'Harpoon: Go to file 3' })

vim.keymap.set('n', '<C-h>', function()
harpoon:list():select(4)
end, { desc = 'Harpoon: Go to file 4' })

vim.keymap.set('n', '<leader>hp', function()
harpoon:list():prev()
end, { desc = 'Harpoon: Previous buffer' })

vim.keymap.set('n', '<leader>hn', function()
harpoon:list():next()
end, { desc = 'Harpoon: Next buffer' })
end,
}
22 changes: 22 additions & 0 deletions lua/custom/plugins/lazygit.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
return {
'kdheepak/lazygit.nvim',
lazy = false,
cmd = {
'LazyGit',
'LazyGitConfig',
'LazyGitCurrentFile',
'LazyGitFilter',
'LazyGitFilterCurrentFile',
},
-- optional for floating window border decoration
dependencies = {
'nvim-telescope/telescope.nvim',
'nvim-lua/plenary.nvim',
},
config = function()
require('telescope').load_extension 'lazygit'
end,
keys = {
{ '<leader>gh', '<cmd>LazyGit<cr>', desc = 'LazyGit' },
},
}
40 changes: 40 additions & 0 deletions lua/custom/plugins/oil.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
return {
'stevearc/oil.nvim',
---@module 'oil'
---@type oil.SetupOpts
opts = {
view_options = {
-- Show files and directories that start with "."
show_hidden = true,
-- This function defines what is considered a "hidden" file
is_hidden_file = function(name, bufnr)
local m = name:match '^%.'
return m ~= nil
end,
-- This function defines what will never be shown, even when `show_hidden` is set
is_always_hidden = function(name, bufnr)
return false
end,
-- Sort file names with numbers in a more intuitive order for humans.
-- Can be "fast", true, or false. "fast" will turn it off for large directories.
natural_order = 'fast',
-- Sort file and directory names case insensitive
case_insensitive = false,
sort = {
-- sort order can be "asc" or "desc"
-- see :help oil-columns to see which columns are sortable
{ 'type', 'asc' },
{ 'name', 'asc' },
},
-- Customize the highlight group for the file name
highlight_filename = function(entry, is_hidden, is_link_target, is_link_orphan)
return nil
end,
},
},
-- Optional dependencies
dependencies = { { 'nvim-mini/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,
}
18 changes: 18 additions & 0 deletions lua/custom/plugins/theme-switcher.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
return {
dir = vim.fn.stdpath 'config' .. '/lua/theme-switcher',
name = 'theme-switcher',
lazy = false,
priority = 100,
config = function()
require('theme-switcher').setup {
save_on_select = true,
preview_on_navigate = true,
restore_on_startup = true,
}

-- Keybindings (global, not buffer-specific)
vim.keymap.set('n', '<leader>tt', function()
require('theme-switcher').open()
end, { desc = '[T]heme [T]oggle', noremap = true, silent = true })
end,
}
Loading
Loading