Make plugin specs more uniform

This commit is contained in:
Marko Korhonen 2023-11-18 02:54:35 +02:00
parent 0ced314c90
commit 4004dc5df6
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890
13 changed files with 55 additions and 40 deletions

View file

@ -1,2 +1,5 @@
-- Automatic brackets -- Automatic brackets
return { "windwp/nvim-autopairs" } return {
"windwp/nvim-autopairs",
config = true
}

View file

@ -2,6 +2,4 @@ return {
"akinsho/bufferline.nvim", "akinsho/bufferline.nvim",
version = "*", version = "*",
dependencies = { "kyazdani42/nvim-web-devicons" }, dependencies = { "kyazdani42/nvim-web-devicons" },
config = true,
--opts = { options = { themeable = true } },
} }

View file

@ -1,2 +1,5 @@
-- Caddyfile syntax support -- Caddyfile syntax support
return { "isobit/vim-caddyfile", ft = "caddyfile" } return {
"isobit/vim-caddyfile",
ft = "caddyfile",
}

View file

@ -3,14 +3,23 @@ return {
"hrsh7th/nvim-cmp", "hrsh7th/nvim-cmp",
dependencies = { dependencies = {
"hrsh7th/cmp-buffer", -- Buffer source "hrsh7th/cmp-buffer", -- Buffer source
{ "petertriho/cmp-git", dependencies = { "nvim-lua/plenary.nvim" } }, -- Git source -- Git source
{
"petertriho/cmp-git",
dependencies = { "nvim-lua/plenary.nvim" },
config = true,
},
"hrsh7th/cmp-nvim-lsp", -- LSP source "hrsh7th/cmp-nvim-lsp", -- LSP source
"hrsh7th/cmp-nvim-lua", -- Neovim Lua API documentation source "hrsh7th/cmp-nvim-lua", -- Neovim Lua API documentation source
"hrsh7th/cmp-path", -- Path source "hrsh7th/cmp-path", -- Path source
"hrsh7th/cmp-cmdline", -- cmdline source "hrsh7th/cmp-cmdline", -- cmdline source
"saadparwaiz1/cmp_luasnip", -- Snippets source "saadparwaiz1/cmp_luasnip", -- Snippets source
"f3fora/cmp-spell", -- Spell check source "f3fora/cmp-spell", -- Spell check source
"zbirenbaum/copilot-cmp", -- Copilot source -- Copilot source
{
"zbirenbaum/copilot-cmp",
opts = { fix_pairs = true },
},
}, },
config = function() config = function()
local cmp = require("cmp") local cmp = require("cmp")
@ -20,12 +29,6 @@ return {
return return
end end
-- Setup git completion source
require("cmp_git").setup()
--
-- Setup copilot source
require("copilot_cmp").setup({ fix_pairs = true })
-- Set completeopt to have a better completion experience -- Set completeopt to have a better completion experience
vim.o.completeopt = "menuone,noselect" vim.o.completeopt = "menuone,noselect"

View file

@ -1,7 +1,6 @@
-- GitHub Copilot -- GitHub Copilot
return { return {
"zbirenbaum/copilot.lua", "zbirenbaum/copilot.lua",
config = true,
opts = { opts = {
suggestion = { enabled = false }, suggestion = { enabled = false },
panel = { enabled = false }, panel = { enabled = false },

View file

@ -1,2 +1,5 @@
-- vim api documentation for lua lsp -- vim api documentation for lua lsp
return { "ii14/emmylua-nvim", ft = { "lua" } } return {
"ii14/emmylua-nvim",
ft = { "lua" },
}

View file

@ -1,2 +1,5 @@
-- Edit GPG encrypted files transparently -- Edit GPG encrypted files transparently
return { "jamessan/vim-gnupg", ft = { "gpg" } } return {
"jamessan/vim-gnupg",
ft = { "gpg" },
}

View file

@ -1,23 +1,22 @@
-- Indent characters -- Indent characters
return { return {
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",
config = function() opts = {
require("ibl").setup({ exclude = {
exclude = { filetypes = {
filetypes = { "",
"", "checkhealth",
"checkhealth", "dashboard",
"dashboard", "git",
"git", "gitcommit",
"gitcommit", "TelescopePrompt",
"TelescopePrompt", "TelescopeResults",
"TelescopeResults", "help",
"help", "lazy",
"lazy", "lspinfo",
"lspinfo", "man",
"man",
},
}, },
}) },
end, },
main = "ibl",
} }

View file

@ -45,7 +45,8 @@ return {
} }
end, end,
}, },
config = function() config = function(spec)
require("kanagawa").setup(spec.opts)
vim.cmd("colorscheme kanagawa") vim.cmd("colorscheme kanagawa")
end, end,
} }

View file

@ -1,4 +1,7 @@
-- High performance color highlighter -- High performance color highlighter
return { return {
"norcalli/nvim-colorizer.lua", "norcalli/nvim-colorizer.lua",
config = function()
require("colorizer").setup()
end,
} }

View file

@ -11,8 +11,8 @@ return {
highlight_git = true, highlight_git = true,
}, },
}, },
config = function(spec) config = function(_, opts)
require("nvim-tree").setup(spec.opts) require("nvim-tree").setup(opts)
-- Open/close with alt-o -- Open/close with alt-o
vim.keymap.set("n", "<M-o>", vim.cmd.NvimTreeToggle) vim.keymap.set("n", "<M-o>", vim.cmd.NvimTreeToggle)

View file

@ -45,11 +45,11 @@ return {
}, },
}, },
}, },
config = function(spec) config = function(_, opts)
local telescope = require("telescope") local telescope = require("telescope")
local builtin = require("telescope.builtin") local builtin = require("telescope.builtin")
telescope.setup(spec.opts) telescope.setup(opts)
telescope.load_extension("fzf") telescope.load_extension("fzf")
telescope.load_extension("ui-select") telescope.load_extension("ui-select")

View file

@ -9,9 +9,9 @@ return {
"imports", "imports",
}, },
}, },
config = function(spec) config = function(_, opts)
local ufo = require("ufo") local ufo = require("ufo")
ufo.setup(spec.opts) ufo.setup(opts)
-- Using ufo, need to remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself -- Using ufo, need to remap `zR` and `zM`. If Neovim is 0.6.1, remap yourself
local keymap = vim.keymap local keymap = vim.keymap