vim: use correct signatures for lazy config() and init()

This commit is contained in:
Fernando Schauenburg 2024-02-18 00:42:44 +01:00
parent 3011a077d3
commit a054a3a894
23 changed files with 23 additions and 23 deletions

View file

@ -7,7 +7,7 @@ M.event = {
'BufNewFile'
}
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
require('colorizer').setup(--[[ filetypes ]] nil, {
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
mode = 'foreground',

View file

@ -59,7 +59,7 @@ local make_keymap = function(cmp)
return cmp.mapping.preset.insert(keymap)
end
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
local cmp = require 'cmp'
local keymap = make_keymap(cmp)

View file

@ -4,7 +4,7 @@ M.branch = 'legacy'
M.event = 'LspAttach'
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
require('fidget').setup {
text = {
done = require('fschauen.icons').ui.Checkmark,

View file

@ -6,7 +6,7 @@ M.keys = {
{ '<leader>gm', '<cmd>GitMessenger<cr>', desc = ' open [m]essenger' },
}
M.init = function()
M.init = function(--[[plugin]]_)
-- Disable default mappings, as I have my own for lazy-loading.
vim.g.git_messenger_no_default_mappings = true

View file

@ -26,7 +26,7 @@ M.keys = {
{ '<leader>gL', browser('v'), desc = ' open perma[L]ink in browser', mode = 'v' },
}
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
require('gitlinker').setup {
mappings = nil, -- I'm defining me own mappings above.

View file

@ -2,7 +2,7 @@ local M = { 'lukas-reineke/indent-blankline.nvim' }
local icons = require('fschauen.icons')
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
require('ibl').setup {
enabled = false,
indent = {

View file

@ -11,7 +11,7 @@ M.event = {
'BufNewFile',
}
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
local border = { border = 'rounded' }
local default_opts = {

View file

@ -8,7 +8,7 @@ M.dependencies = {
'nvim-tree/nvim-web-devicons',
}
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
local window = require 'fschauen.window'
local filename = (function()

View file

@ -14,7 +14,7 @@ M.ft = {
'markdown',
}
M.init = function(_)
M.init = function(--[[plugin]]__)
vim.g.mkdp_theme = 'dark'
end

View file

@ -8,7 +8,7 @@ M.keys = {
{ '<leader>gs', '<cmd>Neogit<cr>', desc = ' [s]tatus with neogit' },
}
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
local icons = require('fschauen.icons')
require('neogit').setup {

View file

@ -20,7 +20,7 @@ M.keys = {
M.lazy = false
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
local icons = require('fschauen.icons')
local notify = require('notify')

View file

@ -9,7 +9,7 @@ M.keys = {
{ '<leader>tf', '<cmd>NvimTreeFindFile<cr>', desc = '󰙅 Open [t]ree to current [f]ile ' },
}
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
local icons = require('fschauen.icons')
require('nvim-tree').setup {

View file

@ -8,7 +8,7 @@ M.keys = {
{ '<leader>o', '<cmd>Oil<cr>' },
}
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
require('oil').setup {
default_file_explorer = true,

View file

@ -6,7 +6,7 @@ M.cmd ={
'Tabularize',
}
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
if vim.fn.exists('g:tabular_loaded') == 1 then
vim.cmd [[ AddTabularPattern! first_comma /^[^,]*\zs,/ ]]
vim.cmd [[ AddTabularPattern! first_colon /^[^:]*\zs:/ ]]

View file

@ -8,7 +8,7 @@ M.keys = {
{ '<leader>fB', '<cmd>Telescope file_browser<cr>' , desc = ' Telescope file [B]rowser' },
}
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
require('telescope').load_extension('file_browser')
end

View file

@ -124,7 +124,7 @@ M.keys = {
local icons = require('fschauen.icons')
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
local actions = require('telescope.actions')
local layout = require('telescope.actions.layout')
local trouble = vim.F.npcall(require, 'trouble.providers.telescope') or {}

View file

@ -5,7 +5,7 @@ M.event = {
'BufNewFile',
}
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
require('textcase').setup {
prefix = '<leader>c',
}

View file

@ -16,7 +16,7 @@ M.keys = {
local icons = require('fschauen.icons')
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
require('todo-comments').setup {
keywords = {
TODO = { icon = icons.ui.Checkbox },

View file

@ -22,7 +22,7 @@ M.keys = {
{ '<leader>Tn', '<cmd>TSNodeUnderCursor<cr>', desc = ' [T]reesitter [n]ode under cursor' },
}
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
require('nvim-treesitter.configs').setup {
ensure_installed = {
'bash',

View file

@ -10,7 +10,7 @@ M.keys = {
{ '<leader>ld', '<cmd>TroubleToggle document_diagnostics<cr>', desc = '󱠪 trouble [d]ocument' },
}
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
require('trouble').setup {
padding = false, -- don't add an extra new line of top of the list
auto_preview = false, -- don't preview automatically

View file

@ -1,6 +1,6 @@
local M = { 'mbbill/undotree' }
M.init = function()
M.init = function(--[[plugin]]_)
vim.g.undotree_WindowLayout = 2 -- tree: left, diff: bottom
vim.g.undotree_DiffAutoOpen = 0 -- don't open diff by default
vim.g.undotree_SetFocusWhenToggle = 1

View file

@ -17,7 +17,7 @@ M.keys = {
{ '<leader>sc', toggle_colorcolumn, desc = 'Toggle virtual colunn' },
}
M.config = function()
M.config = function(--[[plugin]]_, --[[opts]]_)
require('virt-column').setup {
char = require('fschauen.icons').ui.LineMiddle,
}

View file

@ -1,6 +1,6 @@
local M = { 'ntpeters/vim-better-whitespace' }
M.init = function()
M.init = function(--[[plugin]]_)
vim.g.better_whitespace_filetypes_blacklist = {
'diff',
'fugitive',