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
return { "windwp/nvim-autopairs" }
return {
"windwp/nvim-autopairs",
config = true
}

View file

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

View file

@ -1,2 +1,5 @@
-- 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",
dependencies = {
"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-lua", -- Neovim Lua API documentation source
"hrsh7th/cmp-path", -- Path source
"hrsh7th/cmp-cmdline", -- cmdline source
"saadparwaiz1/cmp_luasnip", -- Snippets source
"f3fora/cmp-spell", -- Spell check source
"zbirenbaum/copilot-cmp", -- Copilot source
-- Copilot source
{
"zbirenbaum/copilot-cmp",
opts = { fix_pairs = true },
},
},
config = function()
local cmp = require("cmp")
@ -20,12 +29,6 @@ return {
return
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
vim.o.completeopt = "menuone,noselect"

View file

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

View file

@ -1,2 +1,5 @@
-- 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
return { "jamessan/vim-gnupg", ft = { "gpg" } }
return {
"jamessan/vim-gnupg",
ft = { "gpg" },
}

View file

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

View file

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

View file

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

View file

@ -11,8 +11,8 @@ return {
highlight_git = true,
},
},
config = function(spec)
require("nvim-tree").setup(spec.opts)
config = function(_, opts)
require("nvim-tree").setup(opts)
-- Open/close with alt-o
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 builtin = require("telescope.builtin")
telescope.setup(spec.opts)
telescope.setup(opts)
telescope.load_extension("fzf")
telescope.load_extension("ui-select")

View file

@ -9,9 +9,9 @@ return {
"imports",
},
},
config = function(spec)
config = function(_, opts)
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
local keymap = vim.keymap