mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
feat: add Dotbot
This commit is contained in:
9
config/nvim/lua/plugins/abolish.lua
Normal file
9
config/nvim/lua/plugins/abolish.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Automatically fix spelling mistakes
|
||||
-- https://github.com/tpope/vim-abolish
|
||||
return {
|
||||
"tpope/vim-abolish",
|
||||
config = function()
|
||||
vim.api.nvim_command("Abolish teh the")
|
||||
vim.api.nvim_command("Abolish {despa,sepe}rat{e,es,ed,ing,ely,ion,ions,or} {despe,sepa}rat{}")
|
||||
end,
|
||||
}
|
||||
22
config/nvim/lua/plugins/aerial.lua
Normal file
22
config/nvim/lua/plugins/aerial.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
-- aerical.nvim
|
||||
-- https://github.com/stevearc/aerial.nvim
|
||||
return {
|
||||
"stevearc/aerial.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
require("aerial").setup({
|
||||
on_attach = function(bufnr)
|
||||
-- Jump forwards/backwards with '{' and '}'
|
||||
vim.keymap.set("n", "{", "<cmd>AerialPrev<CR>", { buffer = bufnr })
|
||||
vim.keymap.set("n", "}", "<cmd>AerialNext<CR>", { buffer = bufnr })
|
||||
end,
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ "<leader>A", "<cmd>AerialToggle!<CR>", desc = "Aerial" },
|
||||
},
|
||||
}
|
||||
8
config/nvim/lua/plugins/astro.lua
Normal file
8
config/nvim/lua/plugins/astro.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
-- Astro support
|
||||
-- https://github.com/wuelnerdotexe/vim-astro
|
||||
return {
|
||||
"wuelnerdotexe/vim-astro",
|
||||
config = function()
|
||||
vim.g.astro_typescript = "enable"
|
||||
end,
|
||||
}
|
||||
8
config/nvim/lua/plugins/auto-save.lua
Normal file
8
config/nvim/lua/plugins/auto-save.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
-- 🧶 Automatically save your changes in NeoVim
|
||||
-- https://github.com/pocco81/auto-save.nvim
|
||||
return {
|
||||
"Pocco81/auto-save.nvim",
|
||||
keys = {
|
||||
{ "<leader>as", "<Cmd>ASToggle<CR>", desc = "Autosave Toggle" },
|
||||
},
|
||||
}
|
||||
10
config/nvim/lua/plugins/autotag.lua
Normal file
10
config/nvim/lua/plugins/autotag.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Use treesitter to auto close and auto rename HTML tags
|
||||
-- https://github.com/windwp/nvim-ts-autotag
|
||||
return {
|
||||
"windwp/nvim-ts-autotag",
|
||||
config = function()
|
||||
require("nvim-ts-autotag").setup({
|
||||
disable_filetype = { "TelescopePrompt", "vim" },
|
||||
})
|
||||
end,
|
||||
}
|
||||
15
config/nvim/lua/plugins/barbecue.lua
Normal file
15
config/nvim/lua/plugins/barbecue.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
-- barbecue.nvim
|
||||
-- https://github.com/utilyre/barbecue.nvim
|
||||
return {
|
||||
"utilyre/barbecue.nvim",
|
||||
name = "barbecue",
|
||||
version = "*",
|
||||
dependencies = {
|
||||
"SmiteshP/nvim-navic",
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
},
|
||||
config = function()
|
||||
require("barbecue").setup()
|
||||
require("barbecue.ui").toggle(true)
|
||||
end,
|
||||
}
|
||||
4
config/nvim/lua/plugins/base16.lua
Normal file
4
config/nvim/lua/plugins/base16.lua
Normal file
@@ -0,0 +1,4 @@
|
||||
-- https://github.com/chriskempson/base16-vim
|
||||
return {
|
||||
"chriskempson/base16-vim",
|
||||
}
|
||||
14
config/nvim/lua/plugins/blamer.lua
Normal file
14
config/nvim/lua/plugins/blamer.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
-- Show Git blame inline
|
||||
-- https://github.com/APZelos/blamer.nvim
|
||||
return {
|
||||
"APZelos/blamer.nvim",
|
||||
keys = {
|
||||
-- stylua: ignore
|
||||
{ "<leader>gB", "<cmd>BlamerToggle<cr>", desc = "Git Blame" },
|
||||
},
|
||||
config = function()
|
||||
vim.g.blamer_enabled = 0
|
||||
vim.g.blamer_relative_time = 1
|
||||
vim.g.blamer_delay = 200
|
||||
end,
|
||||
}
|
||||
5
config/nvim/lua/plugins/bookmark.lua
Normal file
5
config/nvim/lua/plugins/bookmark.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Vim bookmark plugin
|
||||
-- https://github.com/MattesGroeger/vim-bookmarks
|
||||
return {
|
||||
"MattesGroeger/vim-bookmarks",
|
||||
}
|
||||
17
config/nvim/lua/plugins/bufferline.lua
Normal file
17
config/nvim/lua/plugins/bufferline.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
-- A snazzy bufferline for Neovim
|
||||
-- https://github.com/akinsho/bufferline.nvim
|
||||
return {
|
||||
"akinsho/bufferline.nvim",
|
||||
dependencies = "nvim-tree/nvim-web-devicons",
|
||||
keys = {
|
||||
{ "<Tab>", "<Cmd>BufferLineCycleNext<CR>", desc = "Next tab" },
|
||||
{ "<S-Tab>", "<Cmd>BufferLineCyclePrev<CR>", desc = "Prev tab" },
|
||||
},
|
||||
opts = {
|
||||
options = {
|
||||
mode = "tabs",
|
||||
show_buffer_close_icons = false,
|
||||
show_close_icon = false,
|
||||
},
|
||||
},
|
||||
}
|
||||
7
config/nvim/lua/plugins/catppuccin.lua
Normal file
7
config/nvim/lua/plugins/catppuccin.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
-- https://github.com/catppuccin/nvim
|
||||
return {
|
||||
{
|
||||
"catppuccin/nvim",
|
||||
name = "catppuccin",
|
||||
},
|
||||
}
|
||||
20
config/nvim/lua/plugins/chafa.lua
Normal file
20
config/nvim/lua/plugins/chafa.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
-- View images in Neovim
|
||||
-- https://github.com/princejoogie/chafa.nvim
|
||||
return {
|
||||
"princejoogie/chafa.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"m00qek/baleia.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("chafa").setup({
|
||||
render = {
|
||||
min_padding = 5,
|
||||
show_label = true,
|
||||
},
|
||||
events = {
|
||||
update_on_nvim_resize = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
29
config/nvim/lua/plugins/chatgpg.lua
Normal file
29
config/nvim/lua/plugins/chatgpg.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
-- ChatGPT Neovim Plugin
|
||||
-- https://github.com/jackMort/ChatGPT.nvim
|
||||
return {
|
||||
"jackMort/ChatGPT.nvim",
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{
|
||||
mode = "v",
|
||||
"<leader>e",
|
||||
function()
|
||||
require("chatgpt").edit_with_instructions()
|
||||
end,
|
||||
desc = "Edit with instructions",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local home = vim.fn.expand("$HOME")
|
||||
local file_path = home .. "/.config/nvim/lua/plugins/chatgpg.txt.gpg"
|
||||
require("chatgpt").setup({
|
||||
api_key_cmd = "gpg --decrypt --use-agent " .. file_path,
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"folke/trouble.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
}
|
||||
BIN
config/nvim/lua/plugins/chatgpg.txt.gpg
Normal file
BIN
config/nvim/lua/plugins/chatgpg.txt.gpg
Normal file
Binary file not shown.
16
config/nvim/lua/plugins/cheatsheet.lua
Normal file
16
config/nvim/lua/plugins/cheatsheet.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
-- Searchable Cheatsheet
|
||||
-- https://github.com/sudormrfbin/cheatsheet.nvim
|
||||
return {
|
||||
"sudormrfbin/cheatsheet.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"nvim-lua/popup.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>C", "<cmd>Cheatsheet<cr>", desc = "Cheatsheet" },
|
||||
},
|
||||
config = function()
|
||||
require("cheatsheet").setup()
|
||||
end,
|
||||
}
|
||||
47
config/nvim/lua/plugins/cmp.lua
Normal file
47
config/nvim/lua/plugins/cmp.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
return {
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
{ "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
|
||||
"zbirenbaum/copilot-cmp",
|
||||
"David-Kunz/cmp-npm",
|
||||
},
|
||||
opts = function(_, opts)
|
||||
local cmp = require("cmp")
|
||||
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, {
|
||||
{ name = "copilot" },
|
||||
{ name = "npm", keyword_length = 4 },
|
||||
}))
|
||||
|
||||
opts.formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = function(_, item)
|
||||
local icons = require("lazyvim.config").icons.kinds
|
||||
if icons[item.kind] then
|
||||
item.kind = icons[item.kind]
|
||||
end
|
||||
return item
|
||||
end,
|
||||
}
|
||||
|
||||
opts.window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
}
|
||||
|
||||
vim.api.nvim_set_hl(0, "CmpItemKindCopilot", { fg = "#6CC644" })
|
||||
vim.api.nvim_set_hl(0, "CmpItemAbbrMatch", { fg = "NONE", bg = "#000000" })
|
||||
|
||||
vim.cmd([[highlight! link CmpItemAbbrMatchFuzzy CmpItemAbbrMatch]])
|
||||
vim.cmd([[highlight! CmpItemAbbrDeprecated guibg=NONE gui=strikethrough guifg=#808080]])
|
||||
vim.cmd([[highlight! CmpItemAbbrMatch guibg=NONE guifg=#569CD6]])
|
||||
vim.cmd([[highlight! link CmpItemAbbrMatchFuzzy CmpItemAbbrMatch]])
|
||||
vim.cmd([[highlight! CmpItemKindVariable guibg=NONE guifg=#9CDCFE]])
|
||||
vim.cmd([[highlight! link CmpItemKindInterface CmpItemKindVariable]])
|
||||
vim.cmd([[highlight! link CmpItemKindText CmpItemKindVariable]])
|
||||
vim.cmd([[highlight! CmpItemKindFunction guibg=NONE guifg=#C586C0]])
|
||||
vim.cmd([[highlight! link CmpItemKindMethod CmpItemKindFunction]])
|
||||
vim.cmd([[highlight! CmpItemKindKeyword guibg=NONE guifg=#D4D4D4]])
|
||||
vim.cmd([[highlight! link CmpItemKindProperty CmpItemKindKeyword]])
|
||||
vim.cmd([[highlight! link CmpItemKindUnit CmpItemKindKeyword]])
|
||||
end,
|
||||
}
|
||||
12
config/nvim/lua/plugins/codewindow.lua
Normal file
12
config/nvim/lua/plugins/codewindow.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
-- Minimap
|
||||
-- https://github.com/gorbit99/codewindow.nvim
|
||||
return {
|
||||
"gorbit99/codewindow.nvim",
|
||||
config = function()
|
||||
local codewindow = require("codewindow")
|
||||
codewindow.setup({
|
||||
window_border = "none",
|
||||
})
|
||||
codewindow.apply_default_keybinds()
|
||||
end,
|
||||
}
|
||||
29
config/nvim/lua/plugins/colorizer.lua
Normal file
29
config/nvim/lua/plugins/colorizer.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
-- The fastest Neovim colorizer
|
||||
-- https://github.com/NvChad/nvim-colorizer.lua
|
||||
return {
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
opts = {
|
||||
filetypes = {
|
||||
"css",
|
||||
"html",
|
||||
"javascript",
|
||||
"javascriptreact",
|
||||
"typescript",
|
||||
"typescriptreact",
|
||||
"yaml",
|
||||
"conf",
|
||||
"lua",
|
||||
},
|
||||
user_default_options = {
|
||||
RGB = true,
|
||||
RRGGBB = true,
|
||||
names = true,
|
||||
RRGGBBAA = true,
|
||||
rgb_fn = true,
|
||||
hsl_fn = true,
|
||||
css = true,
|
||||
css_fn = true,
|
||||
mode = "background",
|
||||
},
|
||||
},
|
||||
}
|
||||
7
config/nvim/lua/plugins/colorscheme-catppuccin.lua
Normal file
7
config/nvim/lua/plugins/colorscheme-catppuccin.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
-- https://github.com/catppuccin/nvim
|
||||
return {
|
||||
"catppuccin/nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
name = "catppuccin",
|
||||
}
|
||||
10
config/nvim/lua/plugins/colorscheme-night-owl.lua
Normal file
10
config/nvim/lua/plugins/colorscheme-night-owl.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
-- 🦉 🌌 Night Owl colorscheme implementation for Neovim with support for Treesitter and semantic tokens
|
||||
-- https://github.com/oxfist/night-owl.nvim
|
||||
return {
|
||||
"oxfist/night-owl.nvim",
|
||||
lazy = true,
|
||||
config = function()
|
||||
require("night-owl").setup()
|
||||
vim.cmd.colorscheme("night-owl")
|
||||
end,
|
||||
}
|
||||
6
config/nvim/lua/plugins/colorscheme-tokyonight.lua
Normal file
6
config/nvim/lua/plugins/colorscheme-tokyonight.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
-- https://github.com/folke/tokyonight.nvim
|
||||
return {
|
||||
"folke/tokyonight.nvim",
|
||||
lazy = true,
|
||||
opts = { style = "night" },
|
||||
}
|
||||
9
config/nvim/lua/plugins/colorschemes.lua
Normal file
9
config/nvim/lua/plugins/colorschemes.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Configure LazyVim to load colorscheme
|
||||
return {
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "catppuccin",
|
||||
},
|
||||
},
|
||||
}
|
||||
5
config/nvim/lua/plugins/committia.lua
Normal file
5
config/nvim/lua/plugins/committia.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- More pleasant editing on commit messages
|
||||
-- https://github.com/rhysd/committia.vim
|
||||
return {
|
||||
"rhysd/committia.vim",
|
||||
}
|
||||
13
config/nvim/lua/plugins/copilot-chat.lua
Normal file
13
config/nvim/lua/plugins/copilot-chat.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
-- Chat with GitHub Copilot in Neovim
|
||||
-- https://github.com/CopilotC-Nvim/CopilotChat.nvim
|
||||
return {
|
||||
{
|
||||
"CopilotC-Nvim/CopilotChat.nvim",
|
||||
branch = "canary",
|
||||
dependencies = {
|
||||
{ "zbirenbaum/copilot.lua" }, -- or github/copilot.vim
|
||||
{ "nvim-lua/plenary.nvim" }, -- for curl, log wrapper
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
10
config/nvim/lua/plugins/copilot.lua
Normal file
10
config/nvim/lua/plugins/copilot.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Copilot replacement
|
||||
-- https://github.com/zbirenbaum/copilot.lua
|
||||
-- https://github.com/zbirenbaum/copilot-cmp
|
||||
return {
|
||||
"zbirenbaum/copilot-cmp",
|
||||
dependencies = "zbirenbaum/copilot.lua",
|
||||
opts = function()
|
||||
require("copilot").setup()
|
||||
end,
|
||||
}
|
||||
19
config/nvim/lua/plugins/cursorline.lua
Normal file
19
config/nvim/lua/plugins/cursorline.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
-- Highlight cursor words and lines
|
||||
-- https://github.com/yamatsum/nvim-cursorline
|
||||
return {
|
||||
"yamatsum/nvim-cursorline",
|
||||
config = function()
|
||||
require("nvim-cursorline").setup({
|
||||
cursorline = {
|
||||
enable = false,
|
||||
timeout = 1000,
|
||||
number = false,
|
||||
},
|
||||
cursorword = {
|
||||
enable = true,
|
||||
min_length = 3,
|
||||
hl = { underline = true },
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
110
config/nvim/lua/plugins/dashboard.lua
Normal file
110
config/nvim/lua/plugins/dashboard.lua
Normal file
@@ -0,0 +1,110 @@
|
||||
return {
|
||||
"nvimdev/dashboard-nvim",
|
||||
event = "VimEnter",
|
||||
opts = function()
|
||||
local logo = "\n"
|
||||
.. " ▖\n"
|
||||
.. "┌─╮╭─╮╭─╮▖ ▖▖▄▄▗▄ \n"
|
||||
.. "│ │├─┘│ │▝▖▞ ▌▌ ▌ ▌\n"
|
||||
.. "╵ ╵╰─╯╰─╯ ▝ ▘▘ ▘ ▘\n"
|
||||
.. "\n"
|
||||
|
||||
logo = string.rep("\n", 5) .. logo .. "\n\n"
|
||||
|
||||
local opts = {
|
||||
theme = "doom",
|
||||
hide = {
|
||||
statusline = false,
|
||||
},
|
||||
config = {
|
||||
header = vim.split(logo, "\n"),
|
||||
center = {
|
||||
{
|
||||
action = "Telescope find_files",
|
||||
desc = " Find file",
|
||||
icon = " ",
|
||||
key = "f",
|
||||
},
|
||||
{
|
||||
action = "ene | startinsert",
|
||||
desc = " New file",
|
||||
icon = " ",
|
||||
key = "n",
|
||||
},
|
||||
{
|
||||
action = "Telescope oldfiles",
|
||||
desc = " Recent files",
|
||||
icon = " ",
|
||||
key = "r",
|
||||
},
|
||||
{
|
||||
action = "Telescope live_grep",
|
||||
desc = " Find text",
|
||||
icon = " ",
|
||||
key = "g",
|
||||
},
|
||||
{
|
||||
action = "Telescope projects",
|
||||
desc = " Find project",
|
||||
icon = " ",
|
||||
key = "p",
|
||||
},
|
||||
{
|
||||
action = 'lua require("persistence").load()',
|
||||
desc = " Restore Session",
|
||||
icon = " ",
|
||||
key = "s",
|
||||
},
|
||||
{
|
||||
action = "LazyExtras",
|
||||
desc = " Lazy Extras",
|
||||
icon = " ",
|
||||
key = "e",
|
||||
},
|
||||
{
|
||||
action = "Lazy",
|
||||
desc = " Lazy",
|
||||
icon = " ",
|
||||
key = "l",
|
||||
},
|
||||
{
|
||||
action = "Mason",
|
||||
desc = " Mason",
|
||||
icon = " ",
|
||||
key = "m",
|
||||
},
|
||||
{
|
||||
action = "qa",
|
||||
desc = " Quit",
|
||||
icon = " ",
|
||||
key = "q",
|
||||
},
|
||||
},
|
||||
footer = function()
|
||||
local stats = require("lazy").stats()
|
||||
local ms = (math.floor(stats.startuptime * 100 + 0.5) / 100)
|
||||
return {
|
||||
"⚡ Neovim loaded " .. stats.loaded .. "/" .. stats.count .. " plugins in " .. ms .. "ms",
|
||||
}
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
for _, button in ipairs(opts.config.center) do
|
||||
button.desc = button.desc .. string.rep(" ", 43 - #button.desc)
|
||||
end
|
||||
|
||||
-- close Lazy and re-open when the dashboard is ready
|
||||
if vim.o.filetype == "lazy" then
|
||||
vim.cmd.close()
|
||||
vim.api.nvim_create_autocmd("User", {
|
||||
pattern = "DashboardLoaded",
|
||||
callback = function()
|
||||
require("lazy").show()
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
return opts
|
||||
end,
|
||||
}
|
||||
32
config/nvim/lua/plugins/dial.lua
Normal file
32
config/nvim/lua/plugins/dial.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
-- Enhanced increment/decrement
|
||||
-- https://github.com/monaqa/dial.nvim
|
||||
return {
|
||||
"monaqa/dial.nvim",
|
||||
config = function()
|
||||
local augend = require("dial.augend")
|
||||
local opts = { noremap = true, silent = true }
|
||||
|
||||
require("dial.config").augends:register_group({
|
||||
default = {
|
||||
augend.constant.alias.bool,
|
||||
augend.constant.alias.de_weekday,
|
||||
augend.constant.alias.de_weekday_full,
|
||||
augend.constant.new({ elements = { "before", "after" } }),
|
||||
augend.constant.new({ elements = { "left", "right" } }),
|
||||
augend.constant.new({ elements = { "let", "const" } }),
|
||||
augend.constant.new({ elements = { "start", "end" } }),
|
||||
augend.date.alias["%d.%m.%Y"],
|
||||
augend.hexcolor.new({ case = "lower" }),
|
||||
augend.integer.alias.decimal_int,
|
||||
augend.semver.alias.semver,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<C-a>", require("dial.map").inc_normal(), opts)
|
||||
vim.keymap.set("n", "<C-x>", require("dial.map").dec_normal(), opts)
|
||||
vim.keymap.set("v", "<C-a>", require("dial.map").inc_visual(), opts)
|
||||
vim.keymap.set("v", "<C-x>", require("dial.map").dec_visual(), opts)
|
||||
vim.keymap.set("v", "g<C-a>", require("dial.map").inc_gvisual(), opts)
|
||||
vim.keymap.set("v", "g<C-x>", require("dial.map").dec_gvisual(), opts)
|
||||
end,
|
||||
}
|
||||
20
config/nvim/lua/plugins/diffview.lua
Normal file
20
config/nvim/lua/plugins/diffview.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
-- Easily cycle through diffs
|
||||
-- https://github.com/sindrets/diffview.nvim
|
||||
return {
|
||||
"sindrets/diffview.nvim",
|
||||
lazy = false,
|
||||
dependencies = "nvim-lua/plenary.nvim",
|
||||
keys = {
|
||||
{ "<leader>gd", "<cmd>DiffviewOpen<cr>", desc = "Diffview Open" },
|
||||
{ "<leader>gD", "<cmd>DiffviewClose<cr>", desc = "Diffview Close" },
|
||||
},
|
||||
opts = {
|
||||
view = {
|
||||
use_icons = true,
|
||||
default = {
|
||||
layout = "diff2_horizontal",
|
||||
winbar_info = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
5
config/nvim/lua/plugins/editorconfig.lua
Normal file
5
config/nvim/lua/plugins/editorconfig.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Editorconfig
|
||||
-- https://github.com/editorconfig/editorconfig-vim
|
||||
return {
|
||||
"editorconfig/editorconfig-vim",
|
||||
}
|
||||
6
config/nvim/lua/plugins/emmet.lua
Normal file
6
config/nvim/lua/plugins/emmet.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
-- Emmet
|
||||
-- https://github.com/mattn/emmet-vim
|
||||
-- <c-y>, to extend
|
||||
return {
|
||||
"mattn/emmet-vim",
|
||||
}
|
||||
267
config/nvim/lua/plugins/example.lua
Normal file
267
config/nvim/lua/plugins/example.lua
Normal file
@@ -0,0 +1,267 @@
|
||||
-- since this is just an example spec, don't actually load anything here and return an empty spec
|
||||
-- stylua: ignore
|
||||
if true then return {} end
|
||||
|
||||
-- every spec file under config.plugins will be loaded automatically by lazy.nvim
|
||||
--
|
||||
-- In your plugin files, you can:
|
||||
-- * add extra plugins
|
||||
-- * disable/enabled LazyVim plugins
|
||||
-- * override the configuration of LazyVim plugins
|
||||
return {
|
||||
-- add gruvbox
|
||||
{ "ellisonleao/gruvbox.nvim" },
|
||||
|
||||
-- Configure LazyVim to load gruvbox
|
||||
{
|
||||
"LazyVim/LazyVim",
|
||||
opts = {
|
||||
colorscheme = "gruvbox",
|
||||
},
|
||||
},
|
||||
|
||||
-- change trouble config
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
-- opts will be merged with the parent spec
|
||||
opts = { use_diagnostic_signs = true },
|
||||
},
|
||||
|
||||
-- disable trouble
|
||||
{ "folke/trouble.nvim", enabled = false },
|
||||
|
||||
-- add symbols-outline
|
||||
{
|
||||
"simrat39/symbols-outline.nvim",
|
||||
cmd = "SymbolsOutline",
|
||||
keys = { { "<leader>cs", "<cmd>SymbolsOutline<cr>", desc = "Symbols Outline" } },
|
||||
config = true,
|
||||
},
|
||||
|
||||
-- override nvim-cmp and add cmp-emoji
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = { "hrsh7th/cmp-emoji" },
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local cmp = require("cmp")
|
||||
opts.sources = cmp.config.sources(vim.list_extend(opts.sources, { { name = "emoji" } }))
|
||||
end,
|
||||
},
|
||||
|
||||
-- change some telescope options and a keymap to browse plugin files
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
-- add a keymap to browse plugin files
|
||||
-- stylua: ignore
|
||||
{
|
||||
"<leader>fp",
|
||||
function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
|
||||
desc = "Find Plugin File",
|
||||
},
|
||||
},
|
||||
-- change some options
|
||||
opts = {
|
||||
defaults = {
|
||||
layout_strategy = "horizontal",
|
||||
layout_config = { prompt_position = "top" },
|
||||
sorting_strategy = "ascending",
|
||||
winblend = 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add telescope-fzf-native
|
||||
{
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build = "make",
|
||||
config = function()
|
||||
require("telescope").load_extension("fzf")
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- add pyright to lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- pyright will be automatically installed with mason and loaded with lspconfig
|
||||
pyright = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- add tsserver and setup with typescript.nvim instead of lspconfig
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = {
|
||||
"jose-elias-alvarez/typescript.nvim",
|
||||
init = function()
|
||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
|
||||
vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
|
||||
end)
|
||||
end,
|
||||
},
|
||||
---@class PluginLspOpts
|
||||
opts = {
|
||||
---@type lspconfig.options
|
||||
servers = {
|
||||
-- tsserver will be automatically installed with mason and loaded with lspconfig
|
||||
tsserver = {},
|
||||
},
|
||||
-- you can do any additional lsp server setup here
|
||||
-- return true if you don't want this server to be setup with lspconfig
|
||||
---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
|
||||
setup = {
|
||||
-- example to setup with typescript.nvim
|
||||
tsserver = function(_, opts)
|
||||
require("typescript").setup({ server = opts })
|
||||
return true
|
||||
end,
|
||||
-- Specify * to use this function as a fallback for any server
|
||||
-- ["*"] = function(server, opts) end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
|
||||
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
|
||||
{ import = "lazyvim.plugins.extras.lang.typescript" },
|
||||
|
||||
-- add more treesitter parsers
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"bash",
|
||||
"help",
|
||||
"html",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
|
||||
-- would overwrite `ensure_installed` with the new value.
|
||||
-- If you'd rather extend the default config, use the code below instead:
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = function(_, opts)
|
||||
-- add tsx and treesitter
|
||||
vim.list_extend(opts.ensure_installed, {
|
||||
"tsx",
|
||||
"typescript",
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- the opts function can also be used to change the default opts:
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function(_, opts)
|
||||
table.insert(opts.sections.lualine_x, "😄")
|
||||
end,
|
||||
},
|
||||
|
||||
-- or you can return new options to override all the defaults
|
||||
{
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return {
|
||||
--[[add your custom lualine config here]]
|
||||
}
|
||||
end,
|
||||
},
|
||||
|
||||
-- use mini.starter instead of alpha
|
||||
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
|
||||
|
||||
-- add jsonls and schemastore ans setup treesitter for json, json5 and jsonc
|
||||
{ import = "lazyvim.plugins.extras.lang.json" },
|
||||
|
||||
-- add any tools you want to have installed below
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"shellcheck",
|
||||
"shfmt",
|
||||
"flake8",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Use <tab> for completion and snippets (supertab)
|
||||
-- first: disable default <tab> and <s-tab> behavior in LuaSnip
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
keys = function()
|
||||
return {}
|
||||
end,
|
||||
},
|
||||
-- then: setup supertab in cmp
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-emoji",
|
||||
},
|
||||
---@param opts cmp.ConfigSchema
|
||||
opts = function(_, opts)
|
||||
local has_words_before = function()
|
||||
unpack = unpack or table.unpack
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
end
|
||||
|
||||
local luasnip = require("luasnip")
|
||||
local cmp = require("cmp")
|
||||
|
||||
opts.mapping = vim.tbl_extend("force", opts.mapping, {
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
-- You could replace the expand_or_jumpable() calls with expand_or_locally_jumpable()
|
||||
-- they way you will only jump inside the snippet region
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif has_words_before() then
|
||||
cmp.complete()
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
9
config/nvim/lua/plugins/export-to-vscode.lua
Normal file
9
config/nvim/lua/plugins/export-to-vscode.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Export active buffers to VS Code
|
||||
-- https://github.com/elijahmanor/export-to-vscode.nvim
|
||||
return {
|
||||
"elijahmanor/export-to-vscode.nvim",
|
||||
keys = {
|
||||
-- stylua: ignore
|
||||
{ "<leader>code", function() require("export-to-vscode").launch() end, desc = "Export to VS Code" },
|
||||
},
|
||||
}
|
||||
33
config/nvim/lua/plugins/flash.lua
Normal file
33
config/nvim/lua/plugins/flash.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
-- flash.nvim
|
||||
-- https://github.com/folke/flash.nvim
|
||||
return {
|
||||
"folke/flash.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = {},
|
||||
keys = {
|
||||
{
|
||||
"s",
|
||||
mode = { "n", "x", "o" },
|
||||
function()
|
||||
require("flash").jump()
|
||||
end,
|
||||
desc = "Flash",
|
||||
},
|
||||
{
|
||||
"S",
|
||||
mode = { "n", "o", "x" },
|
||||
function()
|
||||
require("flash").treesitter()
|
||||
end,
|
||||
desc = "Flash Treesitter",
|
||||
},
|
||||
{
|
||||
"r",
|
||||
mode = "o",
|
||||
function()
|
||||
require("flash").remote()
|
||||
end,
|
||||
desc = "Remote Flash",
|
||||
},
|
||||
},
|
||||
}
|
||||
60
config/nvim/lua/plugins/fm.lua
Normal file
60
config/nvim/lua/plugins/fm.lua
Normal file
@@ -0,0 +1,60 @@
|
||||
-- Use favorite terminal file managers in Neovim
|
||||
-- https://github.com/is0n/fm-nvim
|
||||
return {
|
||||
"is0n/fm-nvim",
|
||||
keys = {
|
||||
{ "<M-g>", "<cmd>Lazygit<cr>", desc = "Lazygit" },
|
||||
{ "<M-l>", "<cmd>Lf<cr>", desc = "Lf" },
|
||||
},
|
||||
opts = {
|
||||
edit_cmd = "edit",
|
||||
on_close = {},
|
||||
on_open = {},
|
||||
ui = {
|
||||
default = "float",
|
||||
float = {
|
||||
border = "rounded",
|
||||
float_hl = "Normal",
|
||||
border_hl = "FloatBorder",
|
||||
blend = 0,
|
||||
height = 0.9,
|
||||
width = 0.9,
|
||||
x = 0.5,
|
||||
y = 0.5,
|
||||
},
|
||||
split = {
|
||||
direction = "topleft",
|
||||
size = 24,
|
||||
},
|
||||
},
|
||||
cmds = {
|
||||
lf_cmd = "lf",
|
||||
fm_cmd = "fm",
|
||||
nnn_cmd = "nnn",
|
||||
fff_cmd = "fff",
|
||||
twf_cmd = "twf",
|
||||
fzf_cmd = "fzf",
|
||||
fzy_cmd = "find . | fzy",
|
||||
xplr_cmd = "xplr",
|
||||
vifm_cmd = "vifm",
|
||||
skim_cmd = "sk",
|
||||
broot_cmd = "broot",
|
||||
gitui_cmd = "gitui",
|
||||
ranger_cmd = "ranger",
|
||||
joshuto_cmd = "joshuto",
|
||||
lazygit_cmd = "lazygit",
|
||||
neomutt_cmd = "neomutt",
|
||||
taskwarrior_cmd = "taskwarrior-tui",
|
||||
},
|
||||
mappings = {
|
||||
vert_split = "<C-v>",
|
||||
horz_split = "<C-h>",
|
||||
tabedit = "<C-t>",
|
||||
edit = "<C-e>",
|
||||
ESC = "<ESC>",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("fm-nvim").setup()
|
||||
end,
|
||||
}
|
||||
56
config/nvim/lua/plugins/formatting.lua
Normal file
56
config/nvim/lua/plugins/formatting.lua
Normal file
@@ -0,0 +1,56 @@
|
||||
-- Lightweight yet powerful formatter plugin for Neovim
|
||||
-- https://github.com/stevearc/conform.nvim
|
||||
return {
|
||||
"stevearc/conform.nvim",
|
||||
event = { "BufWritePre", "BufNewFile" },
|
||||
keys = {
|
||||
{
|
||||
"<leader>mp",
|
||||
mode = { "n", "v" },
|
||||
function()
|
||||
require("conform").format({
|
||||
lsp_fallback = true,
|
||||
async = false,
|
||||
timeout_ms = 500,
|
||||
})
|
||||
end,
|
||||
desc = "Format file or range (in visual mode)",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
formatters = {
|
||||
eslint_d = {
|
||||
command = "eslint_d",
|
||||
args = { "--fix-to-stdout", "--stdin", "--stdin-filename", "$FILENAME" },
|
||||
stdin = true,
|
||||
},
|
||||
nixpkgs_fmt = {
|
||||
command = "nixpkgs-fmt",
|
||||
},
|
||||
},
|
||||
formatters_by_ft = {
|
||||
-- ["*"] = { "codespell" },
|
||||
["_"] = { "trim_whitespace" },
|
||||
astro = { { "prettierd", "prettier" } },
|
||||
css = { { "prettierd", "prettier" }, "stylelint" },
|
||||
fish = { "fish_indent" },
|
||||
go = { "goimports", "gofumpt" },
|
||||
graphql = { { "prettierd", "prettier" } },
|
||||
html = { { "prettierd", "prettier" } },
|
||||
javascript = { { "prettierd", "prettier" }, "eslint_d" },
|
||||
javascriptreact = { { "prettierd", "prettier" }, "eslint_d" },
|
||||
json = { { "prettierd", "prettier" } },
|
||||
lua = { "stylua" },
|
||||
markdown = { { "prettierd", "prettier" } },
|
||||
mdx = { { "prettierd", "prettier" } },
|
||||
nix = { "nixpkgs_fmt" },
|
||||
python = { "isort", "black" },
|
||||
ruby = { "rubyfmt", "rubocop" },
|
||||
eruby = { "htmlbeautifier" },
|
||||
svelte = { { "prettierd", "prettier" } },
|
||||
typescript = { { "prettierd", "prettier" }, "eslint_d" },
|
||||
typescriptreact = { { "prettierd", "prettier" }, "eslint_d" },
|
||||
yaml = { { "prettierd", "prettier" } },
|
||||
},
|
||||
},
|
||||
}
|
||||
5
config/nvim/lua/plugins/fugitive.lua
Normal file
5
config/nvim/lua/plugins/fugitive.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- fugitive.vim: A Git wrapper so awesome, it should be illegal
|
||||
-- https://github.com/tpope/vim-fugitive
|
||||
return {
|
||||
"tpope/vim-fugitive",
|
||||
}
|
||||
9
config/nvim/lua/plugins/gh-line.lua
Normal file
9
config/nvim/lua/plugins/gh-line.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
-- Open the link of current line on GitHub
|
||||
-- https://github.com/ruanyl/vim-gh-line
|
||||
-- <leader>gh (line) or <leader>gb (blame)
|
||||
return {
|
||||
"ruanyl/vim-gh-line",
|
||||
config = function()
|
||||
vim.g.gh_github_domain = "source.xing.com"
|
||||
end,
|
||||
}
|
||||
28
config/nvim/lua/plugins/gh.lua
Normal file
28
config/nvim/lua/plugins/gh.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
-- A fully featured GitHub integration for performing code reviews
|
||||
-- https://github.com/ldelossa/gh.nvim
|
||||
return {
|
||||
"ldelossa/gh.nvim",
|
||||
dependencies = { "ldelossa/litee.nvim" },
|
||||
config = function()
|
||||
require("litee.lib").setup()
|
||||
require("litee.gh").setup({
|
||||
jump_mode = "invoking",
|
||||
map_resize_keys = false,
|
||||
disable_keymaps = false,
|
||||
icon_set = "default",
|
||||
icon_set_custom = nil,
|
||||
git_buffer_completion = true,
|
||||
keymaps = {
|
||||
open = "<CR>",
|
||||
expand = "zo",
|
||||
collapse = "zc",
|
||||
goto_issue = "gd",
|
||||
details = "d",
|
||||
submit_comment = "<C-s>",
|
||||
actions = "<C-a>",
|
||||
resolve_thread = "<C-r>",
|
||||
goto_web = "gx",
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
5
config/nvim/lua/plugins/grammarous.lua
Normal file
5
config/nvim/lua/plugins/grammarous.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- A powerful grammar checker using LanguageTool
|
||||
-- https://github.com/rhysd/vim-grammarous
|
||||
return {
|
||||
"rhysd/vim-grammarous",
|
||||
}
|
||||
11
config/nvim/lua/plugins/harpoon-lualine.lua
Normal file
11
config/nvim/lua/plugins/harpoon-lualine.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
-- Harpoon2 for lualine
|
||||
-- https://github.com/letieu/harpoon-lualine
|
||||
return {
|
||||
"letieu/harpoon-lualine",
|
||||
dependencies = {
|
||||
{
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
},
|
||||
},
|
||||
}
|
||||
63
config/nvim/lua/plugins/harpoon.lua
Normal file
63
config/nvim/lua/plugins/harpoon.lua
Normal file
@@ -0,0 +1,63 @@
|
||||
-- Getting you where you want with the fewest keystrokes
|
||||
-- https://github.com/ThePrimeagen/harpoon
|
||||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
branch = "harpoon2",
|
||||
keys = {
|
||||
{
|
||||
"<leader>a",
|
||||
function()
|
||||
require("harpoon"):list():add()
|
||||
end,
|
||||
desc = "Harpoon Add File",
|
||||
},
|
||||
{
|
||||
"<leader>;",
|
||||
function()
|
||||
local harpoon = require("harpoon")
|
||||
harpoon.ui:toggle_quick_menu(harpoon:list())
|
||||
end,
|
||||
desc = "Harpoon Quickmenu",
|
||||
},
|
||||
{
|
||||
"<leader>1",
|
||||
function()
|
||||
require("harpoon"):list():select(1)
|
||||
end,
|
||||
desc = "Harpoon Buffer 1",
|
||||
},
|
||||
{
|
||||
"<leader>2",
|
||||
function()
|
||||
require("harpoon"):list():select(2)
|
||||
end,
|
||||
desc = "Harpoon Buffer 2",
|
||||
},
|
||||
{
|
||||
"<leader>3",
|
||||
function()
|
||||
require("harpoon"):list():select(3)
|
||||
end,
|
||||
desc = "Harpoon Buffer 3",
|
||||
},
|
||||
{
|
||||
"<leader>4",
|
||||
function()
|
||||
require("harpoon"):list():select(4)
|
||||
end,
|
||||
desc = "Harpoon Buffer 4",
|
||||
},
|
||||
{
|
||||
"<leader>5",
|
||||
function()
|
||||
require("harpoon"):list():select(5)
|
||||
end,
|
||||
desc = "Harpoon Buffer 5",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
menu = {
|
||||
width = vim.api.nvim_win_get_width(0) - 4,
|
||||
},
|
||||
},
|
||||
}
|
||||
15
config/nvim/lua/plugins/highlight-undo.lua
Normal file
15
config/nvim/lua/plugins/highlight-undo.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
-- highlight-undo.nvim
|
||||
-- https://github.com/tzachar/highlight-undo.nvim
|
||||
return {
|
||||
"tzachar/highlight-undo.nvim",
|
||||
config = function()
|
||||
require("highlight-undo").setup({
|
||||
hlgroup = "HighlightUndo",
|
||||
duration = 300,
|
||||
keymaps = {
|
||||
{ "n", "u", "undo", {} },
|
||||
{ "n", "<C-r>", "redo", {} },
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
7
config/nvim/lua/plugins/inc-rename.lua
Normal file
7
config/nvim/lua/plugins/inc-rename.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
-- Incremental LSP renaming based on Neovim's command-preview feature.
|
||||
-- https://github.com/smjonas/inc-rename.nvim
|
||||
return {
|
||||
"smjonas/inc-rename.nvim",
|
||||
cmd = "IncRename",
|
||||
config = true,
|
||||
}
|
||||
18
config/nvim/lua/plugins/lazygit.lua
Normal file
18
config/nvim/lua/plugins/lazygit.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
-- Plugin for calling lazygit from within neovim.
|
||||
-- https://github.com/kdheepak/lazygit.nvim
|
||||
return {
|
||||
"kdheepak/lazygit.nvim",
|
||||
cmd = {
|
||||
"LazyGit",
|
||||
"LazyGitConfig",
|
||||
"LazyGitCurrentFile",
|
||||
"LazyGitFilter",
|
||||
"LazyGitFilterCurrentFile",
|
||||
},
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
||||
},
|
||||
}
|
||||
17
config/nvim/lua/plugins/legendary.lua
Normal file
17
config/nvim/lua/plugins/legendary.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
-- A legend for your keymaps, commands, and autocmds
|
||||
-- https://github.com/mrjones2014/legendary.nvim
|
||||
return {
|
||||
"mrjones2014/legendary.nvim",
|
||||
dependencies = {
|
||||
"kkharji/sqlite.lua",
|
||||
},
|
||||
keys = {
|
||||
-- stylua: ignore
|
||||
-- { "<leader>L", "<cmd>Legendary<cr>", desc = "Legendary" },
|
||||
},
|
||||
config = function()
|
||||
require("legendary").setup({
|
||||
which_key = { auto_register = true },
|
||||
})
|
||||
end,
|
||||
}
|
||||
19
config/nvim/lua/plugins/lf.lua
Normal file
19
config/nvim/lua/plugins/lf.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
-- Lf file manager for Neovim
|
||||
-- https://github.com/lmburns/lf.nvim
|
||||
return {
|
||||
"lmburns/lf.nvim",
|
||||
cmd = "Lf",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"akinsho/toggleterm.nvim",
|
||||
},
|
||||
keys = {
|
||||
{ "<leader>fl", "<cmd>Lf<cr>", desc = "Lf File Manager" },
|
||||
},
|
||||
opts = {
|
||||
winblend = 0,
|
||||
highlights = { NormalFloat = { guibg = "NONE" } },
|
||||
border = "curved",
|
||||
escape_quit = true,
|
||||
},
|
||||
}
|
||||
34
config/nvim/lua/plugins/linting.lua
Normal file
34
config/nvim/lua/plugins/linting.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
-- Linting
|
||||
-- https://github.com/mfussenegger/nvim-lint
|
||||
return {
|
||||
"mfussenegger/nvim-lint",
|
||||
event = {
|
||||
"BufWritePre",
|
||||
"BufNewFile",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>L",
|
||||
mode = { "n" },
|
||||
function()
|
||||
require("lint").try_lint()
|
||||
end,
|
||||
desc = "Trigger linting for current file",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
events = { "BufEnter", "BufWritePost", "BufReadPost", "InsertLeave" },
|
||||
linters_by_ft = {
|
||||
["*"] = { "codespell" },
|
||||
astro = { "eslint_d", "cspell" },
|
||||
fish = { "fish" },
|
||||
javascript = { "eslint_d", "cspell" },
|
||||
javascriptreact = { "eslint_d", "cspell" },
|
||||
python = { "pylint" },
|
||||
ruby = { "rubocop" },
|
||||
svelte = { "eslint_d" },
|
||||
typescript = { "eslint_d", "cspell" },
|
||||
typescriptreact = { "eslint_d", "cspell" },
|
||||
},
|
||||
},
|
||||
}
|
||||
7
config/nvim/lua/plugins/lsp-progress.lua
Normal file
7
config/nvim/lua/plugins/lsp-progress.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"linrongbin16/lsp-progress.nvim",
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
config = function()
|
||||
require("lsp-progress").setup()
|
||||
end,
|
||||
}
|
||||
52
config/nvim/lua/plugins/lspconfig.lua
Normal file
52
config/nvim/lua/plugins/lspconfig.lua
Normal file
@@ -0,0 +1,52 @@
|
||||
-- Quickstart configs for Nvim LSP
|
||||
-- https://github.com/neovim/nvim-lspconfig
|
||||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
init = function()
|
||||
require("lazyvim.util").lsp.on_attach(function(_, buffer)
|
||||
-- stylua: ignore
|
||||
vim.keymap.set("n", "g0", "<cmd>Telescope lsp_document_symbols<cr>", { buffer = buffer, desc = "Document Symbols" })
|
||||
vim.keymap.set("n", "cc", "<cmd>lua vim.lsp.buf.code_action()<cr>", { buffer = buffer, desc = "Code Action" })
|
||||
end)
|
||||
end,
|
||||
opts = {
|
||||
inlay_hints = { enabled = false },
|
||||
servers = {
|
||||
astro = {},
|
||||
cssls = {},
|
||||
cssmodules_ls = {},
|
||||
diagnosticls = {},
|
||||
emmet_ls = {},
|
||||
graphql = {},
|
||||
html = {},
|
||||
jsonls = {},
|
||||
lua_ls = {},
|
||||
nixd = {},
|
||||
svelte = {},
|
||||
tsserver = {},
|
||||
yamlls = {},
|
||||
},
|
||||
},
|
||||
setup = function()
|
||||
local nvim_lsp = require("lspconfig")
|
||||
nvim_lsp.nixd.setup({
|
||||
cmd = { "nixd" },
|
||||
setttings = {
|
||||
nixd = {
|
||||
expr = "import <nixpkgs> { }",
|
||||
},
|
||||
formattting = {
|
||||
command = { "nixpkgs-fmt" },
|
||||
},
|
||||
options = {
|
||||
nixos = {
|
||||
expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.k-on.options',
|
||||
},
|
||||
home_manager = {
|
||||
expr = '(builtins.getFlake ("git+file://" + toString ./.)).homeConfigurations."ruixi@k-on".options',
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
105
config/nvim/lua/plugins/lualine.lua
Normal file
105
config/nvim/lua/plugins/lualine.lua
Normal file
@@ -0,0 +1,105 @@
|
||||
-- A blazing fast and easy to configure neovim statusline plugin written in pure lua.
|
||||
-- https://github.com/nvim-lualine/lualine.nvim
|
||||
return {
|
||||
"nvim-lualine/lualine.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"nvim-tree/nvim-web-devicons",
|
||||
"linrongbin16/lsp-progress.nvim",
|
||||
},
|
||||
opts = function()
|
||||
local icons = require("lazyvim.config").icons
|
||||
|
||||
local function fg(name)
|
||||
return function()
|
||||
---@type {foreground?:number}?
|
||||
local hl = vim.api.nvim_get_hl_by_name(name, true)
|
||||
return hl and hl.foreground and { fg = string.format("#%06x", hl.foreground) }
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
options = {
|
||||
icons_enabled = true,
|
||||
theme = "transparent",
|
||||
component_separators = { left = "", right = "" },
|
||||
section_separators = { left = "", right = "" },
|
||||
disabled_filetypes = { "alpha", "dashboard", "lazy " },
|
||||
always_divide_middle = true,
|
||||
globalstatus = true,
|
||||
},
|
||||
sections = {
|
||||
lualine_a = { "mode" },
|
||||
lualine_b = { "branch" },
|
||||
lualine_c = {
|
||||
{
|
||||
"diagnostics",
|
||||
symbols = {
|
||||
error = icons.diagnostics.Error,
|
||||
warn = icons.diagnostics.Warn,
|
||||
info = icons.diagnostics.Info,
|
||||
hint = icons.diagnostics.Hint,
|
||||
},
|
||||
},
|
||||
{ "filetype", icon_only = true, separator = "", padding = { left = 1, right = 0 } },
|
||||
{ "filename", path = 3, symbols = { modified = " ", readonly = "", unnamed = "" } },
|
||||
{
|
||||
"harpoon2",
|
||||
indicators = { "1", "2", "3", "4", "5" },
|
||||
active_indicators = { "[1]", "[2]", "[3]", "[4]", "[5]" },
|
||||
separator = " ",
|
||||
},
|
||||
},
|
||||
lualine_x = {
|
||||
{ require("lsp-progress").progress },
|
||||
{
|
||||
function()
|
||||
return require("noice").api.status.command.get()
|
||||
end,
|
||||
cond = function()
|
||||
return package.loaded["noice"] and require("noice").api.status.command.has()
|
||||
end,
|
||||
color = fg("Statement"),
|
||||
},
|
||||
{
|
||||
function()
|
||||
return require("noice").api.status.mode.get()
|
||||
end,
|
||||
cond = function()
|
||||
return package.loaded["noice"] and require("noice").api.status.mode.has()
|
||||
end,
|
||||
color = fg("Constant"),
|
||||
},
|
||||
{ require("lazy.status").updates, cond = require("lazy.status").has_updates, color = fg("Special") },
|
||||
{
|
||||
"diff",
|
||||
symbols = {
|
||||
added = icons.git.added,
|
||||
modified = icons.git.modified,
|
||||
removed = icons.git.removed,
|
||||
},
|
||||
},
|
||||
},
|
||||
lualine_y = {
|
||||
{ "progress", separator = "", padding = { left = 1, right = 0 } },
|
||||
{ "location", padding = { left = 0, right = 1 } },
|
||||
},
|
||||
lualine_z = {
|
||||
function()
|
||||
return " " .. os.date("%R")
|
||||
end,
|
||||
},
|
||||
},
|
||||
inactive_sections = {
|
||||
lualine_a = {},
|
||||
lualine_b = {},
|
||||
lualine_c = { "filename" },
|
||||
lualine_x = { "location" },
|
||||
lualine_y = {},
|
||||
lualine_z = {},
|
||||
},
|
||||
tabline = {},
|
||||
extensions = { "neo-tree" },
|
||||
}
|
||||
end,
|
||||
}
|
||||
10
config/nvim/lua/plugins/markdown-preview.lua
Normal file
10
config/nvim/lua/plugins/markdown-preview.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Markdown Preview
|
||||
-- https://github.com/iamcco/markdown-preview.nvim
|
||||
return {
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
ft = { "markdown" },
|
||||
build = function()
|
||||
vim.fn["mkdp#util#install"]()
|
||||
end,
|
||||
}
|
||||
53
config/nvim/lua/plugins/mason.lua
Normal file
53
config/nvim/lua/plugins/mason.lua
Normal file
@@ -0,0 +1,53 @@
|
||||
-- Package manager for LSP servers, DAP servers, linters, and formatters
|
||||
-- https://github.com/williamboman/mason.nvim
|
||||
return {
|
||||
"williamboman/mason.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"astro-language-server",
|
||||
"black",
|
||||
"codespell",
|
||||
"cspell",
|
||||
"css-lsp",
|
||||
"cssmodules-language-server",
|
||||
"delve",
|
||||
"diagnostic-languageserver",
|
||||
"emmet-ls",
|
||||
"eslint-lsp",
|
||||
"eslint_d",
|
||||
"gofumpt",
|
||||
"goimports",
|
||||
"gomodifytags",
|
||||
"html-lsp",
|
||||
"htmlbeautifier",
|
||||
"impl",
|
||||
"isort",
|
||||
"json-lsp",
|
||||
"lua-language-server",
|
||||
"markdown-oxide",
|
||||
"nixpkgs-fmt",
|
||||
"prettier",
|
||||
"prettierd",
|
||||
"pyright",
|
||||
"rubocop",
|
||||
"rubyfmt",
|
||||
"shellcheck",
|
||||
"stylua",
|
||||
"svelte-language-server",
|
||||
"tailwindcss-language-server",
|
||||
"typescript-language-server",
|
||||
"typos-lsp",
|
||||
"vale",
|
||||
"yaml-language-server",
|
||||
"yamlfmt",
|
||||
},
|
||||
ui = {
|
||||
border = "rounded",
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
5
config/nvim/lua/plugins/mundo.lua
Normal file
5
config/nvim/lua/plugins/mundo.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Vim undo tree visualizer
|
||||
-- https://github.com/simnalamburt/vim-mundo
|
||||
return {
|
||||
"simnalamburt/vim-mundo",
|
||||
}
|
||||
20
config/nvim/lua/plugins/neogit.lua
Normal file
20
config/nvim/lua/plugins/neogit.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
-- An interactive and powerful Git interface for Neovim
|
||||
-- https://github.com/NeogitOrg/neogit
|
||||
return {
|
||||
"NeogitOrg/neogit",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"sindrets/diffview.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>gn",
|
||||
function()
|
||||
require("neogit").open()
|
||||
end,
|
||||
desc = "Neogit",
|
||||
},
|
||||
},
|
||||
config = true,
|
||||
}
|
||||
56
config/nvim/lua/plugins/neotest.lua
Normal file
56
config/nvim/lua/plugins/neotest.lua
Normal file
@@ -0,0 +1,56 @@
|
||||
-- Neotest
|
||||
-- https://github.com/nvim-neotest/neotest
|
||||
return {
|
||||
{
|
||||
"nvim-neotest/neotest",
|
||||
dependencies = {
|
||||
"haydenmeade/neotest-jest",
|
||||
"marilari88/neotest-vitest",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
"<leader>tl",
|
||||
function()
|
||||
require("neotest").run.run_last()
|
||||
end,
|
||||
desc = "Run Last Test",
|
||||
},
|
||||
{
|
||||
"<leader>tL",
|
||||
function()
|
||||
require("neotest").run.run_last({
|
||||
strategy = "dap",
|
||||
})
|
||||
end,
|
||||
desc = "Debug Last Test",
|
||||
},
|
||||
{
|
||||
"<leader>tw",
|
||||
"<cmd>lua require('neotest').run.run({ jestCommand = 'jest --watch ' })<cr>",
|
||||
desc = "Run Watch",
|
||||
},
|
||||
},
|
||||
opts = function(_, opts)
|
||||
table.insert(
|
||||
opts.adapters,
|
||||
require("neotest-jest")({
|
||||
jestCommand = "npm test --",
|
||||
jestConfigFile = "custom.jest.config.ts",
|
||||
env = {
|
||||
CI = true,
|
||||
},
|
||||
cwd = function()
|
||||
return vim.fn.getcwd()
|
||||
end,
|
||||
})
|
||||
)
|
||||
table.insert(opts.adapters, require("neotest-vitest"))
|
||||
table.insert(
|
||||
opts.adapters,
|
||||
require("neotest-go")({
|
||||
recursive_run = true,
|
||||
})
|
||||
)
|
||||
end,
|
||||
},
|
||||
}
|
||||
7
config/nvim/lua/plugins/noctis.lua
Normal file
7
config/nvim/lua/plugins/noctis.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
-- https://github.com/kartikp10/noctis.nvim
|
||||
return {
|
||||
{
|
||||
"kartikp10/noctis.nvim",
|
||||
dependencies = "rktjmp/lush.nvim",
|
||||
}, -- Noctis color scheme
|
||||
}
|
||||
25
config/nvim/lua/plugins/noice.lua
Normal file
25
config/nvim/lua/plugins/noice.lua
Normal file
@@ -0,0 +1,25 @@
|
||||
-- Experimental UI plugin
|
||||
-- https://github.com/folke/noice.nvim
|
||||
return {
|
||||
"folke/noice.nvim",
|
||||
opts = {
|
||||
lsp = {
|
||||
progress = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
routes = {
|
||||
{
|
||||
filter = {
|
||||
event = "notify",
|
||||
find = "No information available",
|
||||
},
|
||||
opts = { skip = true },
|
||||
},
|
||||
},
|
||||
presets = {
|
||||
inc_rename = true,
|
||||
lsp_doc_border = true,
|
||||
},
|
||||
},
|
||||
}
|
||||
10
config/nvim/lua/plugins/notify.lua
Normal file
10
config/nvim/lua/plugins/notify.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
-- A fancy, configurable notification manager
|
||||
-- https://github.com/rcarriga/nvim-notify
|
||||
return {
|
||||
"rcarriga/nvim-notify",
|
||||
opts = {
|
||||
render = "minimal",
|
||||
stages = "static",
|
||||
timeout = 2000,
|
||||
},
|
||||
}
|
||||
11
config/nvim/lua/plugins/oatmeal.lua
Normal file
11
config/nvim/lua/plugins/oatmeal.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"dustinblackman/oatmeal.nvim",
|
||||
cmd = { "Oatmeal" },
|
||||
keys = {
|
||||
{ "<leader>om", mode = "n", desc = "Start Oatmeal session" },
|
||||
},
|
||||
opts = {
|
||||
backend = "ollama",
|
||||
model = "codellama:latest",
|
||||
},
|
||||
}
|
||||
71
config/nvim/lua/plugins/obsidian.lua
Normal file
71
config/nvim/lua/plugins/obsidian.lua
Normal file
@@ -0,0 +1,71 @@
|
||||
-- Obsidian
|
||||
-- https://github.com/epwalsh/obsidian.nvim
|
||||
return {
|
||||
"epwalsh/obsidian.nvim",
|
||||
version = "*",
|
||||
lazy = true,
|
||||
ft = "markdown",
|
||||
dependencies = {
|
||||
-- required
|
||||
"nvim-lua/plenary.nvim",
|
||||
-- optional
|
||||
"hrsh7th/nvim-cmp",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
"ibhagwan/fzf-lua",
|
||||
"junegunn/fzf",
|
||||
"junegunn/fzf.vim",
|
||||
"godlygeek/tabular",
|
||||
"preservim/vim-markdown",
|
||||
},
|
||||
opts = {
|
||||
workspaces = {
|
||||
{
|
||||
name = "zettelkasten",
|
||||
path = "~/Code/GitHub/obsidian/zettelkasten",
|
||||
overrides = {
|
||||
notes_subdir = "pages",
|
||||
},
|
||||
},
|
||||
{
|
||||
name = "highlights",
|
||||
path = "~/Code/GitHub/obsidian/highlights",
|
||||
},
|
||||
},
|
||||
completion = {
|
||||
nvim_cmp = true,
|
||||
min_chars = 2,
|
||||
use_path_only = false,
|
||||
},
|
||||
mappings = {
|
||||
-- Overrides the 'gf' mapping to work on markdown/wiki links within your vault.
|
||||
["gf"] = {
|
||||
action = function()
|
||||
return require("obsidian").util.gf_passthrough()
|
||||
end,
|
||||
opts = { noremap = false, expr = true, buffer = true },
|
||||
},
|
||||
-- Toggle check-boxes.
|
||||
["<leader>ch"] = {
|
||||
action = function()
|
||||
return require("obsidian").util.toggle_checkbox()
|
||||
end,
|
||||
opts = { buffer = true },
|
||||
},
|
||||
},
|
||||
disable_frontmatter = true,
|
||||
note_id_func = function(title)
|
||||
local suffix = ""
|
||||
if title ~= nil and title ~= "" then
|
||||
suffix = title
|
||||
else
|
||||
suffix = tostring(os.date("%Y%m%d%H%M"))
|
||||
end
|
||||
return suffix
|
||||
end,
|
||||
templates = {
|
||||
subdir = "templates",
|
||||
date_format = "%Y-%m-%d",
|
||||
time_format = "%H:%M",
|
||||
},
|
||||
},
|
||||
}
|
||||
11
config/nvim/lua/plugins/oil.lua
Normal file
11
config/nvim/lua/plugins/oil.lua
Normal file
@@ -0,0 +1,11 @@
|
||||
return {
|
||||
"stevearc/oil.nvim",
|
||||
opts = {},
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
keys = {
|
||||
{ "<leader>-", "<CMD>lua require('oil').open()<CR>", desc = "Oil" },
|
||||
},
|
||||
config = function()
|
||||
require("oil").setup()
|
||||
end,
|
||||
}
|
||||
12
config/nvim/lua/plugins/ollama.lua
Normal file
12
config/nvim/lua/plugins/ollama.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
-- Generate text using LLMs with customizable prompts
|
||||
-- https://github.com/David-Kunz/gen.nvim
|
||||
return {
|
||||
"David-Kunz/gen.nvim",
|
||||
opts = {
|
||||
model = "codellama", -- The default model to use.
|
||||
display_mode = "split", -- The display mode. Can be "float" or "split".
|
||||
show_prompt = true, -- Shows the Prompt submitted to Ollama.
|
||||
show_model = true, -- Displays which model you are using at the beginning of your chat session.
|
||||
no_auto_close = false, -- Never closes the window automatically.
|
||||
},
|
||||
}
|
||||
24
config/nvim/lua/plugins/project.lua
Normal file
24
config/nvim/lua/plugins/project.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
-- The superior project management solution for neovim
|
||||
-- https://github.com/ahmedkhalf/project.nvim
|
||||
return {
|
||||
"ahmedkhalf/project.nvim",
|
||||
lazy = false,
|
||||
keys = {
|
||||
-- stylua: ignore
|
||||
{ "<leader>p", ":Telescope projects<cr>", desc = "Search Projects" },
|
||||
},
|
||||
config = function()
|
||||
require("project_nvim").setup({
|
||||
active = true,
|
||||
on_config_done = nil,
|
||||
manual_mode = false,
|
||||
detection_methods = { "pattern" },
|
||||
patterns = { ".git", "Makefile", ".gitignore", "package.json", "!node_modules" },
|
||||
show_hidden = false,
|
||||
silent_chdir = true,
|
||||
ignore_lsp = {},
|
||||
datapath = vim.fn.stdpath("data"),
|
||||
})
|
||||
require("telescope").load_extension("projects")
|
||||
end,
|
||||
}
|
||||
5
config/nvim/lua/plugins/rainbow-csv.lua
Normal file
5
config/nvim/lua/plugins/rainbow-csv.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Highlight columns in CSV files
|
||||
-- https://github.com/mechatroner/rainbow_csv
|
||||
return {
|
||||
"mechatroner/rainbow_csv",
|
||||
}
|
||||
12
config/nvim/lua/plugins/remote-nvim.lua
Normal file
12
config/nvim/lua/plugins/remote-nvim.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
-- Remote development in Neovim 🔥
|
||||
-- https://github.com/amitds1997/remote-nvim.nvim?tab=readme-ov-file
|
||||
return {
|
||||
"amitds1997/remote-nvim.nvim",
|
||||
version = "*", -- Pin to GitHub releases
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim", -- For standard functions
|
||||
"MunifTanjim/nui.nvim", -- To build the plugin UI
|
||||
"nvim-telescope/telescope.nvim", -- For picking b/w different remote methods
|
||||
},
|
||||
config = true,
|
||||
}
|
||||
33
config/nvim/lua/plugins/screenshots.lua
Normal file
33
config/nvim/lua/plugins/screenshots.lua
Normal file
@@ -0,0 +1,33 @@
|
||||
-- Create code images using the external silicon tool
|
||||
-- https://github.com/michaelrommel/nvim-silicon
|
||||
return {
|
||||
"michaelrommel/nvim-silicon",
|
||||
lazy = true,
|
||||
cmd = "Silicon",
|
||||
config = function()
|
||||
require("silicon").setup({
|
||||
font = "Fira Code=34;Noto Emoji=34",
|
||||
theme = "Catppuccin-mocha",
|
||||
background = "#68677b",
|
||||
pad_horiz = 100,
|
||||
pad_vert = 80,
|
||||
no_round_corner = false,
|
||||
no_window_controls = false,
|
||||
no_line_number = false,
|
||||
line_pad = 0,
|
||||
tab_width = 2,
|
||||
language = function()
|
||||
return vim.bo.filetype
|
||||
end,
|
||||
shadow_blur_radius = 16,
|
||||
shadow_offset_x = 8,
|
||||
shadow_offset_y = 8,
|
||||
shadow_color = "#100808",
|
||||
gobble = true,
|
||||
to_clipboard = true,
|
||||
window_title = function()
|
||||
return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf()), ":t")
|
||||
end,
|
||||
})
|
||||
end,
|
||||
}
|
||||
36
config/nvim/lua/plugins/smart-splits.lua
Normal file
36
config/nvim/lua/plugins/smart-splits.lua
Normal file
@@ -0,0 +1,36 @@
|
||||
return {
|
||||
"mrjones2014/smart-splits.nvim",
|
||||
enabled = true,
|
||||
event = "VeryLazy",
|
||||
keys = {
|
||||
{ "<leader>wr", "<cmd>SmartResizeMode<cr>", desc = "Toggle Smart Resize Mode" },
|
||||
},
|
||||
config = function()
|
||||
require("smart-splits").setup({
|
||||
ignored_filetypes = {
|
||||
"nofile",
|
||||
"quickfix",
|
||||
"prompt",
|
||||
},
|
||||
ignored_buftypes = { "NvimTree" },
|
||||
default_amount = 3,
|
||||
at_edge = "wrap",
|
||||
move_cursor_same_row = false,
|
||||
resize_mode = {
|
||||
quit_key = "<ESC>",
|
||||
resize_keys = { "h", "j", "k", "l" },
|
||||
silent = false,
|
||||
hooks = {
|
||||
on_enter = nil,
|
||||
on_leave = nil,
|
||||
},
|
||||
},
|
||||
ignored_events = {
|
||||
"BufEnter",
|
||||
"WinEnter",
|
||||
},
|
||||
multiplexer_integration = "tmux",
|
||||
disable_multiplexer_nav_when_zoomed = true,
|
||||
})
|
||||
end,
|
||||
}
|
||||
10
config/nvim/lua/plugins/symbols-outline.lua
Normal file
10
config/nvim/lua/plugins/symbols-outline.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
-- A tree view for symbols
|
||||
-- https://github.com/simrat39/symbols-outline.nvim
|
||||
return {
|
||||
"simrat39/symbols-outline.nvim",
|
||||
config = function()
|
||||
require("symbols-outline").setup({
|
||||
width = 25,
|
||||
})
|
||||
end,
|
||||
}
|
||||
5
config/nvim/lua/plugins/table-mode.lua
Normal file
5
config/nvim/lua/plugins/table-mode.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Table Mode for instant table creation
|
||||
-- https://github.com/dhruvasagar/vim-table-mode
|
||||
return {
|
||||
"dhruvasagar/vim-table-mode",
|
||||
}
|
||||
48
config/nvim/lua/plugins/tailwindcss.lua
Normal file
48
config/nvim/lua/plugins/tailwindcss.lua
Normal file
@@ -0,0 +1,48 @@
|
||||
-- Tailwind CSS
|
||||
return {
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
opts = {
|
||||
servers = {
|
||||
tailwindcss = {},
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
opts = {
|
||||
user_default_options = {
|
||||
tailwind = true,
|
||||
},
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
{ "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
|
||||
},
|
||||
opts = function(_, opts)
|
||||
-- original LazyVim kind icon formatter
|
||||
local format_kinds = opts.formatting.format
|
||||
opts.formatting.format = function(entry, item)
|
||||
format_kinds(entry, item) -- add icons
|
||||
return require("tailwindcss-colorizer-cmp").formatter(entry, item)
|
||||
end
|
||||
end,
|
||||
},
|
||||
"laytan/tailwind-sorter.nvim",
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
build = "cd formatter && npm i && npm run build",
|
||||
config = {
|
||||
on_save_enabled = true,
|
||||
on_save_pattern = { "*.html", "*.jsx", "*.tsx", "*.astro", "*.svelte" },
|
||||
},
|
||||
},
|
||||
{
|
||||
"luckasRanarison/tailwind-tools.nvim",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
21
config/nvim/lua/plugins/telecope-heading.lua
Normal file
21
config/nvim/lua/plugins/telecope-heading.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
-- Telescope extention to switch between Headlines
|
||||
-- https://github.com/crispgm/telescope-heading.nvim
|
||||
return {
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"crispgm/telescope-heading.nvim",
|
||||
keys = {
|
||||
{ ";h", "<cmd>Telescope heading<cr>", desc = "Headlines" },
|
||||
},
|
||||
opts = {
|
||||
extensions = {
|
||||
heading = {
|
||||
treesitter = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("heading")
|
||||
end,
|
||||
},
|
||||
}
|
||||
26
config/nvim/lua/plugins/telescope-file-browser.lua
Normal file
26
config/nvim/lua/plugins/telescope-file-browser.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
-- Telescope extension for a File Browser
|
||||
-- https://github.com/nvim-telescope/telescope-file-browser.nvim
|
||||
return {
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-file-browser.nvim",
|
||||
keys = {
|
||||
{
|
||||
";t",
|
||||
"<cmd>Telescope file_browser respect_gitignore=false hidden=true grouped=true<cr>",
|
||||
desc = "File Browser",
|
||||
},
|
||||
},
|
||||
opts = {
|
||||
extensions = {
|
||||
file_browser = {
|
||||
theme = "ivy",
|
||||
hijack_netrw = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("file_browser")
|
||||
end,
|
||||
},
|
||||
}
|
||||
27
config/nvim/lua/plugins/telescope-frecency.lua
Normal file
27
config/nvim/lua/plugins/telescope-frecency.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
-- Telescope extensionn that offers intelligent priorization
|
||||
-- https://github.com/nvim-telescope/telescope-frecency.nvim
|
||||
return {
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-frecency.nvim",
|
||||
dependencies = {
|
||||
"kkharji/sqlite.lua",
|
||||
},
|
||||
keys = {
|
||||
{ ";mr", "<cmd>Telescope frecency<cr>", desc = "Most recently used files" },
|
||||
},
|
||||
opts = {
|
||||
extensions = {
|
||||
frecency = {
|
||||
show_scores = false,
|
||||
show_unindexed = true,
|
||||
ignore_patterns = { "*.git/*", "*/tmp/*" },
|
||||
disable_devicons = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("frecency")
|
||||
end,
|
||||
},
|
||||
}
|
||||
21
config/nvim/lua/plugins/telescope-fzy-native.lua
Normal file
21
config/nvim/lua/plugins/telescope-fzy-native.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
-- Telescope extension for a FZY style sorter that is compiled
|
||||
-- https://github.com/nvim-telescope/telescope-fzy-native.nvim
|
||||
return {
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-fzy-native.nvim",
|
||||
opts = {
|
||||
extensions = {
|
||||
fzy_native = {
|
||||
fuzzy = true,
|
||||
override_generic_sorter = true,
|
||||
override_file_sorter = true,
|
||||
case_mode = "smart_case",
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("fzy_native")
|
||||
end,
|
||||
},
|
||||
}
|
||||
15
config/nvim/lua/plugins/telescope-github.lua
Normal file
15
config/nvim/lua/plugins/telescope-github.lua
Normal file
@@ -0,0 +1,15 @@
|
||||
-- Telescope extension to integrate with GitHub CLI
|
||||
-- https://github.com/nvim-telescope/telescope-github.nvim
|
||||
return {
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope-github.nvim",
|
||||
keys = {
|
||||
{ ";p", "<cmd>Telescope gh pull_request<cr>", desc = "GitHub Pull Requests" },
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("gh")
|
||||
end,
|
||||
},
|
||||
}
|
||||
12
config/nvim/lua/plugins/telescope-import.lua
Normal file
12
config/nvim/lua/plugins/telescope-import.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
-- Import modules with ease
|
||||
-- https://github.com/piersolenski/telescope-import.nvim
|
||||
return {
|
||||
"piersolenski/telescope-import.nvim",
|
||||
dependencies = "nvim-telescope/telescope.nvim",
|
||||
keys = {
|
||||
{ ";i", "<cmd>Telescope import<cr>", desc = "Import Modules" },
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("import")
|
||||
end,
|
||||
}
|
||||
21
config/nvim/lua/plugins/telescope-live-grep-args.lua
Normal file
21
config/nvim/lua/plugins/telescope-live-grep-args.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
-- Telescope extension to search with arguments
|
||||
-- https://github.com/nvim-telescope/telescope-live-grep-args.nvim
|
||||
return {
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-live-grep-args.nvim",
|
||||
opts = {
|
||||
extensions = {
|
||||
live_grep_args = {
|
||||
auto_quoting = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
keys = {
|
||||
{ ";s", "<cmd>Telescope live_grep_args<cr>", desc = "Live Grep" },
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("live_grep_args")
|
||||
end,
|
||||
},
|
||||
}
|
||||
14
config/nvim/lua/plugins/telescope-node-modules.lua
Normal file
14
config/nvim/lua/plugins/telescope-node-modules.lua
Normal file
@@ -0,0 +1,14 @@
|
||||
-- Telescope plugin to search the node_modules directory
|
||||
-- https://github.com/nvim-telescope/telescope-node-modules.nvim
|
||||
return {
|
||||
"telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope-node-modules.nvim",
|
||||
keys = {
|
||||
{ ";N", "<cmd>Telescope node_modules list<cr>", desc = "Node Modules" },
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("node_modules")
|
||||
end,
|
||||
},
|
||||
}
|
||||
16
config/nvim/lua/plugins/telescope-smart-open.lua
Normal file
16
config/nvim/lua/plugins/telescope-smart-open.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
-- Neovim plugin for fast file-finding
|
||||
-- https://github.com/danielfalk/smart-open.nvim
|
||||
return {
|
||||
"danielfalk/smart-open.nvim",
|
||||
branch = "0.2.x",
|
||||
keys = {
|
||||
{ ";o", "<cmd>Telescope smart_open<cr>", desc = "Smart Open" },
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("smart_open")
|
||||
end,
|
||||
dependencies = {
|
||||
"kkharji/sqlite.lua",
|
||||
{ "nvim-telescope/telescope-fzy-native.nvim" },
|
||||
},
|
||||
}
|
||||
26
config/nvim/lua/plugins/telescope-undo.lua
Normal file
26
config/nvim/lua/plugins/telescope-undo.lua
Normal file
@@ -0,0 +1,26 @@
|
||||
-- Telescope extension to view and search the undo tree
|
||||
-- https://github.com/debugloop/telescope-undo.nvim
|
||||
return {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"debugloop/telescope-undo.nvim",
|
||||
},
|
||||
keys = {
|
||||
{ ";u", "<cmd>Telescope undo<cr>", desc = "Undo Tree" },
|
||||
},
|
||||
opts = {
|
||||
extensions = {
|
||||
undo = {
|
||||
side_by_side = true,
|
||||
layout_strategy = "vertical",
|
||||
layout_config = {
|
||||
preview_height = 0.8,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("telescope").load_extension("undo")
|
||||
end,
|
||||
}
|
||||
19
config/nvim/lua/plugins/telescope.lua
Normal file
19
config/nvim/lua/plugins/telescope.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
-- Find, Filter, Preview, Pick
|
||||
-- https://github.com/nvim-telescope/telescope.nvim
|
||||
return {
|
||||
"telescope.nvim",
|
||||
keys = {
|
||||
{ ";a", "<cmd>Telescope find_files hidden=true<cr>", desc = "Find Files (hidden)" },
|
||||
{ ";b", "<cmd>Telescope buffers previewer=false shorten_path=true theme=dropdown<cr>", desc = "Buffers" },
|
||||
{ ";cs", "<cmd>Telescope spell_suggest<cr>", desc = "Spell Suggest" },
|
||||
{ ";d", "<cmd>Telescope diagnostics<cr>", desc = "Diagnostics" },
|
||||
{ ";f", "<cmd>Telescope find_files<cr>", desc = "Find Files" },
|
||||
{ ";n", "<cmd>Telescope notify<cr>", desc = "Notify" },
|
||||
{ ";r", "<cmd>Telescope resume<cr>", desc = "Resume" },
|
||||
{ "<C-p>", "<cmd>Telescope find_files<cr>", desc = "Find Files" },
|
||||
{ "<C-t>", "<cmd>Telescope<cr>", desc = "Telescope" },
|
||||
{ "<M-b>", "<cmd>Telescope buffers previewer=false shorten_path=true theme=dropdown<cr>", desc = "Buffers" },
|
||||
{ "<M-p>", "<cmd>Telescope find_files hidden=true<cr>", desc = "Find Files (hidden)" },
|
||||
{ "\\\\", "<cmd>Telescope buffers previewer=false shorten_path=true theme=dropdown<cr>", desc = "Buffers" },
|
||||
},
|
||||
}
|
||||
28
config/nvim/lua/plugins/tmux-awesome-plugin-manager.lua
Normal file
28
config/nvim/lua/plugins/tmux-awesome-plugin-manager.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
-- TMUX commands manager
|
||||
-- https://github.com/otavioschwanck/tmux-awesome-manager.nvim
|
||||
return {
|
||||
"otavioschwanck/tmux-awesome-manager.nvim",
|
||||
keys = {
|
||||
-- stylua: ignore
|
||||
{ "<leader>sT", function() vim.cmd(":Telescope tmux-awesome-manager list_terms") end, desc = "TMUX Awesome Manager" },
|
||||
},
|
||||
config = function()
|
||||
local tmux = require("tmux-awesome-manager")
|
||||
|
||||
tmux.setup({
|
||||
per_project_commands = {
|
||||
astro = { { cmd = "pnpm dev", name = "Astro Dev" } },
|
||||
},
|
||||
session_name = "Neovim Terminals",
|
||||
project_open_as = "window",
|
||||
default_size = "30%",
|
||||
open_new_as = "window",
|
||||
})
|
||||
|
||||
tmux.run_wk({ cmd = "pnpm dev", name = "Astro Development Server" })
|
||||
|
||||
tmux.run_wk({ cmd = "yarn develop", name = "Brewery Server" })
|
||||
tmux.run_wk({ cmd = "MD=${PWD}/packages/xdl/ yarn dev", name = "Brewery Fast Server" })
|
||||
tmux.run_wk({ cmd = "yarn test:unit -u", name = "Brewery Unit Tests" })
|
||||
end,
|
||||
}
|
||||
6
config/nvim/lua/plugins/tmux-navigator.lua
Normal file
6
config/nvim/lua/plugins/tmux-navigator.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
-- Seamless navigation between tmux panes and vim splits
|
||||
-- https://github.com/christoomey/vim-tmux-navigator
|
||||
return {
|
||||
"christoomey/vim-tmux-navigator",
|
||||
event = "VeryLazy",
|
||||
}
|
||||
7
config/nvim/lua/plugins/todo-comments.lua
Normal file
7
config/nvim/lua/plugins/todo-comments.lua
Normal file
@@ -0,0 +1,7 @@
|
||||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
dependencies = { "nvim-lua/plenary.nvim" },
|
||||
keys = {
|
||||
{ ";O", "<cmd>TodoTelescope<cr>", desc = "Todo Comments" },
|
||||
},
|
||||
}
|
||||
13
config/nvim/lua/plugins/transparent.lua
Normal file
13
config/nvim/lua/plugins/transparent.lua
Normal file
@@ -0,0 +1,13 @@
|
||||
-- Remove all background colors to make Neovim transparent
|
||||
-- https://github.com/xiyaowong/nvim-transparent
|
||||
return {
|
||||
"xiyaowong/nvim-transparent",
|
||||
opts = {
|
||||
extra_groups = {
|
||||
"TelescopeBorder",
|
||||
"TelescopeNormal",
|
||||
-- "NeoTreeNormal",
|
||||
-- "NeoTreeNormalNC",
|
||||
},
|
||||
},
|
||||
}
|
||||
55
config/nvim/lua/plugins/treesitter.lua
Normal file
55
config/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,55 @@
|
||||
-- Nvim Treesitter configurations
|
||||
-- https://github.com/nvim-treesitter/nvim-treesitter
|
||||
return {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
depencendies = {
|
||||
"nvim-treesitter/playground",
|
||||
},
|
||||
opts = {
|
||||
indent = { enable = false },
|
||||
ensure_installed = {
|
||||
"astro",
|
||||
"bash",
|
||||
"css",
|
||||
"fish",
|
||||
"gitignore",
|
||||
"go",
|
||||
"gomod",
|
||||
"gosum",
|
||||
"gowork",
|
||||
"graphql",
|
||||
"html",
|
||||
"http",
|
||||
"javascript",
|
||||
"json",
|
||||
"lua",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"python",
|
||||
"query",
|
||||
"regex",
|
||||
"scss",
|
||||
"sql",
|
||||
"svelte",
|
||||
"tsx",
|
||||
"typescript",
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"yaml",
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("nvim-treesitter.configs").setup(opts)
|
||||
|
||||
-- Add custom filetypes
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
mdx = "mdx",
|
||||
rss = "rss",
|
||||
},
|
||||
})
|
||||
|
||||
vim.treesitter.language.register("markdown", "mdx")
|
||||
vim.treesitter.language.register("xml", "rss")
|
||||
end,
|
||||
}
|
||||
8
config/nvim/lua/plugins/twilight.lua
Normal file
8
config/nvim/lua/plugins/twilight.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
-- Distraction-free coding
|
||||
-- https://github.com/folke/zen-mode.nvim
|
||||
return {
|
||||
"folke/twilight.nvim",
|
||||
config = function()
|
||||
require("twilight").setup()
|
||||
end,
|
||||
}
|
||||
79
config/nvim/lua/plugins/ufo.lua
Normal file
79
config/nvim/lua/plugins/ufo.lua
Normal file
@@ -0,0 +1,79 @@
|
||||
-- Not UFO in the sky, but an ultra fold in Neovim.
|
||||
-- https://github.com/kevinhwang91/nvim-ufo
|
||||
return {
|
||||
"kevinhwang91/nvim-ufo",
|
||||
dependencies = "kevinhwang91/promise-async",
|
||||
config = function()
|
||||
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||
vim.o.foldcolumn = "0"
|
||||
vim.o.foldlevel = 99
|
||||
vim.o.foldlevelstart = 100
|
||||
vim.o.foldenable = true
|
||||
|
||||
local handler = function(virtText, lnum, endLnum, width, truncate)
|
||||
local newVirtText = {}
|
||||
local suffix = (" %d "):format(endLnum - lnum)
|
||||
local sufWidth = vim.fn.strdisplaywidth(suffix)
|
||||
local targetWidth = width - sufWidth
|
||||
local curWidth = 0
|
||||
for _, chunk in ipairs(virtText) do
|
||||
local chunkText = chunk[1]
|
||||
local chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
if targetWidth > curWidth + chunkWidth then
|
||||
table.insert(newVirtText, chunk)
|
||||
else
|
||||
chunkText = truncate(chunkText, targetWidth - curWidth)
|
||||
local hlGroup = chunk[2]
|
||||
table.insert(newVirtText, { chunkText, hlGroup })
|
||||
chunkWidth = vim.fn.strdisplaywidth(chunkText)
|
||||
if curWidth + chunkWidth < targetWidth then
|
||||
suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth)
|
||||
end
|
||||
break
|
||||
end
|
||||
curWidth = curWidth + chunkWidth
|
||||
end
|
||||
table.insert(newVirtText, { suffix, "MoreMsg" })
|
||||
return newVirtText
|
||||
end
|
||||
|
||||
require("ufo").setup({
|
||||
fold_virt_text_handler = handler,
|
||||
close_fold_kinds_for_ft = {
|
||||
default = { "imports", "comment" },
|
||||
},
|
||||
open_fold_hl_timeout = 300,
|
||||
enable_get_fold_virt_text = false,
|
||||
preview = {},
|
||||
provider_selector = function()
|
||||
return { "lsp", "indent" }
|
||||
end,
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{
|
||||
"zR",
|
||||
function()
|
||||
require("ufo").openAllFolds()
|
||||
end,
|
||||
desc = "Open all folds",
|
||||
},
|
||||
{
|
||||
"zM",
|
||||
function()
|
||||
require("ufo").closeAllFolds()
|
||||
end,
|
||||
desc = "Close all folds",
|
||||
},
|
||||
{
|
||||
"zK",
|
||||
function()
|
||||
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
||||
if not winid then
|
||||
vim.lsp.buf.hover()
|
||||
end
|
||||
end,
|
||||
desc = "Peek fold",
|
||||
},
|
||||
},
|
||||
}
|
||||
8
config/nvim/lua/plugins/various-textobjs.lua
Normal file
8
config/nvim/lua/plugins/various-textobjs.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
return {
|
||||
"chrisgrieser/nvim-various-textobjs",
|
||||
config = function()
|
||||
require("various-textobjs").setup({
|
||||
useDefaultKeymaps = true,
|
||||
})
|
||||
end,
|
||||
}
|
||||
5
config/nvim/lua/plugins/vim-nix.lua
Normal file
5
config/nvim/lua/plugins/vim-nix.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Vim-Nix
|
||||
-- https://github.com/LnL7/vim-nix
|
||||
return {
|
||||
"LnL7/vim-nix",
|
||||
}
|
||||
10
config/nvim/lua/plugins/vimux.lua
Normal file
10
config/nvim/lua/plugins/vimux.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Easily interact with tmux from vim
|
||||
-- https://github.com/preservim/vimux
|
||||
return {
|
||||
"preservim/vimux",
|
||||
config = function()
|
||||
vim.g.VimuxHeight = "30"
|
||||
vim.g.VimuxOrientation = "h"
|
||||
vim.g.VimuxUseNearestPane = 0
|
||||
end,
|
||||
}
|
||||
5
config/nvim/lua/plugins/visincr.lua
Normal file
5
config/nvim/lua/plugins/visincr.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- vim-visincr
|
||||
-- https://github.com/jikkujose/vim-visincr
|
||||
return {
|
||||
"jikkujose/vim-visincr",
|
||||
}
|
||||
5
config/nvim/lua/plugins/visual-multi.lua
Normal file
5
config/nvim/lua/plugins/visual-multi.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Multiple cursors
|
||||
-- https://github.com/mg979/vim-visual-multi
|
||||
return {
|
||||
"mg979/vim-visual-multi",
|
||||
}
|
||||
6
config/nvim/lua/plugins/wakatime.lua
Normal file
6
config/nvim/lua/plugins/wakatime.lua
Normal file
@@ -0,0 +1,6 @@
|
||||
-- Track time and metrics
|
||||
-- https://github.com/wakatime/vim-wakatime
|
||||
return {
|
||||
"wakatime/vim-wakatime",
|
||||
event = "VeryLazy",
|
||||
}
|
||||
20
config/nvim/lua/plugins/worktrees.lua
Normal file
20
config/nvim/lua/plugins/worktrees.lua
Normal file
@@ -0,0 +1,20 @@
|
||||
return {
|
||||
"Juksuu/worktrees.nvim",
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
"telescope.nvim",
|
||||
},
|
||||
keys = {
|
||||
{
|
||||
";w",
|
||||
function()
|
||||
require("telescope").extensions.worktrees.list_worktrees()
|
||||
end,
|
||||
desc = "Telescope Git Worktrees",
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("worktrees").setup()
|
||||
require("telescope").load_extension("worktrees")
|
||||
end,
|
||||
}
|
||||
8
config/nvim/lua/plugins/wrapping.lua
Normal file
8
config/nvim/lua/plugins/wrapping.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
-- Switch between hard and soft wrapping
|
||||
-- https://github.com/andrewferrier/wrapping.nvim
|
||||
return {
|
||||
"andrewferrier/wrapping.nvim",
|
||||
config = function()
|
||||
require("wrapping").setup()
|
||||
end,
|
||||
}
|
||||
5
config/nvim/lua/plugins/xtract.lua
Normal file
5
config/nvim/lua/plugins/xtract.lua
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Extract the selection into a new file
|
||||
-- https://github.com/rstacruz/vim-xtract
|
||||
return {
|
||||
"rstacruz/vim-xtract",
|
||||
}
|
||||
45
config/nvim/lua/plugins/zen-mode.lua
Normal file
45
config/nvim/lua/plugins/zen-mode.lua
Normal file
@@ -0,0 +1,45 @@
|
||||
-- Distraction-free coding
|
||||
-- https://github.com/folke/zen-mode.nvim
|
||||
return {
|
||||
"folke/zen-mode.nvim",
|
||||
keys = {
|
||||
-- stylua: ignore
|
||||
{ "<leader>zz", "<cmd>ZenMode<cr>", desc = "Zen Mode" },
|
||||
},
|
||||
config = function()
|
||||
require("zen-mode").setup({
|
||||
window = {
|
||||
backdrop = 0.98,
|
||||
width = 80,
|
||||
height = 0.85,
|
||||
options = {
|
||||
signcolumn = "no", -- disable signcolumn
|
||||
number = false, -- disable number column
|
||||
relativenumber = false, -- disable relative numbers
|
||||
cursorline = false, -- disable cursorline
|
||||
cursorcolumn = false, -- disable cursor column
|
||||
foldcolumn = "0", -- disable fold column
|
||||
list = false, -- disable whitespace characters
|
||||
},
|
||||
},
|
||||
plugins = {
|
||||
options = {
|
||||
enabled = true,
|
||||
ruler = true, -- disables the ruler text in the cmd line area
|
||||
showcmd = false, -- disables the command in the last line of the screen
|
||||
},
|
||||
twilight = { enabled = false }, -- enable to start Twilight when zen mode opens
|
||||
gitsigns = { enabled = false }, -- disables git signs
|
||||
tmux = { enabled = true }, -- disables the tmux statusline
|
||||
wezterm = {
|
||||
enabled = true,
|
||||
font = "+20", -- font size increment
|
||||
},
|
||||
kitty = {
|
||||
enabled = true,
|
||||
font = "+2", -- font size increment
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user