mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
perf(nvim): Apply lazy load for all plugins
This commit is contained in:
parent
1716712787
commit
48331347fd
23 changed files with 274 additions and 203 deletions
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
# Set XDG Base Directory Path
|
||||
export XDG_CONFIG_HOME="$HOME/.config"
|
||||
export XDG_CACHE_HOME="~/.cache"
|
||||
export XDG_DATA_HOME="~/.local/share"
|
||||
export XDG_STATE_HOME="~/.local/state"
|
||||
export XDG_CACHE_HOME="$HOME/.cache"
|
||||
export XDG_DATA_HOME="$HOME/.local/share"
|
||||
export XDG_STATE_HOME="$HOME/.local/state"
|
||||
export XDG_RUNTIME_DIR="/run/user/$(id -u)"
|
||||
|
||||
# Source user's XDG-compliant Bash configs
|
||||
|
|
|
|||
|
|
@ -5,29 +5,21 @@ local M = {}
|
|||
-- Ensure that the following servers are installed and set
|
||||
-- Use :Mason to list all available servers
|
||||
M.servers = {
|
||||
"ast_grep",
|
||||
"bashls", -- Bash
|
||||
"clangd", -- C/C++
|
||||
"cssls", -- CSS
|
||||
"denols", -- Deno
|
||||
"eslint", -- JavaScript
|
||||
"gopls", -- Go
|
||||
"html", -- HTML
|
||||
"jsonls", -- JSON
|
||||
"lua_ls", -- Lua
|
||||
"markdown_oxide", -- Markdown
|
||||
"omnisharp", -- C# & F#
|
||||
"powershell_es", -- PowerShell
|
||||
"pyright", -- Python
|
||||
"rust_analyzer", -- Rust
|
||||
"svelte", -- Svelte
|
||||
"svlangserver", -- SystemVerilog
|
||||
"tailwindcss", -- TailwindCSS
|
||||
"taplo", -- TOML
|
||||
"ts_ls", -- TypeScript
|
||||
"vimls", -- vimscript
|
||||
"yamlls", -- YAML
|
||||
"beancount", -- Beancount
|
||||
"bashls", -- Bash
|
||||
"clangd", -- C/C++
|
||||
"eslint", -- JavaScript
|
||||
"gopls", -- Go
|
||||
"html", -- HTML
|
||||
"jsonls", -- JSON
|
||||
"lua_ls", -- Lua
|
||||
-- "markdown_oxide", -- Markdown
|
||||
"pyright", -- Python
|
||||
"rust_analyzer", -- Rust
|
||||
"taplo", -- TOML
|
||||
"ts_ls", -- TypeScript
|
||||
"vimls", -- vimscript
|
||||
"yamlls", -- YAML
|
||||
"beancount", -- Beancount
|
||||
}
|
||||
|
||||
-- Configuration for each server defines here
|
||||
|
|
|
|||
|
|
@ -42,61 +42,61 @@ vim.api.nvim_create_user_command("Rename", renameCurrentBuffer, {})
|
|||
|
||||
local leader_mappings = {
|
||||
general = {
|
||||
{ keys = "-", cmd = ":split<CR>", opts = { desc = "Split to down" } },
|
||||
{ keys = "\\", cmd = ":vsplit<CR>", opts = { desc = "Split to right" } },
|
||||
{ keys = "|", cmd = ":vsplit<CR>", opts = { desc = "Split to right" } },
|
||||
{ keys = "h", cmd = "<C-w>h", opts = { desc = "Left Window" } },
|
||||
{ keys = "n", cmd = "<C-w>j", opts = { desc = "Down Window" } },
|
||||
{ keys = "e", cmd = "<C-w>k", opts = { desc = "Up Window" } },
|
||||
{ keys = "i", cmd = "<C-w>l", opts = { desc = "Right Window" } },
|
||||
{ keys = "<Tab>", cmd = "<Cmd>b#<CR>", opts = { desc = "Switch to last buffer" } },
|
||||
{ keys = '"', cmd = ":!wezterm-gui &<CR>", pots = { desc = "Open External Terminal(wezterm)" } },
|
||||
{ keys = "-", cmd = ":split<CR>", opts = { desc = "Split to down" } },
|
||||
{ keys = "\\", cmd = ":vsplit<CR>", opts = { desc = "Split to right" } },
|
||||
{ keys = "|", cmd = ":vsplit<CR>", opts = { desc = "Split to right" } },
|
||||
{ keys = "h", cmd = "<C-w>h", opts = { desc = "Left Window" } },
|
||||
{ keys = "n", cmd = "<C-w>j", opts = { desc = "Down Window" } },
|
||||
{ keys = "e", cmd = "<C-w>k", opts = { desc = "Up Window" } },
|
||||
{ keys = "i", cmd = "<C-w>l", opts = { desc = "Right Window" } },
|
||||
{ keys = "<Tab>", cmd = "<Cmd>b#<CR>", opts = { desc = "Switch to last buffer" } },
|
||||
{ keys = '"', cmd = ":!wezterm-gui &<CR>", pots = { desc = "Open External Terminal(wezterm)" } },
|
||||
},
|
||||
b = { -- +buffer
|
||||
{ keys = "0", cmd = "<Cmd>b#<CR>", opts = { desc = "Switch to last buffer" } },
|
||||
{ keys = "1", cmd = ":BufferLineGotoBuffer 1<CR>", opts = { desc = "Switch to Buffer #1" } },
|
||||
{ keys = "2", cmd = ":BufferLineGotoBuffer 2<CR>", opts = { desc = "Switch to Buffer #2" } },
|
||||
{ keys = "3", cmd = ":BufferLineGotoBuffer 3<CR>", opts = { desc = "Switch to Buffer #3" } },
|
||||
{ keys = "4", cmd = ":BufferLineGotoBuffer 4<CR>", opts = { desc = "Switch to Buffer #4" } },
|
||||
{ keys = "5", cmd = ":BufferLineGotoBuffer 5<CR>", opts = { desc = "Switch to Buffer #5" } },
|
||||
{ keys = "6", cmd = ":BufferLineGotoBuffer 6<CR>", opts = { desc = "Switch to Buffer #6" } },
|
||||
{ keys = "7", cmd = ":BufferLineGotoBuffer 7<CR>", opts = { desc = "Switch to Buffer #7" } },
|
||||
{ keys = "8", cmd = ":BufferLineGotoBuffer 8<CR>", opts = { desc = "Switch to Buffer #8" } },
|
||||
{ keys = "9", cmd = ":BufferLineGotoBuffer 9<CR>", opts = { desc = "Switch to Buffer #9" } },
|
||||
{ keys = "b", cmd = ":BufferLinePick<CR>", opts = { desc = "Quick Switch Buffers" } },
|
||||
{ keys = "d", cmd = ":bdelete<CR>", opts = { desc = "Delete Buffer" } },
|
||||
{ keys = "D", cmd = ":BufferLineCloseOthers<CR>", opts = { desc = "Delete Other Buffers" } },
|
||||
{ keys = "xx", cmd = ":BufferLineCloseOthers<CR>", opts = { desc = "Delete Other Buffers" } },
|
||||
{ keys = "xh", cmd = ":BufferLineCloseLeft<CR>", opts = { desc = "Delete Buffers Left" } },
|
||||
{ keys = "xi", cmd = ":BufferLineCloseRight<CR>", opts = { desc = "Delete Buffers Right" } },
|
||||
{ keys = "X", cmd = ":BufferLineCloseOthers<CR>", opts = { desc = "Delete Other Buffers" } },
|
||||
{ keys = "h", cmd = ":bprevious<CR>", opts = { desc = "Previous Buffer" } },
|
||||
{ keys = "i", cmd = ":bnext<CR>", opts = { desc = "Next Buffer" } },
|
||||
{ keys = "H", cmd = ":bfirst<CR>", opts = { desc = "First Buffer" } },
|
||||
{ keys = "I", cmd = ":blast<CR>", opts = { desc = "Last Buffer" } },
|
||||
{ keys = "0", cmd = ":bfirst<CR>", opts = { desc = "First Buffer" } },
|
||||
{ keys = "^", cmd = ":bfirst<CR>", opts = { desc = "First Buffer" } },
|
||||
{ keys = "$", cmd = ":blast<CR>", opts = { desc = "Last Buffer" } },
|
||||
{ keys = "s", cmd = ":new<CR>", opts = { desc = "Scratch buffers" } },
|
||||
{ keys = "t", cmd = ":BufferLineTogglePin<CR>", opts = { desc = "Pin Buffer" } },
|
||||
{ keys = "y", cmd = ":%y+<CR>", opts = { desc = "Copy Buffer to Clipboard" } },
|
||||
{ keys = "0", cmd = "<Cmd>b#<CR>", opts = { desc = "Switch to last buffer" } },
|
||||
{ keys = "1", cmd = ":BufferLineGotoBuffer 1<CR>", opts = { desc = "Switch to Buffer #1" } },
|
||||
{ keys = "2", cmd = ":BufferLineGotoBuffer 2<CR>", opts = { desc = "Switch to Buffer #2" } },
|
||||
{ keys = "3", cmd = ":BufferLineGotoBuffer 3<CR>", opts = { desc = "Switch to Buffer #3" } },
|
||||
{ keys = "4", cmd = ":BufferLineGotoBuffer 4<CR>", opts = { desc = "Switch to Buffer #4" } },
|
||||
{ keys = "5", cmd = ":BufferLineGotoBuffer 5<CR>", opts = { desc = "Switch to Buffer #5" } },
|
||||
{ keys = "6", cmd = ":BufferLineGotoBuffer 6<CR>", opts = { desc = "Switch to Buffer #6" } },
|
||||
{ keys = "7", cmd = ":BufferLineGotoBuffer 7<CR>", opts = { desc = "Switch to Buffer #7" } },
|
||||
{ keys = "8", cmd = ":BufferLineGotoBuffer 8<CR>", opts = { desc = "Switch to Buffer #8" } },
|
||||
{ keys = "9", cmd = ":BufferLineGotoBuffer 9<CR>", opts = { desc = "Switch to Buffer #9" } },
|
||||
{ keys = "b", cmd = ":BufferLinePick<CR>", opts = { desc = "Quick Switch Buffers" } },
|
||||
{ keys = "d", cmd = ":bdelete<CR>", opts = { desc = "Delete Buffer" } },
|
||||
{ keys = "D", cmd = ":BufferLineCloseOthers<CR>", opts = { desc = "Delete Other Buffers" } },
|
||||
{ keys = "xx", cmd = ":BufferLineCloseOthers<CR>", opts = { desc = "Delete Other Buffers" } },
|
||||
{ keys = "xh", cmd = ":BufferLineCloseLeft<CR>", opts = { desc = "Delete Buffers Left" } },
|
||||
{ keys = "xi", cmd = ":BufferLineCloseRight<CR>", opts = { desc = "Delete Buffers Right" } },
|
||||
{ keys = "X", cmd = ":BufferLineCloseOthers<CR>", opts = { desc = "Delete Other Buffers" } },
|
||||
{ keys = "h", cmd = ":bprevious<CR>", opts = { desc = "Previous Buffer" } },
|
||||
{ keys = "i", cmd = ":bnext<CR>", opts = { desc = "Next Buffer" } },
|
||||
{ keys = "H", cmd = ":bfirst<CR>", opts = { desc = "First Buffer" } },
|
||||
{ keys = "I", cmd = ":blast<CR>", opts = { desc = "Last Buffer" } },
|
||||
{ keys = "0", cmd = ":bfirst<CR>", opts = { desc = "First Buffer" } },
|
||||
{ keys = "^", cmd = ":bfirst<CR>", opts = { desc = "First Buffer" } },
|
||||
{ keys = "$", cmd = ":blast<CR>", opts = { desc = "Last Buffer" } },
|
||||
{ keys = "s", cmd = ":new<CR>", opts = { desc = "Scratch buffers" } },
|
||||
{ keys = "t", cmd = ":BufferLineTogglePin<CR>", opts = { desc = "Pin Buffer" } },
|
||||
{ keys = "y", cmd = ":%y+<CR>", opts = { desc = "Copy Buffer to Clipboard" } },
|
||||
},
|
||||
c = { -- +code/compile
|
||||
{ keys = "R", cmd = vim.lsp.buf.rename, opts = { desc = "Rename symbol under cursor" } },
|
||||
{ keys = "f", cmd = formatFx, opts = { desc = "Format buffer" } },
|
||||
{ keys = "f", cmd = formatFx, opts = { desc = "Format buffer" } },
|
||||
},
|
||||
f = { -- +file/find
|
||||
{ keys = "n", cmd = ":new<CR>", opts = { desc = "New File" } },
|
||||
{ keys = "s", cmd = ":write<CR>", opts = { desc = "Save File" } },
|
||||
{ keys = "S", cmd = ":wall<CR>", opts = { desc = "Save All Files" } },
|
||||
{ keys = "D", cmd = "!trash-rm %<CR>", opts = { desc = "Delete current file" } },
|
||||
{ keys = "t", cmd = ":NvimTreeFindFileToggle<CR>", opts = { desc = "Toggle File Tree" } },
|
||||
{ keys = "o", cmd = ":!open %<CR>", opts = { desc = "Open file in default program" } },
|
||||
{ keys = "R", cmd = renameCurrentBuffer, opts = { desc = "Rename current file" } },
|
||||
{ keys = "x", cmd = ":Lazy<CR>", opts = { desc = "Open extension view" } },
|
||||
{ keys = "yy", cmd = ":let @+ = expand('%:p')<CR>", opts = { desc = "Copy file path" } },
|
||||
{ keys = "yY", cmd = ":let @+ = expand('%')<CR>", opts = { desc = "Copy relative file path" } },
|
||||
{ keys = "yn", cmd = ":let @+ = expand('%:t')<CR>", opts = { desc = "Copy file name" } },
|
||||
{ keys = "n", cmd = ":new<CR>", opts = { desc = "New File" } },
|
||||
{ keys = "s", cmd = ":write<CR>", opts = { desc = "Save File" } },
|
||||
{ keys = "S", cmd = ":wall<CR>", opts = { desc = "Save All Files" } },
|
||||
{ keys = "D", cmd = "!trash-rm %<CR>", opts = { desc = "Delete current file" } },
|
||||
-- { keys = "t", cmd = ":NvimTreeFindFileToggle<CR>", opts = { desc = "Toggle File Tree" } },
|
||||
{ keys = "o", cmd = ":!open %<CR>", opts = { desc = "Open file in default program" } },
|
||||
{ keys = "R", cmd = renameCurrentBuffer, opts = { desc = "Rename current file" } },
|
||||
{ keys = "x", cmd = ":Lazy<CR>", opts = { desc = "Open extension view" } },
|
||||
{ keys = "yy", cmd = ":let @+ = expand('%:p')<CR>", opts = { desc = "Copy file path" } },
|
||||
{ keys = "yY", cmd = ":let @+ = expand('%')<CR>", opts = { desc = "Copy relative file path" } },
|
||||
{ keys = "yn", cmd = ":let @+ = expand('%:t')<CR>", opts = { desc = "Copy file name" } },
|
||||
{ keys = "yN", cmd = ":let @+ = expand('%:t:r')<CR>", opts = { desc = "Copy file name without extension" } },
|
||||
{ keys = "yd", cmd = ":let @+ = expand('%:p:h')<CR>", opts = { desc = "Copy directory path" } },
|
||||
{
|
||||
|
|
@ -118,37 +118,37 @@ local leader_mappings = {
|
|||
p = { -- +project
|
||||
},
|
||||
q = { -- +quit
|
||||
{ keys = "q", cmd = ":q<CR>", opts = { desc = "Quit" } },
|
||||
{ keys = "Q", cmd = ":qa!<CR>", opts = { desc = "Force Quit" } },
|
||||
{ keys = "w", cmd = ":wq<CR>", opts = { desc = "Write and Quit" } },
|
||||
{ keys = "q", cmd = ":q<CR>", opts = { desc = "Quit" } },
|
||||
{ keys = "Q", cmd = ":qa!<CR>", opts = { desc = "Force Quit" } },
|
||||
{ keys = "w", cmd = ":wq<CR>", opts = { desc = "Write and Quit" } },
|
||||
{ keys = "W", cmd = ":wall<CR>:qa!<CR>", opts = { desc = "Write all and Force Quit" } },
|
||||
},
|
||||
t = { -- +toggle/test
|
||||
{ keys = "f", cmd = ":NvimTreeToggle", opts = { desc = "Toggle File Explorer" } },
|
||||
{ keys = "f", cmd = ":NvimTreeToggle", opts = { desc = "Toggle File Explorer" } },
|
||||
{ keys = "F", cmd = ":FormatToggle<CR>", opts = { desc = "Toggle autoformat-on-save" } },
|
||||
},
|
||||
u = { -- +ui
|
||||
{ keys = " ", cmd = ":set list!", opts = { desc = "Toggle show all symbols" } },
|
||||
},
|
||||
w = { -- +window
|
||||
{ keys = "h", cmd = "<C-w>h", opts = { desc = "Left Window" } },
|
||||
{ keys = "n", cmd = "<C-w>j", opts = { desc = "Down Window" } },
|
||||
{ keys = "e", cmd = "<C-w>k", opts = { desc = "Up Window" } },
|
||||
{ keys = "i", cmd = "<C-w>l", opts = { desc = "Right Window" } },
|
||||
{ keys = "H", cmd = "<C-w>H", opts = { desc = "Move Window Left" } },
|
||||
{ keys = "N", cmd = "<C-w>J", opts = { desc = "Move Window Down" } },
|
||||
{ keys = "E", cmd = "<C-w>K", opts = { desc = "Move Window Up" } },
|
||||
{ keys = "I", cmd = "<C-w>L", opts = { desc = "Move Window Right" } },
|
||||
{ keys = "-", cmd = ":split<CR>", opts = { desc = "Split to down" } },
|
||||
{ keys = "|", cmd = ":vsplit<CR>", opts = { desc = "Split to right" } },
|
||||
{ keys = "/", cmd = ":vsplit<CR>", opts = { desc = "Split to right" } },
|
||||
{ keys = "d", cmd = "<C-w>c", opts = { desc = "Close Window" } },
|
||||
{ keys = "D", cmd = "<C-w>o", opts = { desc = "Close Other Windows" } },
|
||||
{ keys = "r", cmd = "<C-w>r", opts = { desc = "Rotate Windows" } },
|
||||
{ keys = "R", cmd = "<C-w>R", opts = { desc = "Reverse Rotate Windows" } },
|
||||
{ keys = "t", cmd = "<C-w>T", opts = { desc = "Move Window to New Tab" } },
|
||||
{ keys = "]", cmd = ":resize +5<CR>", opts = { desc = "Increase Window Size" } },
|
||||
{ keys = "[", cmd = ":resize -5<CR>", opts = { desc = "Decrease Window Size" } },
|
||||
{ keys = "h", cmd = "<C-w>h", opts = { desc = "Left Window" } },
|
||||
{ keys = "n", cmd = "<C-w>j", opts = { desc = "Down Window" } },
|
||||
{ keys = "e", cmd = "<C-w>k", opts = { desc = "Up Window" } },
|
||||
{ keys = "i", cmd = "<C-w>l", opts = { desc = "Right Window" } },
|
||||
{ keys = "H", cmd = "<C-w>H", opts = { desc = "Move Window Left" } },
|
||||
{ keys = "N", cmd = "<C-w>J", opts = { desc = "Move Window Down" } },
|
||||
{ keys = "E", cmd = "<C-w>K", opts = { desc = "Move Window Up" } },
|
||||
{ keys = "I", cmd = "<C-w>L", opts = { desc = "Move Window Right" } },
|
||||
{ keys = "-", cmd = ":split<CR>", opts = { desc = "Split to down" } },
|
||||
{ keys = "|", cmd = ":vsplit<CR>", opts = { desc = "Split to right" } },
|
||||
{ keys = "/", cmd = ":vsplit<CR>", opts = { desc = "Split to right" } },
|
||||
{ keys = "d", cmd = "<C-w>c", opts = { desc = "Close Window" } },
|
||||
{ keys = "D", cmd = "<C-w>o", opts = { desc = "Close Other Windows" } },
|
||||
{ keys = "r", cmd = "<C-w>r", opts = { desc = "Rotate Windows" } },
|
||||
{ keys = "R", cmd = "<C-w>R", opts = { desc = "Reverse Rotate Windows" } },
|
||||
{ keys = "t", cmd = "<C-w>T", opts = { desc = "Move Window to New Tab" } },
|
||||
{ keys = "]", cmd = ":resize +5<CR>", opts = { desc = "Increase Window Size" } },
|
||||
{ keys = "[", cmd = ":resize -5<CR>", opts = { desc = "Decrease Window Size" } },
|
||||
{ keys = "M", cmd = ":resize<CR>:vertical resize<CR>", opts = { desc = "Maximize window size" } },
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
local M = {}
|
||||
|
||||
M.event = "BufEnter"
|
||||
|
||||
M.global = {
|
||||
{ mode = "n", keys = "<leader>E", cmd = ":NvimTreeToggle<CR>" },
|
||||
{ mode = "n", keys = "<A-0>", cmd = ":NvimTreeFindFileToggle<CR>" },
|
||||
|
|
|
|||
|
|
@ -1,8 +1,19 @@
|
|||
-- https://stackoverflow.com/a/73365602
|
||||
vim.api.nvim_create_autocmd("TextYankPost", {
|
||||
group = vim.api.nvim_create_augroup("highlight_yank", {}),
|
||||
desc = "Hightlight selection on yank",
|
||||
pattern = "*",
|
||||
callback = function()
|
||||
vim.highlight.on_yank({ higroup = "IncSearch", timeout = 500 })
|
||||
end,
|
||||
})
|
||||
|
||||
return {
|
||||
-- Colorschemes
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
lazy = true,
|
||||
opts = {
|
||||
flavor = "auto",
|
||||
background = {
|
||||
|
|
@ -10,6 +21,7 @@ return {
|
|||
dark = "mocha",
|
||||
},
|
||||
integrations = {
|
||||
-- lualine = true,
|
||||
"lualine",
|
||||
},
|
||||
},
|
||||
|
|
@ -20,6 +32,7 @@ return {
|
|||
opts = {
|
||||
variant = "dawn",
|
||||
},
|
||||
cmd = "Telescope colorscheme",
|
||||
},
|
||||
-- { "olimorris/onedarkpro.nvim", cmd = "Telescope colorscheme" },
|
||||
{ "rebelot/kanagawa.nvim", cmd = "Telescope colorscheme" },
|
||||
|
|
@ -28,20 +41,22 @@ return {
|
|||
{ -- Modern Status Line
|
||||
"nvim-lualine/lualine.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("plugins.mod.lualine")
|
||||
end,
|
||||
},
|
||||
{ -- Highlight yanked text
|
||||
"gbprod/yanky.nvim",
|
||||
opts = {
|
||||
highlight = {
|
||||
on_put = true,
|
||||
on_yank = true,
|
||||
timer = 500,
|
||||
},
|
||||
},
|
||||
},
|
||||
-- { -- Highlight yanked text
|
||||
-- "gbprod/yanky.nvim",
|
||||
-- event = "LazyFile",
|
||||
-- opts = {
|
||||
-- highlight = {
|
||||
-- on_put = true,
|
||||
-- on_yank = true,
|
||||
-- timer = 500,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- { import = "plugins.mod.alpha-nvim" }, -- Dashboard
|
||||
{ -- Breadcrumb
|
||||
"Bekaboo/dropbar.nvim",
|
||||
|
|
@ -88,6 +103,8 @@ return {
|
|||
},
|
||||
{ -- Highlight and navigate between TODOs
|
||||
"folke/todo-comments.nvim",
|
||||
cmd = { "TodoTelescope" },
|
||||
event = "BufRead",
|
||||
opts = {},
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
},
|
||||
|
|
|
|||
|
|
@ -10,14 +10,10 @@ return {
|
|||
event = "InsertEnter",
|
||||
config = function()
|
||||
require("luasnip.loaders.from_vscode").lazy_load({ paths = "~/.config/lsp-snippets" })
|
||||
-- require("luasnip.loaders.from_vscode").lazy_load()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"zbirenbaum/copilot-cmp",
|
||||
opts = {},
|
||||
-- config = function()
|
||||
-- require("copilot_cmp").setup()
|
||||
-- end,
|
||||
},
|
||||
-- {
|
||||
-- "zbirenbaum/copilot-cmp",
|
||||
-- opts = {},
|
||||
-- },
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
return {
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
event = "BufReadPre",
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
dap.adapters.codelldb = {
|
||||
|
|
@ -28,10 +29,13 @@ return {
|
|||
"rcarriga/nvim-dap-ui",
|
||||
opts = {},
|
||||
dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
|
||||
cmd = "DapNew",
|
||||
},
|
||||
{ "theHamsta/nvim-dap-virtual-text", opts = {} },
|
||||
{ "theHamsta/nvim-dap-virtual-text", opts = {}, cmd = "DapNew" },
|
||||
{
|
||||
"mfussenegger/nvim-dap-python",
|
||||
event = "BufReadPost",
|
||||
ft = "python",
|
||||
config = function()
|
||||
require("dap-python").setup("uv")
|
||||
end,
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
return {
|
||||
{
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
event = "BufEnter",
|
||||
opts = {},
|
||||
-- stylua: ignore
|
||||
-- stylua: ignore
|
||||
keys = {
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" },
|
||||
{ "S", mode = { "n", "x", "o" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" },
|
||||
{ "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" },
|
||||
{ "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" },
|
||||
{ "<c-s>", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" },
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -17,13 +17,13 @@ return {
|
|||
version = "*", -- Use the latest tagged version
|
||||
-- opts = , -- This causes the plugin setup function to be called
|
||||
keys = {
|
||||
{ "<A-n>", "<Cmd>MultipleCursorsAddDown<CR>", mode = { "n", "x" }, desc = "Add cursor and move down" },
|
||||
{ "<A-e>", "<Cmd>MultipleCursorsAddUp<CR>", mode = { "n", "x" }, desc = "Add cursor and move up" },
|
||||
{ "<A-n>", "<Cmd>MultipleCursorsAddDown<CR>", mode = { "n", "x" }, desc = "Add cursor and move down" },
|
||||
{ "<A-e>", "<Cmd>MultipleCursorsAddUp<CR>", mode = { "n", "x" }, desc = "Add cursor and move up" },
|
||||
|
||||
{ "<C-Up>", "<Cmd>MultipleCursorsAddUp<CR>", mode = { "n", "i", "x" }, desc = "Add cursor and move up" },
|
||||
{ "<C-Down>", "<Cmd>MultipleCursorsAddDown<CR>", mode = { "n", "i", "x" }, desc = "Add cursor and move down" },
|
||||
{ "<C-Up>", "<Cmd>MultipleCursorsAddUp<CR>", mode = { "n", "i", "x" }, desc = "Add cursor and move up" },
|
||||
{ "<C-Down>", "<Cmd>MultipleCursorsAddDown<CR>", mode = { "n", "i", "x" }, desc = "Add cursor and move down" },
|
||||
|
||||
{ "<A-LeftMouse>", "<Cmd>MultipleCursorsMouseAddDelete<CR>", mode = { "n", "i" }, desc = "Add or remove cursor" },
|
||||
{ "<A-LeftMouse>", "<Cmd>MultipleCursorsMouseAddDelete<CR>", mode = { "n", "i" }, desc = "Add or remove cursor" },
|
||||
},
|
||||
config = function()
|
||||
local normal_mode_motion = require("multiple-cursors.normal_mode.motion")
|
||||
|
|
@ -41,20 +41,20 @@ return {
|
|||
require("nvim-autopairs").enable()
|
||||
end,
|
||||
custom_key_maps = {
|
||||
{ { "n", "x" }, { "e", "<Up>" }, normal_mode_motion.k, "nowrap" },
|
||||
{ { "n", "x" }, { "n", "<Down>" }, normal_mode_motion.j, "nowrap" },
|
||||
{ { "n", "x" }, { "i", "<Right>", "<Space>" }, normal_mode_motion.l, "nowrap" },
|
||||
{ { "n", "x" }, "j", normal_mode_motion.e, "nowrap" },
|
||||
{ { "n", "x" }, "J", normal_mode_motion.E, "nowrap" },
|
||||
{ { "n", "x" }, "gj", normal_mode_motion.ge, "nowrap" },
|
||||
{ { "n", "x" }, "gJ", normal_mode_motion.gE, "nowrap" },
|
||||
{ "n", "E", normal_mode_edit.J, "nowrap" },
|
||||
{ "n", "gE", normal_mode_edit.gJ, "nowrap" },
|
||||
{ "n", { "l", "<Insert>" }, normal_mode_mode_change.i, "nowrap" },
|
||||
{ "n", "L", normal_mode_mode_change.I, "nowrap" },
|
||||
{ "x", "l", visual_mode_modify_area.i, "nowrap" },
|
||||
{ "x", "E", visual_mode_edit.J, "nowrap" },
|
||||
{ "x", "gE", visual_mode_edit.gJ, "nowrap" },
|
||||
{ { "n", "x" }, { "e", "<Up>" }, normal_mode_motion.k, "nowrap" },
|
||||
{ { "n", "x" }, { "n", "<Down>" }, normal_mode_motion.j, "nowrap" },
|
||||
{ { "n", "x" }, { "i", "<Right>", "<Space>" }, normal_mode_motion.l, "nowrap" },
|
||||
{ { "n", "x" }, "j", normal_mode_motion.e, "nowrap" },
|
||||
{ { "n", "x" }, "J", normal_mode_motion.E, "nowrap" },
|
||||
{ { "n", "x" }, "gj", normal_mode_motion.ge, "nowrap" },
|
||||
{ { "n", "x" }, "gJ", normal_mode_motion.gE, "nowrap" },
|
||||
{ "n", "E", normal_mode_edit.J, "nowrap" },
|
||||
{ "n", "gE", normal_mode_edit.gJ, "nowrap" },
|
||||
{ "n", { "l", "<Insert>" }, normal_mode_mode_change.i, "nowrap" },
|
||||
{ "n", "L", normal_mode_mode_change.I, "nowrap" },
|
||||
{ "x", "l", visual_mode_modify_area.i, "nowrap" },
|
||||
{ "x", "E", visual_mode_edit.J, "nowrap" },
|
||||
{ "x", "gE", visual_mode_edit.gJ, "nowrap" },
|
||||
},
|
||||
})
|
||||
end,
|
||||
|
|
@ -63,7 +63,7 @@ return {
|
|||
{
|
||||
"kylechui/nvim-surround",
|
||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||
event = "VeryLazy",
|
||||
event = "BufEnter",
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,17 +1,18 @@
|
|||
return {
|
||||
{
|
||||
"rmagatti/auto-session",
|
||||
lazy = false,
|
||||
event = "BufReadPre",
|
||||
|
||||
opts = {
|
||||
suppressed_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
|
||||
},
|
||||
},
|
||||
{ import = "plugins.mod.nvim-tree" },
|
||||
-- { import = "plugins.mod.nvim-tree" },
|
||||
{ import = "plugins.mod.telescope" },
|
||||
-- { import = "plugins.mod.fzf" },
|
||||
{
|
||||
"ahmedkhalf/project.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {
|
||||
detection_methods = { "lsp", "pattern" },
|
||||
patterns = { ".git", "Makefile", "package.json" },
|
||||
|
|
@ -46,5 +47,14 @@ return {
|
|||
-- },
|
||||
{
|
||||
"NeogitOrg/neogit",
|
||||
-- dependencies = {
|
||||
-- "nvim-lua/plenary.nvim", -- required
|
||||
-- "nvim-telescope/telescope.nvim", -- optional
|
||||
-- },
|
||||
config = true,
|
||||
-- event = "VeryLazy",
|
||||
cmd = {
|
||||
"Neogit",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ return {
|
|||
},
|
||||
{
|
||||
"js0ny/luasnip-latex-snippets.nvim",
|
||||
ft = { "tex", "markdown" },
|
||||
-- vimtex isn't required if using treesitter
|
||||
requires = { "L3MON4D3/LuaSnip", "lervag/vimtex" },
|
||||
config = function()
|
||||
|
|
@ -20,10 +21,18 @@ return {
|
|||
require("luasnip").config.setup({ enable_autosnippets = true })
|
||||
end,
|
||||
},
|
||||
{ "williamboman/mason.nvim", config = true },
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
cmd = "Mason",
|
||||
build = ":MasonUpdate",
|
||||
opts_extend = { "ensure_installed" },
|
||||
opts = {
|
||||
ensure_installed = require("config.servers").servers,
|
||||
},
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
lazy = false,
|
||||
event = "BufReadPre",
|
||||
dependencies = {
|
||||
{ "williamboman/mason.nvim" },
|
||||
{ "neovim/nvim-lspconfig" },
|
||||
|
|
@ -34,7 +43,7 @@ return {
|
|||
},
|
||||
},
|
||||
{ import = "plugins.mod.conform-nvim" },
|
||||
{ "nvim-treesitter/nvim-treesitter-context" },
|
||||
{ "nvim-treesitter/nvim-treesitter-context", lazy = true },
|
||||
{
|
||||
"NoahTheDuke/vim-just",
|
||||
ft = { "just" },
|
||||
|
|
@ -58,9 +67,9 @@ return {
|
|||
highlight = { enable = true },
|
||||
indent = { enable = true },
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
end,
|
||||
-- config = function(_, opts)
|
||||
-- require("nvim-treesitter.configs").setup(opts)
|
||||
-- end,
|
||||
},
|
||||
{
|
||||
"folke/lazydev.nvim",
|
||||
|
|
|
|||
|
|
@ -1,23 +1,24 @@
|
|||
return {
|
||||
{ "nvim-lua/plenary.nvim", lazy = true },
|
||||
{ "wakatime/vim-wakatime", lazy = false },
|
||||
{ import = "plugins.mod.toggleterm" },
|
||||
{
|
||||
"CRAG666/code_runner.nvim",
|
||||
config = true,
|
||||
keys = {
|
||||
{ "<leader>cr", "<cmd>RunCode<CR>", desc = "Run code" },
|
||||
},
|
||||
dependencies = {
|
||||
|
||||
{
|
||||
"CRAG666/betterTerm.nvim",
|
||||
opts = {
|
||||
position = "bot",
|
||||
size = 15,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- {
|
||||
-- "CRAG666/code_runner.nvim",
|
||||
-- config = true,
|
||||
-- keys = {
|
||||
-- { "<leader>cr", "<cmd>RunCode<CR>", desc = "Run code" },
|
||||
-- },
|
||||
-- dependencies = {
|
||||
--
|
||||
-- {
|
||||
-- "CRAG666/betterTerm.nvim",
|
||||
-- opts = {
|
||||
-- position = "bot",
|
||||
-- size = 15,
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
{ import = "plugins.mod.which-keys-nvim" },
|
||||
{ import = "plugins.mod.copilot-lua" },
|
||||
{ import = "plugins.mod.avante-nvim" },
|
||||
|
|
@ -27,7 +28,8 @@ return {
|
|||
cmd = {
|
||||
"Leet",
|
||||
},
|
||||
event = "VeryLazy",
|
||||
lazy = true,
|
||||
-- event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
-- "ibhagwan/fzf-lua",
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ return {
|
|||
-- support for image pasting
|
||||
"HakonHarnes/img-clip.nvim",
|
||||
event = "VeryLazy",
|
||||
ft = { "avante", "markdown", "typst", "org", "tex" },
|
||||
cmd = "PasteImage",
|
||||
opts = {
|
||||
-- recommended settings
|
||||
default = {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
return {
|
||||
"saghen/blink.cmp",
|
||||
-- optional: provides snippets for the snippet source
|
||||
dependencies = { "L3MON4D3/LuaSnip", version = "v2.*" },
|
||||
-- dependencies = { "L3MON4D3/LuaSnip", version = "v2.*" },
|
||||
|
||||
-- use a release tag to download pre-built binaries
|
||||
version = "*",
|
||||
event = "InsertEnter",
|
||||
|
||||
---@module 'blink.cmp'
|
||||
---@type blink.cmp.Config
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ return {
|
|||
"akinsho/bufferline.nvim",
|
||||
dependencies = "nvim-tree/nvim-web-devicons", -- 图标支持
|
||||
after = "catppuccin",
|
||||
lazy = false,
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{ "<leader>b1", "<cmd>BufferLineGotoBuffer 1<CR>", desc = "Switch to Buffer #1" },
|
||||
{ "<leader>b2", "<cmd>BufferLineGotoBuffer 2<CR>", desc = "Switch to Buffer #2" },
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ return {
|
|||
{ import = "plugins.mod.lang.markdown.render-markdown" },
|
||||
-- { import = "plugins.mod.lang.markdown.markview" },
|
||||
{ import = "plugins.mod.lang.markdown.obsidian-nvim" },
|
||||
{ "bullets-vim/bullets.vim" },
|
||||
{ "bullets-vim/bullets.vim", ft = "markdown" },
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
return {
|
||||
{
|
||||
"MeanderingProgrammer/render-markdown.nvim",
|
||||
lazy = false,
|
||||
event = "BufRead",
|
||||
ft = { "markdown", "Avante" },
|
||||
opts = {
|
||||
file_types = { "markdown", "Avante" },
|
||||
|
|
|
|||
|
|
@ -1,23 +1,23 @@
|
|||
return {
|
||||
{
|
||||
-- "js0ny/nvim-orgmode",
|
||||
name = "orgmode",
|
||||
"nvim-orgmode/orgmode",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-orgmode/telescope-orgmode.nvim",
|
||||
"nvim-orgmode/org-bullets.nvim",
|
||||
"Saghen/blink.cmp",
|
||||
},
|
||||
branch = "feat-image-match-latex",
|
||||
cmd = {
|
||||
"Org",
|
||||
},
|
||||
ft = {
|
||||
"org",
|
||||
"orgagenda",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>A", "<cmd>Org agenda<CR>", desc = "Org Agenda" },
|
||||
},
|
||||
dir = "~/Source/Forks/nvim-orgmode",
|
||||
dev = true,
|
||||
event = "VeryLazy",
|
||||
event = "BufEnter *.org",
|
||||
config = function()
|
||||
require("orgmode").setup({
|
||||
org_agenda_files = "~/OrgFiles/tasks/*",
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Remote | Git Branch | Diagnostics | Command | | MID | | Line:Column | Indent | E
|
|||
local config = {
|
||||
options = {
|
||||
disabled_filetypes = {
|
||||
statusline = { "NvimTree", "alpha", "grug-far" },
|
||||
statusline = { "NvimTree", "alpha", "grug-far", "snacks_dashboard" },
|
||||
},
|
||||
-- Disable sections and component separators
|
||||
component_separators = { left = "", right = "" },
|
||||
|
|
|
|||
|
|
@ -1,6 +1,11 @@
|
|||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = { "saghen/blink.cmp" },
|
||||
event = {
|
||||
"BufReadPost",
|
||||
"BufWritePost",
|
||||
"BufNewFile",
|
||||
},
|
||||
|
||||
-- example using `opts` for defining servers
|
||||
opts = {
|
||||
|
|
|
|||
|
|
@ -7,17 +7,27 @@ return {
|
|||
---@type snacks.Config
|
||||
opts = {
|
||||
-- bigfile = { enabled = true },
|
||||
-- dashboard = { enabled = true },
|
||||
-- explorer = { enabled = true },
|
||||
-- indent = { enabled = true },
|
||||
dashboard = { enabled = true },
|
||||
explorer = { enabled = true },
|
||||
indent = { enabled = true },
|
||||
-- input = { enabled = true },
|
||||
-- picker = { enabled = true },
|
||||
-- notifier = { enabled = true },
|
||||
-- quickfile = { enabled = true },
|
||||
-- scope = { enabled = true },
|
||||
-- scroll = { enabled = true },
|
||||
-- statuscolumn = { enabled = true },
|
||||
statuscolumn = { enabled = true },
|
||||
-- words = { enabled = true },
|
||||
image = { enabled = true },
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>ft",
|
||||
function()
|
||||
require("snacks").explorer()
|
||||
end
|
||||
,
|
||||
desc = "Toggle File Explorer"
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
cmd = "Telescope",
|
||||
opts = {
|
||||
defaults = {
|
||||
prompt_prefix = require("config.icons").telescope,
|
||||
|
|
@ -28,24 +29,24 @@ return {
|
|||
},
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
keys = {
|
||||
{ "<leader><leader>", "<cmd>Telescope find_files<CR>", desc = "Find Files" },
|
||||
{ "<leader>fc", "<cmd>Telescope find_files cwd=~/.config/nvim<CR>", desc = "Edit configs" },
|
||||
{ "<leader>/", "<cmd>Telescope live_grep<CR>", desc = "Grep Files" },
|
||||
{ "<leader>;", "<cmd>Telescope<CR>", desc = "Show Telescope Commands" },
|
||||
{ "<leader>ui", "<cmd>Telescope colorscheme<CR>", desc = "Change colorscheme" },
|
||||
{ "<leader>pp", "<cmd>Telescope projects<CR>", desc = "List all Projects" },
|
||||
{ "<leader>pg", "<cmd>Telescope projects<CR>", desc = "List all Git Projects" },
|
||||
{ "<leader>ps", "<cmd>Telescope session-lens<CR>", desc = "List all sessions" },
|
||||
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "Git Status" },
|
||||
{ "<leader>gt", "<cmd>Telescope git_branches<CR>", desc = "Git Branches" },
|
||||
{ "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "Show commits" },
|
||||
{ "<leader>fb", "<cmd>Telescope buffers<CR>", desc = "List Buffers" },
|
||||
{ "<leader>ff", "<cmd>Telescope fd<CR>", desc = "Find Files" },
|
||||
{ "<leader>fh", "<cmd>Telescope oldfiles<CR>", desc = "Recent Files" },
|
||||
{ "<leader>ce", "<cmd>Telescope diagnostics<CR>", desc = "Navigate errors/warnings" },
|
||||
{ "<leader>cs", "<cmd>Telescope treesitter<CR>", desc = "Search symbols" },
|
||||
{ "<leader>cS", "<cmd>Telescope grep_string<CR>", desc = "Search current symbol" },
|
||||
{ "<leader>bB", "<cmd>Telescope buffers<CR>", desc = "List Buffers" },
|
||||
{ "<leader>fl", "<cmd>Telescope filetypes", desc = "Set Filetype/Lang to ..." },
|
||||
{ "<leader><leader>", "<cmd>Telescope find_files<CR>", desc = "Find Files" },
|
||||
{ "<leader>fc", "<cmd>Telescope find_files cwd=~/.config/nvim<CR>", desc = "Edit configs" },
|
||||
{ "<leader>/", "<cmd>Telescope live_grep<CR>", desc = "Grep Files" },
|
||||
{ "<leader>;", "<cmd>Telescope<CR>", desc = "Show Telescope Commands" },
|
||||
{ "<leader>ui", "<cmd>Telescope colorscheme<CR>", desc = "Change colorscheme" },
|
||||
{ "<leader>pp", "<cmd>Telescope projects<CR>", desc = "List all Projects" },
|
||||
{ "<leader>pg", "<cmd>Telescope projects<CR>", desc = "List all Git Projects" },
|
||||
{ "<leader>ps", "<cmd>Telescope session-lens<CR>", desc = "List all sessions" },
|
||||
{ "<leader>gs", "<cmd>Telescope git_status<CR>", desc = "Git Status" },
|
||||
{ "<leader>gt", "<cmd>Telescope git_branches<CR>", desc = "Git Branches" },
|
||||
{ "<leader>gc", "<cmd>Telescope git_commits<CR>", desc = "Show commits" },
|
||||
{ "<leader>fb", "<cmd>Telescope buffers<CR>", desc = "List Buffers" },
|
||||
{ "<leader>ff", "<cmd>Telescope fd<CR>", desc = "Find Files" },
|
||||
{ "<leader>fh", "<cmd>Telescope oldfiles<CR>", desc = "Recent Files" },
|
||||
{ "<leader>ce", "<cmd>Telescope diagnostics<CR>", desc = "Navigate errors/warnings" },
|
||||
{ "<leader>cs", "<cmd>Telescope treesitter<CR>", desc = "Search symbols" },
|
||||
{ "<leader>cS", "<cmd>Telescope grep_string<CR>", desc = "Search current symbol" },
|
||||
{ "<leader>bB", "<cmd>Telescope buffers<CR>", desc = "List Buffers" },
|
||||
{ "<leader>fl", "<cmd>Telescope filetypes", desc = "Set Filetype/Lang to ..." },
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue