refactor(nvim): update plugins to use lazy nvim spec's
This commit is contained in:
parent
ec657f89b2
commit
abbe1a03b0
@ -93,71 +93,13 @@ lazy.setup({
|
||||
{ url = "https://gitlab.com/HiPhish/nvim-ts-rainbow2.git" },
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
"windwp/nvim-ts-autotag",
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
config = function()
|
||||
require("plugins.configs.treesitter")
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
disable = function(lang, bufnr)
|
||||
local mode = vim.fn.mode()
|
||||
if mode == "c" then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
keymaps = {
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = "@class.inner",
|
||||
["ib"] = "@block.inner",
|
||||
["ab"] = "@block.outer",
|
||||
},
|
||||
},
|
||||
move = {
|
||||
enable = true,
|
||||
disable = function(lang, bufnr)
|
||||
local mode = vim.fn.mode()
|
||||
if mode == "c" then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
set_jumps = true,
|
||||
goto_next_start = {
|
||||
["]fs"] = "@function.outer",
|
||||
["]cs"] = "@class.outer",
|
||||
["]bs"] = "@block.outer",
|
||||
},
|
||||
goto_next_end = {
|
||||
["]fe"] = "@function.outer",
|
||||
["]ce"] = "@class.outer",
|
||||
["]be"] = "@block.outer",
|
||||
},
|
||||
goto_previous_start = {
|
||||
["[fs"] = "@function.outer",
|
||||
["[cs"] = "@class.outer",
|
||||
["[bs"] = "@block.outer",
|
||||
},
|
||||
goto_previous_end = {
|
||||
["[fe"] = "@function.outer",
|
||||
["[ce"] = "@class.outer",
|
||||
["[bs"] = "@block.outer",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
-- Dashboard when no file is given to nvim
|
||||
{
|
||||
"goolord/alpha-nvim",
|
||||
@ -212,7 +154,6 @@ lazy.setup({
|
||||
"neovim/nvim-lspconfig",
|
||||
event = "BufReadPre",
|
||||
dependencies = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"folke/neodev.nvim",
|
||||
"Decodetalkers/csharpls-extended-lsp.nvim",
|
||||
"williamboman/mason-lspconfig.nvim",
|
||||
@ -255,18 +196,14 @@ lazy.setup({
|
||||
{
|
||||
"smjonas/inc-rename.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("inc_rename").setup({})
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Better LSP Virtual Text Lines
|
||||
{
|
||||
url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("lsp_lines").setup()
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Lsp From Null LS
|
||||
@ -282,20 +219,7 @@ lazy.setup({
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-autopairs").setup()
|
||||
end,
|
||||
},
|
||||
|
||||
-- Snippets
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = "make install_jsregexp",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Code completion
|
||||
@ -315,7 +239,16 @@ lazy.setup({
|
||||
"lukas-reineke/cmp-rg",
|
||||
"onsails/lspkind.nvim",
|
||||
"f3fora/cmp-spell",
|
||||
-- Snippets
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
build = "make install_jsregexp",
|
||||
event = "VeryLazy",
|
||||
dependencies = {
|
||||
"rafamadriz/friendly-snippets",
|
||||
"saadparwaiz1/cmp_luasnip",
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require("plugins.configs._cmp")
|
||||
@ -331,9 +264,7 @@ lazy.setup({
|
||||
"saecki/crates.nvim",
|
||||
dependencies = { { "nvim-lua/plenary.nvim" } },
|
||||
ft = "toml",
|
||||
config = function()
|
||||
require("crates").setup()
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- DAP, debugger
|
||||
@ -359,9 +290,7 @@ lazy.setup({
|
||||
{
|
||||
"theHamsta/nvim-dap-virtual-text",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-dap-virtual-text").setup({})
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Fancy ui for dap
|
||||
@ -415,41 +344,33 @@ lazy.setup({
|
||||
{
|
||||
"lewis6991/gitsigns.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("gitsigns").setup({
|
||||
opts = {
|
||||
current_line_blame = true,
|
||||
current_line_blame_opts = {
|
||||
delay = 0,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- Highlight certain comments, TODO, BUG, etc.
|
||||
{
|
||||
"folke/todo-comments.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("todo-comments").setup({})
|
||||
end,
|
||||
cmd = {
|
||||
"TodoTrouble",
|
||||
},
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Show possible key bindings during typing
|
||||
{
|
||||
"folke/which-key.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("which-key").setup({})
|
||||
end,
|
||||
lazy = true,
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Create full path if not existing on write
|
||||
{
|
||||
"jghauser/mkdir.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("mkdir")
|
||||
end,
|
||||
},
|
||||
|
||||
-- Text commenting
|
||||
@ -476,11 +397,9 @@ lazy.setup({
|
||||
{ "tami5/sqlite.lua" },
|
||||
{ "nvim-telescope/telescope.nvim" },
|
||||
},
|
||||
config = function()
|
||||
require("neoclip").setup({
|
||||
opts = {
|
||||
enable_persistent_history = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- Markdown Previewer
|
||||
@ -497,33 +416,23 @@ lazy.setup({
|
||||
-- Better Git integration
|
||||
{
|
||||
"TimUntersberger/neogit",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("neogit").setup({
|
||||
lazy = true,
|
||||
opts = {
|
||||
disable_commit_confirmation = true,
|
||||
integrations = {
|
||||
diffview = true,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
dependencies = {
|
||||
"sindrets/diffview.nvim",
|
||||
},
|
||||
},
|
||||
|
||||
-- Ansible Syntax Highlighting
|
||||
{
|
||||
"pearofducks/ansible-vim",
|
||||
event = "VeryLazy",
|
||||
},
|
||||
|
||||
-- Better search display
|
||||
{
|
||||
"kevinhwang91/nvim-hlslens",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("hlslens").setup()
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Note Taking
|
||||
@ -544,6 +453,7 @@ lazy.setup({
|
||||
{
|
||||
"MTDL9/vim-log-highlighting",
|
||||
event = "VeryLazy",
|
||||
ft = "log",
|
||||
},
|
||||
|
||||
-- Lots of small modules pulled into
|
||||
@ -560,11 +470,9 @@ lazy.setup({
|
||||
{
|
||||
"karb94/neoscroll.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("neoscroll").setup({
|
||||
opts = {
|
||||
easing_function = "circular",
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- Generate function/class/etc annotations
|
||||
@ -574,8 +482,7 @@ lazy.setup({
|
||||
"Neogen",
|
||||
},
|
||||
dependencies = "nvim-treesitter/nvim-treesitter",
|
||||
config = function()
|
||||
require("neogen").setup({
|
||||
opts = {
|
||||
snippet_engine = "luasnip",
|
||||
languages = {
|
||||
cs = {
|
||||
@ -584,8 +491,7 @@ lazy.setup({
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- Multiple cursor/multiple visual selection support
|
||||
@ -600,13 +506,11 @@ lazy.setup({
|
||||
-- Maintain last cursor position in files
|
||||
{
|
||||
"ethanholz/nvim-lastplace",
|
||||
config = function()
|
||||
require("nvim-lastplace").setup({
|
||||
opts = {
|
||||
lastplace_ignore_buftype = { "quickfix", "nofile", "help" },
|
||||
lastplace_ignore_filetype = { "gitcommit", "gitrebase", "svn", "hgcommit", "fugitive" },
|
||||
lastplace_open_folds = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- More codeactions
|
||||
@ -626,13 +530,9 @@ lazy.setup({
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
ft = "http",
|
||||
config = function()
|
||||
local rest_nvim = require("rest-nvim")
|
||||
rest_nvim.setup({
|
||||
-- This is a dev plugin, makes life easier
|
||||
opts = {
|
||||
skip_ssl_verification = true,
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- Allows repeating actions and more
|
||||
@ -653,20 +553,23 @@ lazy.setup({
|
||||
-- Faster motions
|
||||
{
|
||||
"phaazon/hop.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
-- you can configure Hop the way you like here; see :h hop-config
|
||||
require("hop").setup({ keys = "etovxqpdygfblzhckisuran" })
|
||||
end,
|
||||
cmd = {
|
||||
"HopLineStart",
|
||||
"HopPattern",
|
||||
"HopWord",
|
||||
"HopAnywhere",
|
||||
"HopVertical",
|
||||
},
|
||||
opts = {
|
||||
keys = "etovxqpdygfblzhckisuran",
|
||||
},
|
||||
},
|
||||
|
||||
-- Surround actions
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("nvim-surround").setup({})
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Better list continuation
|
||||
@ -679,17 +582,14 @@ lazy.setup({
|
||||
"plaintex",
|
||||
"norg",
|
||||
},
|
||||
config = function()
|
||||
require("autolist").setup({})
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Tint inactive windows
|
||||
{
|
||||
"levouh/tint.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("tint").setup({
|
||||
opts = {
|
||||
highlight_ignore_patterns = {
|
||||
"WinSeparator",
|
||||
},
|
||||
@ -710,8 +610,7 @@ lazy.setup({
|
||||
end,
|
||||
tint = -30,
|
||||
saturation = 0.8,
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- Highlight argument definitions and usages
|
||||
@ -719,9 +618,7 @@ lazy.setup({
|
||||
"m-demare/hlargs.nvim",
|
||||
event = "VeryLazy",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
||||
config = function()
|
||||
require("hlargs").setup({})
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Vim Latex Support
|
||||
@ -736,8 +633,7 @@ lazy.setup({
|
||||
|
||||
{
|
||||
"akinsho/toggleterm.nvim",
|
||||
config = function()
|
||||
require("toggleterm").setup({
|
||||
opts = {
|
||||
start_in_insert = false,
|
||||
direction = "float",
|
||||
autochdir = true,
|
||||
@ -747,8 +643,7 @@ lazy.setup({
|
||||
return term.name
|
||||
end,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
cmd = {
|
||||
"ToggleTerm",
|
||||
"ToggleTermSetName",
|
||||
@ -769,8 +664,7 @@ lazy.setup({
|
||||
cmd = {
|
||||
"Silicon",
|
||||
},
|
||||
config = function()
|
||||
require("silicon").setup({
|
||||
opts = {
|
||||
font = "FiraCode Nerd Font=20",
|
||||
theme = "Monokai Extended",
|
||||
background = "#87F",
|
||||
@ -783,16 +677,14 @@ lazy.setup({
|
||||
local icon = devicons.get_icon_by_filetype(vim.bo.filetype)
|
||||
return icon .. " " .. vim.fn.fnamemodify(vim.fn.bufname(vim.fn.bufnr()), ":~:.")
|
||||
end,
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- Nice sidebar cursor goodies
|
||||
{
|
||||
"gen740/SmoothCursor.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("smoothcursor").setup({
|
||||
opts = {
|
||||
priority = 8,
|
||||
fancy = {
|
||||
enable = true,
|
||||
@ -808,8 +700,7 @@ lazy.setup({
|
||||
},
|
||||
},
|
||||
disabled_filetypes = { "NeogitNotification" },
|
||||
})
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
-- Color Picker
|
||||
@ -831,21 +722,19 @@ lazy.setup({
|
||||
{
|
||||
"stevearc/overseer.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("overseer").setup()
|
||||
end,
|
||||
opts = {},
|
||||
},
|
||||
|
||||
-- Better buffer deletion
|
||||
{
|
||||
"famiu/bufdelete.nvim",
|
||||
event = "VeryLazy",
|
||||
lazy = true,
|
||||
},
|
||||
|
||||
-- Improved Visuals for Documentation
|
||||
{
|
||||
"lukas-reineke/headlines.nvim",
|
||||
config = true,
|
||||
opts = {},
|
||||
ft = {
|
||||
"markdown",
|
||||
"norg",
|
||||
@ -863,11 +752,9 @@ lazy.setup({
|
||||
"NibblerHexStringToCArray",
|
||||
"NibblerToggle",
|
||||
},
|
||||
config = function()
|
||||
require("nibbler").setup({
|
||||
display_enabled = true, -- Set to false to disable real-time display (default: true)
|
||||
})
|
||||
end,
|
||||
opts = {
|
||||
display_enabled = true,
|
||||
},
|
||||
},
|
||||
|
||||
-- Preview Norm commands, global, macros
|
||||
|
Loading…
x
Reference in New Issue
Block a user