582 lines
20 KiB
Lua
582 lines
20 KiB
Lua
return {
|
|
-- LSP
|
|
'williamboman/mason.nvim',
|
|
'williamboman/mason-lspconfig.nvim',
|
|
'neovim/nvim-lspconfig',
|
|
{
|
|
'nvimdev/lspsaga.nvim',
|
|
config = function()
|
|
require('lspsaga').setup({})
|
|
end,
|
|
dependencies = {
|
|
'nvim-treesitter/nvim-treesitter',
|
|
'nvim-tree/nvim-web-devicons'
|
|
}
|
|
},
|
|
{
|
|
"zbirenbaum/copilot.lua",
|
|
cmd = "Copilot",
|
|
event = "InsertEnter",
|
|
config = function()
|
|
require("copilot").setup({
|
|
panel = {
|
|
enabled = true,
|
|
auto_refresh = true,
|
|
},
|
|
suggestion = {
|
|
enabled = true,
|
|
auto_trigger = true,
|
|
accept = false, -- disable built-in keymapping
|
|
},
|
|
filetypes = {
|
|
markdown = true,
|
|
yaml = true
|
|
}
|
|
})
|
|
end,
|
|
},
|
|
'hrsh7th/nvim-cmp',
|
|
'hrsh7th/cmp-nvim-lsp',
|
|
'hrsh7th/cmp-nvim-lua',
|
|
'hrsh7th/cmp-nvim-lsp-signature-help',
|
|
'hrsh7th/cmp-vsnip',
|
|
'hrsh7th/cmp-path',
|
|
'hrsh7th/cmp-buffer',
|
|
'hrsh7th/vim-vsnip',
|
|
{
|
|
'nvim-lualine/lualine.nvim',
|
|
dependencies = { 'nvim-tree/nvim-web-devicons' },
|
|
config = function()
|
|
require('lualine').setup {
|
|
options = {
|
|
icons_enabled = true,
|
|
theme = 'auto',
|
|
component_separators = { left = '', right = '' },
|
|
section_separators = { left = '', right = '' },
|
|
disabled_filetypes = {
|
|
statusline = {},
|
|
winbar = {},
|
|
'sagaoutline',
|
|
'neo-tree'
|
|
},
|
|
ignore_focus = {},
|
|
always_divide_middle = false,
|
|
globalstatus = false,
|
|
refresh = {
|
|
statusline = 1000,
|
|
tabline = 1000,
|
|
winbar = 1000,
|
|
}
|
|
},
|
|
tabline = {},
|
|
winbar = {},
|
|
inactive_winbar = {},
|
|
extensions = {},
|
|
}
|
|
end
|
|
},
|
|
{
|
|
"nvim-neo-tree/neo-tree.nvim",
|
|
branch = "v3.x",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
|
"MunifTanjim/nui.nvim",
|
|
-- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information
|
|
}
|
|
},
|
|
'nvim-tree/nvim-web-devicons',
|
|
'navarasu/onedark.nvim',
|
|
{
|
|
-- Hides the highlight after searching and going into insert mode
|
|
'nvimdev/hlsearch.nvim',
|
|
event = { "BufRead" },
|
|
config = function()
|
|
require('hlsearch').setup()
|
|
end
|
|
},
|
|
{
|
|
'nvim-pack/nvim-spectre'
|
|
},
|
|
{
|
|
'chrisgrieser/nvim-spider',
|
|
lazy = true,
|
|
},
|
|
{
|
|
'fedepujol/move.nvim',
|
|
config = function()
|
|
require('move').setup({
|
|
require('move').setup({
|
|
line = {
|
|
enable = true, -- Enables line movement
|
|
indent = true -- Toggles indentation
|
|
},
|
|
block = {
|
|
enable = true, -- Enables block movement
|
|
indent = true -- Toggles indentation
|
|
},
|
|
word = {
|
|
enable = true, -- Enables word movement
|
|
},
|
|
char = {
|
|
enable = true -- Enables char movement
|
|
}
|
|
})
|
|
})
|
|
end
|
|
},
|
|
{
|
|
'smoka7/hop.nvim',
|
|
version = "*",
|
|
opts = {},
|
|
},
|
|
{
|
|
"cbochs/grapple.nvim",
|
|
dependencies = {
|
|
{ "nvim-tree/nvim-web-devicons", lazy = true }
|
|
},
|
|
opts = {
|
|
scope = "git", -- also try out "git_branch"
|
|
},
|
|
event = { "BufReadPost", "BufNewFile" },
|
|
cmd = "Grapple",
|
|
keys = {
|
|
{ "<leader>M", "<cmd>Grapple toggle<cr>", desc = "Grapple toggle tag" },
|
|
{ "<leader>m", "<cmd>Grapple toggle_tags<cr>", desc = "Grapple open tags window" },
|
|
{ "<leader>n", "<cmd>Grapple cycle_tags next<cr>", desc = "Grapple cycle next tag" },
|
|
{ "<leader>N", "<cmd>Grapple cycle_tags prev<cr>", desc = "Grapple cycle previous tag" },
|
|
},
|
|
},
|
|
'simrat39/rust-tools.nvim',
|
|
{
|
|
"ray-x/go.nvim",
|
|
dependencies = { -- optional packages
|
|
"ray-x/guihua.lua",
|
|
"neovim/nvim-lspconfig",
|
|
"nvim-treesitter/nvim-treesitter",
|
|
},
|
|
config = function()
|
|
require("go").setup()
|
|
end,
|
|
event = { "CmdlineEnter" },
|
|
ft = { "go", 'gomod' },
|
|
build = ':lua require("go.install").update_all_sync()' -- if you need to install/update all binaries
|
|
},
|
|
{ "ellisonleao/glow.nvim", config = function() require("glow").setup() end },
|
|
{ 'saadparwaiz1/cmp_luasnip' },
|
|
({
|
|
"L3MON4D3/LuaSnip",
|
|
version = "v2.*",
|
|
run = "make install_jsregexp"
|
|
}),
|
|
{ 'nvim-lua/plenary.nvim' },
|
|
{
|
|
'nvim-telescope/telescope.nvim',
|
|
config = function()
|
|
local tl = require('telescope')
|
|
tl.load_extension("file_browser")
|
|
tl.setup {
|
|
pickers = {
|
|
find_files = {
|
|
theme = "dropdown",
|
|
hidden = true,
|
|
},
|
|
}
|
|
}
|
|
end
|
|
},
|
|
{
|
|
'LukasPietzschmann/telescope-tabs',
|
|
requires = { 'nvim-telescope/telescope.nvim' },
|
|
config = function()
|
|
require 'telescope-tabs'.setup {
|
|
-- Your custom config :^)
|
|
}
|
|
end
|
|
},
|
|
{
|
|
"nvim-telescope/telescope-file-browser.nvim",
|
|
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
|
|
},
|
|
{
|
|
"ThePrimeagen/refactoring.nvim",
|
|
requires = {
|
|
{ "nvim-lua/plenary.nvim" },
|
|
{ "nvim-treesitter/nvim-treesitter" },
|
|
},
|
|
},
|
|
{
|
|
"NeogitOrg/neogit",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
"nvim-telescope/telescope.nvim",
|
|
"sindrets/diffview.nvim",
|
|
},
|
|
config = true
|
|
},
|
|
{ 'mg979/vim-visual-multi' },
|
|
{ 'rhysd/git-messenger.vim' },
|
|
{ 'sindrets/diffview.nvim' },
|
|
{
|
|
'nvimdev/dashboard-nvim',
|
|
event = 'VimEnter',
|
|
config = function()
|
|
require('dashboard').setup {
|
|
-- config
|
|
}
|
|
end,
|
|
dependencies = { { 'nvim-tree/nvim-web-devicons' } }
|
|
},
|
|
{
|
|
'kevinhwang91/nvim-ufo',
|
|
dependencies = 'kevinhwang91/promise-async',
|
|
config = function()
|
|
require('ufo').setup({
|
|
provider_selector = function(bufnr, filetype, buftype)
|
|
return { 'treesitter', 'indent' }
|
|
end
|
|
})
|
|
end
|
|
},
|
|
{
|
|
'stevearc/oil.nvim',
|
|
opts = {},
|
|
-- Optional dependencies
|
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
},
|
|
{
|
|
"nvim-treesitter/nvim-treesitter",
|
|
build = ":TSUpdate",
|
|
},
|
|
{
|
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
|
after = "nvim-treesitter",
|
|
requires = "nvim-treesitter/nvim-treesitter",
|
|
},
|
|
{
|
|
-- Press % to jump to the other side of a block
|
|
'yorickpeterse/nvim-tree-pairs',
|
|
config = function()
|
|
require('tree-pairs').setup()
|
|
end
|
|
},
|
|
{
|
|
"folke/noice.nvim",
|
|
event = "VeryLazy",
|
|
opts = {
|
|
-- add any options here
|
|
},
|
|
dependencies = {
|
|
"MunifTanjim/nui.nvim",
|
|
"rcarriga/nvim-notify", plug
|
|
},
|
|
config = function()
|
|
require("noice").setup({
|
|
lsp = {
|
|
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
|
override = {
|
|
["vim.lsp.util.convert_input_to_markdown_lines"] = true,
|
|
["vim.lsp.util.stylize_markdown"] = true,
|
|
["cmp.entry.get_documentation"] = true, -- requires hrsh7th/nvim-cmp
|
|
},
|
|
},
|
|
-- you can enable a preset for easier configuration
|
|
presets = {
|
|
bottom_search = true, -- use a classic bottom cmdline for search
|
|
command_palette = true, -- position the cmdline and popupmenu together
|
|
long_message_to_split = true, -- long messages will be sent to a split
|
|
inc_rename = false, -- enables an input dialog for inc-rename.nvim
|
|
lsp_doc_border = false, -- add a border to hover docs and signature help
|
|
},
|
|
})
|
|
end
|
|
},
|
|
{
|
|
"folke/todo-comments.nvim",
|
|
dependencies = { "nvim-lua/plenary.nvim" },
|
|
opts = {
|
|
-- your configuration comes here
|
|
-- or leave it empty to use the default settings
|
|
-- refer to the configuration section below
|
|
}
|
|
},
|
|
{
|
|
"folke/trouble.nvim",
|
|
dependencies = { "nvim-tree/nvim-web-devicons" },
|
|
opts = {
|
|
-- your configuration comes here
|
|
-- or leave it empty to use the default settings
|
|
-- refer to the configuration section below
|
|
},
|
|
},
|
|
'jiangmiao/auto-pairs',
|
|
{ 'luochen1990/rainbow' },
|
|
{
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
main = "ibl",
|
|
opts = {},
|
|
config = function()
|
|
local highlight = {
|
|
"RainbowRed",
|
|
"RainbowYellow",
|
|
"RainbowBlue",
|
|
"RainbowOrange",
|
|
"RainbowGreen",
|
|
"RainbowViolet",
|
|
"RainbowCyan",
|
|
}
|
|
|
|
local hooks = require "ibl.hooks"
|
|
-- create the highlight groups in the highlight setup hook, so they are reset
|
|
-- every time the colorscheme changes
|
|
hooks.register(hooks.type.HIGHLIGHT_SETUP, function()
|
|
vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" })
|
|
vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" })
|
|
vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" })
|
|
vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" })
|
|
vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" })
|
|
vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" })
|
|
vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" })
|
|
end)
|
|
|
|
require("ibl").setup { indent = { highlight = highlight } }
|
|
end
|
|
},
|
|
{
|
|
"kylechui/nvim-surround",
|
|
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
|
event = "VeryLazy",
|
|
config = function()
|
|
require("nvim-surround").setup({
|
|
-- Configuration here, or leave empty to use defaults
|
|
})
|
|
end
|
|
},
|
|
{
|
|
'nmac427/guess-indent.nvim',
|
|
config = function()
|
|
require('guess-indent').setup()
|
|
end
|
|
},
|
|
{
|
|
"folke/which-key.nvim",
|
|
event = "VeryLazy",
|
|
init = function()
|
|
vim.o.timeout = true
|
|
vim.o.timeoutlen = 300
|
|
end,
|
|
opts = {
|
|
-- your configuration comes here
|
|
-- or leave it empty to use the default settings
|
|
-- refer to the configuration section below
|
|
}
|
|
},
|
|
{
|
|
'folke/neodev.nvim',
|
|
config = function()
|
|
require('neodev').setup {}
|
|
end
|
|
},
|
|
{ 'vladdoster/remember.nvim', config = [[ require('remember') ]] },
|
|
{
|
|
-- Adds git related signs to the gutter, as well as utilities for managing changes
|
|
'lewis6991/gitsigns.nvim',
|
|
opts = {
|
|
-- See `:help gitsigns.txt`
|
|
signs = {
|
|
add = { text = '+' },
|
|
change = { text = '~' },
|
|
delete = { text = '_' },
|
|
topdelete = { text = '‾' },
|
|
changedelete = { text = '~' },
|
|
},
|
|
current_line_blame = true,
|
|
on_attach = function(bufnr)
|
|
vim.keymap.set('n', '<leader>hp', require('gitsigns').preview_hunk,
|
|
{ buffer = bufnr, desc = 'Preview git hunk' })
|
|
|
|
-- don't override the built-in and fugitive keymaps
|
|
local gs = package.loaded.gitsigns
|
|
vim.keymap.set({ 'n', 'v' }, ']c', function()
|
|
if vim.wo.diff then
|
|
return ']c'
|
|
end
|
|
vim.schedule(function()
|
|
gs.next_hunk()
|
|
end)
|
|
return '<Ignore>'
|
|
end, { expr = true, buffer = bufnr, desc = 'Jump to next hunk' })
|
|
vim.keymap.set({ 'n', 'v' }, '[c', function()
|
|
if vim.wo.diff then
|
|
return '[c'
|
|
end
|
|
vim.schedule(function()
|
|
gs.prev_hunk()
|
|
end)
|
|
return '<Ignore>'
|
|
end, { expr = true, buffer = bufnr, desc = 'Jump to previous hunk' })
|
|
end,
|
|
},
|
|
},
|
|
{
|
|
"FabijanZulj/blame.nvim",
|
|
config = function()
|
|
require("blame").setup({
|
|
date_format = "%m/%d/%Y",
|
|
})
|
|
end
|
|
},
|
|
{
|
|
"ahmedkhalf/project.nvim",
|
|
config = function()
|
|
require("project_nvim").setup {
|
|
-- your configuration comes here
|
|
-- or leave it empty to use the default settings
|
|
-- refer to the configuration section below
|
|
}
|
|
end
|
|
},
|
|
{
|
|
'stevearc/conform.nvim',
|
|
opts = {},
|
|
config = function()
|
|
require("conform").setup({
|
|
formatters_by_ft = {
|
|
lua = { "stylua" },
|
|
-- Conform will run multiple formatters sequentially
|
|
python = { "isort", "black" },
|
|
-- Use a sub-list to run only the first available formatter
|
|
javascript = { { "prettierd", "prettier" } },
|
|
},
|
|
})
|
|
end
|
|
},
|
|
{
|
|
'rmagatti/auto-session',
|
|
config = function()
|
|
require("auto-session").setup {
|
|
log_level = "error",
|
|
auto_session_suppress_dirs = { "~/", "~/Projects", "~/Downloads", "/" },
|
|
}
|
|
end
|
|
},
|
|
{
|
|
'akinsho/toggleterm.nvim',
|
|
version = "*",
|
|
config = true
|
|
},
|
|
{
|
|
"epwalsh/obsidian.nvim",
|
|
version = "*",
|
|
-- lazy = true,
|
|
-- ft = "markdown",
|
|
dependencies = {
|
|
"nvim-lua/plenary.nvim",
|
|
},
|
|
opts = {
|
|
workspaces = {
|
|
{
|
|
name = "personal",
|
|
path = "~/Obsidian/notes/",
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
'declancm/maximize.nvim',
|
|
config = function() require('maximize').setup() end
|
|
},
|
|
{
|
|
"chrishrb/gx.nvim",
|
|
keys = { { "gx", "<cmd>Browse<cr>", mode = { "n", "x" } } },
|
|
cmd = { "Browse" },
|
|
init = function()
|
|
vim.g.netrw_nogx = 1 -- disable netrw gx
|
|
end,
|
|
dependencies = { "nvim-lua/plenary.nvim" },
|
|
submodules = false,
|
|
config = function()
|
|
local platform = vim.loop.os_uname().sysname
|
|
local app = ""
|
|
if platform == "Darwin" then
|
|
app = "open"
|
|
elseif platform == "Linux" then
|
|
app = "xdg-open"
|
|
end
|
|
require("gx").setup {
|
|
open_browser_app = app,
|
|
open_browser_args = { "--background" }, -- specify any arguments, such as --background for macOS' "open".
|
|
handlers = {
|
|
plugin = true, -- open plugin links in lua (e.g. packer, lazy, ..)
|
|
github = true, -- open github issues
|
|
brewfile = true, -- open Homebrew formulaes and casks
|
|
package_json = true, -- open dependencies from package.json
|
|
search = true, -- search the web/selection on the web if nothing else is found
|
|
},
|
|
handler_options = {
|
|
search_engine = "duckduckgo", -- you can select between google, bing, duckduckgo, and ecosia
|
|
},
|
|
}
|
|
end,
|
|
},
|
|
{
|
|
'chentoast/marks.nvim',
|
|
config = function()
|
|
require 'marks'.setup {
|
|
-- whether to map keybinds or not. default true
|
|
default_mappings = true,
|
|
-- which builtin marks to show. default {}
|
|
builtin_marks = { ".", "<", ">", "^" },
|
|
-- whether movements cycle back to the beginning/end of buffer. default true
|
|
cyclic = true,
|
|
-- whether the shada file is updated after modifying uppercase marks. default false
|
|
force_write_shada = false,
|
|
-- how often (in ms) to redraw signs/recompute mark positions.
|
|
-- higher values will have better performance but may cause visual lag,
|
|
-- while lower values may cause performance penalties. default 150.
|
|
refresh_interval = 250,
|
|
-- sign priorities for each type of mark - builtin marks, uppercase marks, lowercase
|
|
-- marks, and bookmarks.
|
|
-- can be either a table with all/none of the keys, or a single number, in which case
|
|
-- the priority applies to all marks.
|
|
-- default 10.
|
|
sign_priority = { lower = 10, upper = 15, builtin = 8, bookmark = 20 },
|
|
-- disables mark tracking for specific filetypes. default {}
|
|
excluded_filetypes = {},
|
|
-- disables mark tracking for specific buftypes. default {}
|
|
excluded_buftypes = {},
|
|
-- marks.nvim allows you to configure up to 10 bookmark groups, each with its own
|
|
-- sign/virttext. Bookmarks can be used to group together positions and quickly move
|
|
-- across multiple buffers. default sign is '!@#$%^&*()' (from 0 to 9), and
|
|
-- default virt_text is "".
|
|
bookmark_0 = {
|
|
sign = "⚑",
|
|
virt_text = "hello world",
|
|
-- explicitly prompt for a virtual line annotation when setting a bookmark from this group.
|
|
-- defaults to false.
|
|
annotate = false,
|
|
},
|
|
mappings = {}
|
|
}
|
|
end
|
|
},
|
|
{
|
|
"willothy/flatten.nvim",
|
|
config = function()
|
|
require("flatten").setup({})
|
|
end,
|
|
lazy = false,
|
|
priority = 1001,
|
|
},
|
|
{
|
|
"chrisgrieser/nvim-recorder",
|
|
dependencies = "rcarriga/nvim-notify", -- optional
|
|
opts = {},
|
|
config = function()
|
|
require("recorder").setup({
|
|
slots = { "a", "b", "c", "d" }
|
|
})
|
|
end,
|
|
},
|
|
}
|