mirror of
https://github.com/DefectingCat/nvim
synced 2025-07-15 16:51:33 +00:00
refactor(plugins): remove useless
This commit is contained in:
@ -27,7 +27,7 @@
|
||||
"multicursors.nvim": { "branch": "main", "commit": "8b3e14682eed06a532b155c7eae33e174846b3fd" },
|
||||
"noice.nvim": { "branch": "main", "commit": "bf67d70bd7265d075191e7812d8eb42b9791f737" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "ff3819c52ca04232fb70fbd6c1639de9abcbe122" },
|
||||
"nui.nvim": { "branch": "main", "commit": "756c59f46057cd2d43619cd3a6d4e01b2aa60295" },
|
||||
"nui.nvim": { "branch": "main", "commit": "fc59553b5a8a1c13b8aa25ae62b6a47ec2b1882c" },
|
||||
"nvcommunity": { "branch": "main", "commit": "1d96504675c7514a9e89c6bdb14921cc8f7d10ca" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "c6139ca0d5ad7af129ea6c89cb4c56093f2c034a" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" },
|
||||
|
@ -29,8 +29,8 @@ map("n", "<leader>gsy", "<cmd> GoTagAdd yaml <CR>", { desc = "Add yaml struct ta
|
||||
|
||||
-- lsp
|
||||
map("n", "gh", function()
|
||||
--[[ vim.lsp.buf.hover() ]]
|
||||
require("pretty_hover").hover()
|
||||
vim.lsp.buf.hover()
|
||||
--[[ require("pretty_hover").hover() ]]
|
||||
end, { desc = " Hover lsp" })
|
||||
map("n", "gr", "<CMD>Telescope lsp_references<CR>", { desc = " Lsp references" })
|
||||
map("n", "gr", "<CMD>Telescope lsp_definitions <CR>", { desc = " Lsp definitions" })
|
||||
|
@ -1,15 +1,460 @@
|
||||
return {
|
||||
--[[ {
|
||||
"stevearc/conform.nvim",
|
||||
config = function()
|
||||
require("configs.conform")
|
||||
end,
|
||||
}, ]]
|
||||
local cmp = require("cmp")
|
||||
|
||||
local overrides = require("configs.overrides")
|
||||
|
||||
local plugins = {
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
"NvChad/nvcommunity",
|
||||
{ import = "nvcommunity.git.diffview" },
|
||||
{ import = "nvcommunity.git.lazygit" },
|
||||
--[[ { import = "nvcommunity.lsp.prettyhover" }, ]]
|
||||
},
|
||||
|
||||
-- LSP, formatter, linter
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require("configs.lspconfig")
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
require("mason-nvim-dap").setup({
|
||||
ensure_installed = {
|
||||
"codelldb",
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
require("mason-null-ls").setup({
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"prettierd",
|
||||
"ymlfmt",
|
||||
"shellharden",
|
||||
"shfmt",
|
||||
"goimports",
|
||||
"goimports-reviser",
|
||||
"golines",
|
||||
"gopls",
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
opts = {
|
||||
git = { enable = true },
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"rust_analyzer",
|
||||
"html",
|
||||
"volar",
|
||||
"tsserver",
|
||||
"tailwindcss",
|
||||
"eslint",
|
||||
"cssls",
|
||||
"cssmodules_ls",
|
||||
"jsonls",
|
||||
"yamlls",
|
||||
"docker_compose_language_service",
|
||||
"dockerls",
|
||||
"bashls",
|
||||
"clangd",
|
||||
"lemminx",
|
||||
},
|
||||
automatic_installation = true,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("mason-lspconfig").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
-- defaults
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"lua",
|
||||
-- web dev
|
||||
"html",
|
||||
"css",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"json",
|
||||
"vue",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"jsdoc",
|
||||
"scss",
|
||||
-- low level
|
||||
"rust",
|
||||
"toml",
|
||||
"go",
|
||||
"gomod",
|
||||
},
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
highlight = {
|
||||
disable = function(_, buf)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return require("configs.null-ls")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
{ "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
|
||||
},
|
||||
opts = function()
|
||||
---@diagnostic disable-next-line: different-requires
|
||||
local M = require("nvchad.configs.cmp")
|
||||
M.completion.completeopt = "menu,menuone,noselect"
|
||||
M.mapping["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
})
|
||||
table.insert(M.sources, { name = "crates" })
|
||||
-- original LazyVim kind icon formatter
|
||||
local format_kinds = M.formatting.format
|
||||
M.formatting.format = function(entry, item)
|
||||
format_kinds(entry, item) -- add icons
|
||||
return require("tailwindcss-colorizer-cmp").formatter(entry, item)
|
||||
end
|
||||
return M
|
||||
end,
|
||||
},
|
||||
-- rust
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^4", -- Recommended
|
||||
ft = "rust",
|
||||
config = function()
|
||||
require("configs.rust")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"saecki/crates.nvim",
|
||||
ft = { "toml" },
|
||||
config = function(_, opts)
|
||||
local crates = require("crates")
|
||||
crates.setup(opts)
|
||||
require("cmp").setup.buffer({
|
||||
sources = { { name = "crates" } },
|
||||
})
|
||||
crates.show()
|
||||
--[[ require("core.utils").load_mappings("crates") ]]
|
||||
end,
|
||||
},
|
||||
{
|
||||
"rust-lang/rust.vim",
|
||||
ft = "rust",
|
||||
init = function()
|
||||
vim.g.rustfmt_autosave = 1
|
||||
end,
|
||||
},
|
||||
-- golang
|
||||
{
|
||||
"olexsmir/gopher.nvim",
|
||||
ft = "go",
|
||||
config = function(_, opts)
|
||||
require("gopher").setup(opts)
|
||||
end,
|
||||
build = function()
|
||||
vim.cmd([[silent! GoInstallDeps]])
|
||||
end,
|
||||
},
|
||||
{
|
||||
"dreamsofcode-io/nvim-dap-go",
|
||||
ft = "go",
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = function(_, opts)
|
||||
require("dap-go").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"b0o/schemastore.nvim",
|
||||
},
|
||||
|
||||
-- debug
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
event = "VeryLazy",
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
require("dapui").setup()
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
config = function()
|
||||
require("configs.dap")
|
||||
--[[ require("nvchad.utils").load_mappings("dap") ]]
|
||||
end,
|
||||
},
|
||||
{
|
||||
"theHamsta/nvim-dap-virtual-text",
|
||||
lazy = false,
|
||||
config = function(_, opts)
|
||||
require("nvim-dap-virtual-text").setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
-- telescope, code action ui
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
opts = function()
|
||||
require("configs.telescope")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build =
|
||||
"cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build",
|
||||
},
|
||||
{
|
||||
"nvim-pack/nvim-spectre",
|
||||
event = "BufRead",
|
||||
},
|
||||
-- motion, UI and others
|
||||
{
|
||||
"phaazon/hop.nvim",
|
||||
branch = "v2", -- optional but strongly recommended
|
||||
config = function()
|
||||
-- you can configure Hop the way you like here; see :h hop-config
|
||||
local hop = require("hop")
|
||||
hop.setup({ keys = "etovxqpdygfblzhckisuran" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"smoka7/multicursors.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"smoka7/hydra.nvim",
|
||||
},
|
||||
opts = {
|
||||
hint_config = false,
|
||||
},
|
||||
cmd = { "MCstart", "MCvisual", "MCclear", "MCpattern", "MCvisualPattern", "MCunderCursor" },
|
||||
keys = {
|
||||
{
|
||||
mode = { "v", "n" },
|
||||
"<Leader>m",
|
||||
--[[ "<C-n>", ]]
|
||||
"<cmd>MCstart<cr>",
|
||||
desc = "Create a selection for selected text or word under the cursor",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"jxnblk/vim-mdx-js",
|
||||
},
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require("nvim-ts-autotag").setup({})
|
||||
end,
|
||||
lazy = true,
|
||||
event = "VeryLazy",
|
||||
},
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-surround").setup({})
|
||||
end,
|
||||
},
|
||||
-- comment string
|
||||
{
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
opts = {
|
||||
pre_hook = function(ctx)
|
||||
local U = require("Comment.utils")
|
||||
|
||||
local location = nil
|
||||
if ctx.ctype == U.ctype.block then
|
||||
location = require("ts_context_commentstring.utils").get_cursor_location()
|
||||
elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
|
||||
location = require("ts_context_commentstring.utils").get_visual_start_location()
|
||||
end
|
||||
|
||||
return require("ts_context_commentstring.internal").calculate_commentstring({
|
||||
key = ctx.ctype == U.ctype.line and "__default" or "__multiline",
|
||||
location = location,
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
-- ui
|
||||
{
|
||||
"rcarriga/nvim-notify",
|
||||
opts = {
|
||||
fps = 120,
|
||||
render = "wrapped-compact",
|
||||
stages = "slide",
|
||||
top_down = false,
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"rcarriga/nvim-notify",
|
||||
},
|
||||
opts = {
|
||||
lsp = {
|
||||
message = {
|
||||
enabled = true,
|
||||
},
|
||||
progress = {
|
||||
enabled = false,
|
||||
},
|
||||
-- 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,
|
||||
},
|
||||
hover = {
|
||||
enabled = false,
|
||||
},
|
||||
signature = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
-- 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 = true, -- add a border to hover docs and signature help
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
cmd = { "TroubleToggle", "Trouble", "TroubleRefresh" },
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
opts = {
|
||||
user_default_options = {
|
||||
tailwind = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "BufReadPost",
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"chikko80/error-lens.nvim",
|
||||
event = "BufRead",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"RRethy/vim-illuminate",
|
||||
event = "BufRead",
|
||||
},
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
ft = { "markdown" },
|
||||
build = function()
|
||||
vim.fn["mkdp#util#install"]()
|
||||
end,
|
||||
},
|
||||
-- git
|
||||
{
|
||||
"sindrets/diffview.nvim",
|
||||
opts = {
|
||||
enhanced_diff_hl = true,
|
||||
view = {
|
||||
merge_tool = {
|
||||
layout = "diff3_mixed",
|
||||
disable_diagnostics = true,
|
||||
},
|
||||
},
|
||||
keymaps = {
|
||||
view = {
|
||||
["<tab>"] = false,
|
||||
},
|
||||
file_panel = {
|
||||
["<tab>"] = false,
|
||||
},
|
||||
file_history_panel = {
|
||||
["<tab>"] = false,
|
||||
},
|
||||
option_panel = {
|
||||
["<tab>"] = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
--[[ overrides ]]
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
opts = overrides.nvimtree,
|
||||
},
|
||||
}
|
||||
|
||||
return plugins
|
||||
|
@ -1,460 +0,0 @@
|
||||
local cmp = require("cmp")
|
||||
|
||||
local overrides = require("configs.overrides")
|
||||
|
||||
local plugins = {
|
||||
{
|
||||
"NvChad/nvcommunity",
|
||||
{ import = "nvcommunity.git.diffview" },
|
||||
{ import = "nvcommunity.git.lazygit" },
|
||||
{ import = "nvcommunity.lsp.prettyhover" },
|
||||
},
|
||||
|
||||
-- LSP, formatter, linter
|
||||
{
|
||||
"neovim/nvim-lspconfig",
|
||||
config = function()
|
||||
require("configs.lspconfig")
|
||||
require("nvchad.configs.lspconfig").defaults()
|
||||
end,
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-nvim-dap.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
require("mason-nvim-dap").setup({
|
||||
ensure_installed = {
|
||||
"codelldb",
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"jay-babu/mason-null-ls.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
config = function()
|
||||
require("mason-null-ls").setup({
|
||||
ensure_installed = {
|
||||
"stylua",
|
||||
"prettierd",
|
||||
"ymlfmt",
|
||||
"shellharden",
|
||||
"shfmt",
|
||||
"goimports",
|
||||
"goimports-reviser",
|
||||
"golines",
|
||||
"gopls",
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"rust_analyzer",
|
||||
"html",
|
||||
"volar",
|
||||
"tsserver",
|
||||
"tailwindcss",
|
||||
"eslint",
|
||||
"cssls",
|
||||
"cssmodules_ls",
|
||||
"jsonls",
|
||||
"yamlls",
|
||||
"docker_compose_language_service",
|
||||
"dockerls",
|
||||
"bashls",
|
||||
"clangd",
|
||||
"lemminx",
|
||||
},
|
||||
automatic_installation = true,
|
||||
},
|
||||
config = function(_, opts)
|
||||
require("mason-lspconfig").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"williamboman/mason.nvim",
|
||||
},
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
opts = {
|
||||
ensure_installed = {
|
||||
-- defaults
|
||||
"vim",
|
||||
"vimdoc",
|
||||
"lua",
|
||||
-- web dev
|
||||
"html",
|
||||
"css",
|
||||
"javascript",
|
||||
"typescript",
|
||||
"tsx",
|
||||
"json",
|
||||
"vue",
|
||||
"markdown",
|
||||
"markdown_inline",
|
||||
"jsdoc",
|
||||
"scss",
|
||||
-- low level
|
||||
"rust",
|
||||
"toml",
|
||||
"go",
|
||||
"gomod",
|
||||
},
|
||||
autotag = {
|
||||
enable = true,
|
||||
},
|
||||
highlight = {
|
||||
disable = function(_, buf)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"nvimtools/none-ls.nvim",
|
||||
event = "VeryLazy",
|
||||
opts = function()
|
||||
return require("configs.null-ls")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"hrsh7th/nvim-cmp",
|
||||
dependencies = {
|
||||
{ "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
|
||||
},
|
||||
opts = function()
|
||||
---@diagnostic disable-next-line: different-requires
|
||||
local M = require("nvchad.configs.cmp")
|
||||
M.completion.completeopt = "menu,menuone,noselect"
|
||||
M.mapping["<CR>"] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
})
|
||||
table.insert(M.sources, { name = "crates" })
|
||||
-- original LazyVim kind icon formatter
|
||||
local format_kinds = M.formatting.format
|
||||
M.formatting.format = function(entry, item)
|
||||
format_kinds(entry, item) -- add icons
|
||||
return require("tailwindcss-colorizer-cmp").formatter(entry, item)
|
||||
end
|
||||
return M
|
||||
end,
|
||||
},
|
||||
-- rust
|
||||
{
|
||||
"mrcjkb/rustaceanvim",
|
||||
version = "^4", -- Recommended
|
||||
ft = "rust",
|
||||
config = function()
|
||||
require("configs.rust")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"saecki/crates.nvim",
|
||||
ft = { "toml" },
|
||||
config = function(_, opts)
|
||||
local crates = require("crates")
|
||||
crates.setup(opts)
|
||||
require("cmp").setup.buffer({
|
||||
sources = { { name = "crates" } },
|
||||
})
|
||||
crates.show()
|
||||
--[[ require("core.utils").load_mappings("crates") ]]
|
||||
end,
|
||||
},
|
||||
{
|
||||
"rust-lang/rust.vim",
|
||||
ft = "rust",
|
||||
init = function()
|
||||
vim.g.rustfmt_autosave = 1
|
||||
end,
|
||||
},
|
||||
-- golang
|
||||
{
|
||||
"olexsmir/gopher.nvim",
|
||||
ft = "go",
|
||||
config = function(_, opts)
|
||||
require("gopher").setup(opts)
|
||||
end,
|
||||
build = function()
|
||||
vim.cmd([[silent! GoInstallDeps]])
|
||||
end,
|
||||
},
|
||||
{
|
||||
"dreamsofcode-io/nvim-dap-go",
|
||||
ft = "go",
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = function(_, opts)
|
||||
require("dap-go").setup(opts)
|
||||
end,
|
||||
},
|
||||
{
|
||||
"b0o/schemastore.nvim",
|
||||
},
|
||||
|
||||
-- debug
|
||||
{
|
||||
"rcarriga/nvim-dap-ui",
|
||||
event = "VeryLazy",
|
||||
dependencies = "mfussenegger/nvim-dap",
|
||||
config = function()
|
||||
local dap = require("dap")
|
||||
local dapui = require("dapui")
|
||||
require("dapui").setup()
|
||||
dap.listeners.after.event_initialized["dapui_config"] = function()
|
||||
dapui.open()
|
||||
end
|
||||
dap.listeners.before.event_terminated["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
dap.listeners.before.event_exited["dapui_config"] = function()
|
||||
dapui.close()
|
||||
end
|
||||
end,
|
||||
},
|
||||
{
|
||||
"mfussenegger/nvim-dap",
|
||||
config = function()
|
||||
require("configs.dap")
|
||||
--[[ require("nvchad.utils").load_mappings("dap") ]]
|
||||
end,
|
||||
},
|
||||
{
|
||||
"theHamsta/nvim-dap-virtual-text",
|
||||
lazy = false,
|
||||
config = function(_, opts)
|
||||
require("nvim-dap-virtual-text").setup(opts)
|
||||
end,
|
||||
},
|
||||
|
||||
-- telescope, code action ui
|
||||
{
|
||||
"nvim-telescope/telescope.nvim",
|
||||
opts = function()
|
||||
require("configs.telescope")
|
||||
end,
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-ui-select.nvim",
|
||||
},
|
||||
{
|
||||
"nvim-telescope/telescope-fzf-native.nvim",
|
||||
build =
|
||||
"cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build",
|
||||
},
|
||||
{
|
||||
"nvim-pack/nvim-spectre",
|
||||
event = "BufRead",
|
||||
},
|
||||
-- motion, UI and others
|
||||
{
|
||||
"phaazon/hop.nvim",
|
||||
branch = "v2", -- optional but strongly recommended
|
||||
config = function()
|
||||
-- you can configure Hop the way you like here; see :h hop-config
|
||||
local hop = require("hop")
|
||||
hop.setup({ keys = "etovxqpdygfblzhckisuran" })
|
||||
end,
|
||||
},
|
||||
{
|
||||
"smoka7/multicursors.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"smoka7/hydra.nvim",
|
||||
},
|
||||
opts = {
|
||||
hint_config = false,
|
||||
},
|
||||
cmd = { "MCstart", "MCvisual", "MCclear", "MCpattern", "MCvisualPattern", "MCunderCursor" },
|
||||
keys = {
|
||||
{
|
||||
mode = { "v", "n" },
|
||||
"<Leader>m",
|
||||
--[[ "<C-n>", ]]
|
||||
"<cmd>MCstart<cr>",
|
||||
desc = "Create a selection for selected text or word under the cursor",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"jxnblk/vim-mdx-js",
|
||||
},
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "InsertEnter",
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"windwp/nvim-ts-autotag",
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require("nvim-ts-autotag").setup({})
|
||||
end,
|
||||
lazy = true,
|
||||
event = "VeryLazy",
|
||||
},
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
version = "*", -- Use for stability; omit to use `main` branch for the latest features
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-surround").setup({})
|
||||
end,
|
||||
},
|
||||
-- comment string
|
||||
{
|
||||
"JoosepAlviste/nvim-ts-context-commentstring",
|
||||
},
|
||||
{
|
||||
"numToStr/Comment.nvim",
|
||||
opts = {
|
||||
pre_hook = function(ctx)
|
||||
local U = require("Comment.utils")
|
||||
|
||||
local location = nil
|
||||
if ctx.ctype == U.ctype.block then
|
||||
location = require("ts_context_commentstring.utils").get_cursor_location()
|
||||
elseif ctx.cmotion == U.cmotion.v or ctx.cmotion == U.cmotion.V then
|
||||
location = require("ts_context_commentstring.utils").get_visual_start_location()
|
||||
end
|
||||
|
||||
return require("ts_context_commentstring.internal").calculate_commentstring({
|
||||
key = ctx.ctype == U.ctype.line and "__default" or "__multiline",
|
||||
location = location,
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
-- ui
|
||||
{
|
||||
"rcarriga/nvim-notify",
|
||||
opts = {
|
||||
fps = 120,
|
||||
render = "wrapped-compact",
|
||||
stages = "slide",
|
||||
top_down = false,
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/noice.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"rcarriga/nvim-notify",
|
||||
},
|
||||
opts = {
|
||||
lsp = {
|
||||
message = {
|
||||
enabled = true,
|
||||
},
|
||||
progress = {
|
||||
enabled = false,
|
||||
},
|
||||
-- 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,
|
||||
},
|
||||
hover = {
|
||||
enabled = false,
|
||||
},
|
||||
signature = {
|
||||
enabled = false,
|
||||
},
|
||||
},
|
||||
-- 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 = true, -- add a border to hover docs and signature help
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/trouble.nvim",
|
||||
cmd = { "TroubleToggle", "Trouble", "TroubleRefresh" },
|
||||
dependencies = { "nvim-tree/nvim-web-devicons" },
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
opts = {
|
||||
user_default_options = {
|
||||
tailwind = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "BufReadPost",
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"chikko80/error-lens.nvim",
|
||||
event = "BufRead",
|
||||
dependencies = {
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
{
|
||||
"RRethy/vim-illuminate",
|
||||
event = "BufRead",
|
||||
},
|
||||
{
|
||||
"iamcco/markdown-preview.nvim",
|
||||
cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" },
|
||||
ft = { "markdown" },
|
||||
build = function()
|
||||
vim.fn["mkdp#util#install"]()
|
||||
end,
|
||||
},
|
||||
-- git
|
||||
{
|
||||
"sindrets/diffview.nvim",
|
||||
opts = {
|
||||
enhanced_diff_hl = true,
|
||||
view = {
|
||||
merge_tool = {
|
||||
layout = "diff3_mixed",
|
||||
disable_diagnostics = true,
|
||||
},
|
||||
},
|
||||
keymaps = {
|
||||
view = {
|
||||
["<tab>"] = false,
|
||||
},
|
||||
file_panel = {
|
||||
["<tab>"] = false,
|
||||
},
|
||||
file_history_panel = {
|
||||
["<tab>"] = false,
|
||||
},
|
||||
option_panel = {
|
||||
["<tab>"] = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
--[[ overrides ]]
|
||||
{
|
||||
"nvim-tree/nvim-tree.lua",
|
||||
opts = overrides.nvimtree,
|
||||
},
|
||||
}
|
||||
|
||||
return plugins
|
Reference in New Issue
Block a user