diff --git a/config/nvim/lua/fschauen/plugins/dial.lua b/config/nvim/lua/fschauen/plugins/dial.lua index 6625be9..dee0f00 100644 --- a/config/nvim/lua/fschauen/plugins/dial.lua +++ b/config/nvim/lua/fschauen/plugins/dial.lua @@ -33,7 +33,7 @@ M.keys = { { 'g', dial_cmd('dec_gvisual', 'gv'), expr = true, desc = ' Decrement', mode = 'v' }, } -M.config = function() +M.config = function( --[[plugin]] _, --[[opts]] _) local augend = require('dial.augend') require('dial.config').augends:register_group { default = { diff --git a/config/nvim/lua/fschauen/plugins/gitlinker.lua b/config/nvim/lua/fschauen/plugins/gitlinker.lua index 46dc720..8f956e5 100644 --- a/config/nvim/lua/fschauen/plugins/gitlinker.lua +++ b/config/nvim/lua/fschauen/plugins/gitlinker.lua @@ -27,7 +27,7 @@ M.keys = { } M.opts = function(--[[plugin]]_, opts) - return vim.tbl_deep_extend('force', opts, { + return vim.tbl_deep_extend('force', opts or {}, { mappings = nil, -- I'm defining my own mappings above. callbacks = { ['git.schauenburg.me'] = require('gitlinker.hosts').get_gitea_type_url, diff --git a/config/nvim/lua/fschauen/plugins/indent-blankline.lua b/config/nvim/lua/fschauen/plugins/indent-blankline.lua index 209e755..2729c1a 100644 --- a/config/nvim/lua/fschauen/plugins/indent-blankline.lua +++ b/config/nvim/lua/fschauen/plugins/indent-blankline.lua @@ -20,7 +20,7 @@ M.main = 'ibl' M.opts = function(--[[plugin]]_, opts) local icons = require('fschauen.util.icons') - return vim.tbl_deep_extend('force', opts, { + return vim.tbl_deep_extend('force', opts or {}, { enabled = false, indent = { char = icons.ui.LineLeft, diff --git a/config/nvim/lua/fschauen/plugins/neogit.lua b/config/nvim/lua/fschauen/plugins/neogit.lua index 6343d5f..ede4adc 100644 --- a/config/nvim/lua/fschauen/plugins/neogit.lua +++ b/config/nvim/lua/fschauen/plugins/neogit.lua @@ -10,7 +10,7 @@ M.keys = { M.opts = function(--[[plugin]]_, opts) local icons = require('fschauen.util.icons') - return vim.tbl_deep_extend('force', opts, { + return vim.tbl_deep_extend('force', opts or {}, { disable_hint = true, signs = { section = { icons.ui.Folder, icons.ui.EmptyFolderOpen }, diff --git a/config/nvim/lua/fschauen/plugins/nvim-notify.lua b/config/nvim/lua/fschauen/plugins/nvim-notify.lua index a351e54..1933811 100644 --- a/config/nvim/lua/fschauen/plugins/nvim-notify.lua +++ b/config/nvim/lua/fschauen/plugins/nvim-notify.lua @@ -25,7 +25,7 @@ M.lazy = false M.opts = function(--[[plugin]]_, opts) local icons = require('fschauen.util.icons') - return vim.tbl_deep_extend('force', opts, { + return vim.tbl_deep_extend('force', opts or {}, { icons = { ERROR = icons.diagnostics_bold.Error, WARN = icons.diagnostics_bold.Warn, diff --git a/config/nvim/lua/fschauen/plugins/nvim-tree.lua b/config/nvim/lua/fschauen/plugins/nvim-tree.lua index 62c7d85..f9201b2 100644 --- a/config/nvim/lua/fschauen/plugins/nvim-tree.lua +++ b/config/nvim/lua/fschauen/plugins/nvim-tree.lua @@ -11,7 +11,7 @@ M.keys = { M.opts = function(--[[plugin]]_, opts) local icons = require('fschauen.util.icons') - return vim.tbl_deep_extend('force', opts, { + return vim.tbl_deep_extend('force', opts or {}, { disable_netrw = true, -- replace netrw with nvim-tree hijack_cursor = true, -- keep the cursor on begin of the filename sync_root_with_cwd = true, -- watch for `DirChanged` and refresh the tree diff --git a/config/nvim/lua/fschauen/plugins/telescope.lua b/config/nvim/lua/fschauen/plugins/telescope.lua index 7311cbe..39aa3e3 100644 --- a/config/nvim/lua/fschauen/plugins/telescope.lua +++ b/config/nvim/lua/fschauen/plugins/telescope.lua @@ -126,7 +126,7 @@ M.opts = function(--[[plugin]]_, opts) [''] = trouble.smart_open_with_trouble, } - return vim.tbl_deep_extend('force', opts, { + return vim.tbl_deep_extend('force', opts or {}, { defaults = { mappings = { i = mappings, n = mappings }, diff --git a/config/nvim/lua/fschauen/plugins/todo-comments.lua b/config/nvim/lua/fschauen/plugins/todo-comments.lua index 8d686fd..a117f4f 100644 --- a/config/nvim/lua/fschauen/plugins/todo-comments.lua +++ b/config/nvim/lua/fschauen/plugins/todo-comments.lua @@ -16,7 +16,7 @@ M.keys = { M.opts = function(--[[plugin]]_, opts) local icons = require('fschauen.util.icons') - return vim.tbl_deep_extend('force', opts, { + return vim.tbl_deep_extend('force', opts or {}, { keywords = { TODO = { icon = icons.ui.Checkbox }, FIX = { icon = icons.ui.Bug }, diff --git a/config/nvim/lua/fschauen/plugins/virt-column.lua b/config/nvim/lua/fschauen/plugins/virt-column.lua index 5afc52a..67d8809 100644 --- a/config/nvim/lua/fschauen/plugins/virt-column.lua +++ b/config/nvim/lua/fschauen/plugins/virt-column.lua @@ -16,10 +16,10 @@ M.keys = { { 'sc', toggle_colorcolumn, desc = toggle .. 'virtual colunn' }, } -M.config = function(--[[plugin]]_, --[[opts]]_) - require('virt-column').setup { +M.opts = function(--[[plugin]]_, opts) + return vim.tbl_deep_extend('force', opts or {}, { char = require('fschauen.util.icons').ui.LineMiddle, - } + }) end return M