diff --git a/.config/nvim/lua/plugins/conform.lua b/.config/nvim/lua/plugins/conform.lua index e8ce805..69ec4f8 100644 --- a/.config/nvim/lua/plugins/conform.lua +++ b/.config/nvim/lua/plugins/conform.lua @@ -10,18 +10,16 @@ return { desc = "LSP: format", }, }, - config = function() - require("conform").setup({ - formatters_by_ft = { - lua = { "stylua" }, - markdown = { "mdformat" }, - python = { "isort", "yapf" }, - sh = { "shfmt" }, - bash = { "shfmt" }, - zsh = { "shfmt" }, - tex = { "latexindent" }, - yaml = { "yamlfmt" }, - }, - }) - end, + opts = { + formatters_by_ft = { + lua = { "stylua" }, + markdown = { "mdformat" }, + python = { "isort", "yapf" }, + sh = { "shfmt" }, + bash = { "shfmt" }, + zsh = { "shfmt" }, + tex = { "latexindent" }, + yaml = { "yamlfmt" }, + }, + }, } diff --git a/.config/nvim/lua/plugins/csvview.lua b/.config/nvim/lua/plugins/csvview.lua index 89fdd3a..0c104a9 100644 --- a/.config/nvim/lua/plugins/csvview.lua +++ b/.config/nvim/lua/plugins/csvview.lua @@ -3,18 +3,20 @@ return { "hat0uma/csvview.nvim", ft = "csv", cmd = { "CsvViewEnable", "CsvViewDisable", "CsvViewToggle" }, - config = function() - require("csvview").setup({ - parser = { comments = { "#", "//" } }, - keymaps = { - textobject_field_inner = { "if", mode = { "o", "x" } }, - textobject_field_outer = { "af", mode = { "o", "x" } }, - jump_next_field_end = { "", mode = { "n", "v" } }, - jump_prev_field_end = { "", mode = { "n", "v" } }, - jump_next_row = { "", mode = { "n", "v" } }, - jump_prev_row = { "", mode = { "n", "v" } }, - }, - }) - require("csvview").enable() + opts = { + parser = { comments = { "#", "//" } }, + keymaps = { + textobject_field_inner = { "if", mode = { "o", "x" } }, + textobject_field_outer = { "af", mode = { "o", "x" } }, + jump_next_field_end = { "", mode = { "n", "v" } }, + jump_prev_field_end = { "", mode = { "n", "v" } }, + jump_next_row = { "", mode = { "n", "v" } }, + jump_prev_row = { "", mode = { "n", "v" } }, + }, + }, + config = function(_, opts) + local csvview = require("csvview") + csvview.setup(opts) + csvview.enable() end, } diff --git a/.config/nvim/lua/plugins/goto-preview.lua b/.config/nvim/lua/plugins/goto-preview.lua index 6b35dee..c579eb1 100644 --- a/.config/nvim/lua/plugins/goto-preview.lua +++ b/.config/nvim/lua/plugins/goto-preview.lua @@ -46,19 +46,17 @@ return { desc = "LSP: close all preview windows", }, }, - config = function() - require("goto-preview").setup({ - border = "rounded", - preview_window_title = { enable = true, position = "center" }, + opts = { + border = "rounded", + preview_window_title = { enable = true, position = "center" }, - post_open_hook = function(bufnr, winid) - local close = function() - require("goto-preview").close_all_win() - end + post_open_hook = function(bufnr, _) + local close = function() + require("goto-preview").close_all_win() + end - vim.keymap.set("n", "", close, { buffer = bufnr, silent = true }) - vim.keymap.set("n", "q", close, { buffer = bufnr, silent = true }) - end, - }) - end, + vim.keymap.set("n", "", close, { buffer = bufnr, silent = true }) + vim.keymap.set("n", "q", close, { buffer = bufnr, silent = true }) + end, + }, } diff --git a/.config/nvim/lua/plugins/knap.lua b/.config/nvim/lua/plugins/knap.lua index 7a72f34..839e2fb 100644 --- a/.config/nvim/lua/plugins/knap.lua +++ b/.config/nvim/lua/plugins/knap.lua @@ -4,9 +4,7 @@ return { keys = { { "p", - function() - require("knap").toggle_autopreviewing() - end, + function() require("knap").toggle_autopreviewing() end, desc = "Knap: toggle autopreview", }, }, diff --git a/.config/nvim/lua/plugins/lualine.lua b/.config/nvim/lua/plugins/lualine.lua index 96c83e8..d6e1bcf 100644 --- a/.config/nvim/lua/plugins/lualine.lua +++ b/.config/nvim/lua/plugins/lualine.lua @@ -2,17 +2,14 @@ return { -- statusline "nvim-lualine/lualine.nvim", dependencies = { - { - "nvim-tree/nvim-web-devicons", - lazy = true, - }, + "nvim-tree/nvim-web-devicons", + "tiyn/tccs.nvim", { "f-person/git-blame.nvim", config = function() vim.g.gitblame_display_virtual_text = 0 end, }, - { "tiyn/tccs.nvim" }, { "tiyn/action-hints.nvim", config = function() @@ -27,54 +24,58 @@ return { end, }, }, - config = function() - require("lualine").setup({ - options = { - globalstatus = true, - symbols = { - error = Error_sign, - warn = Warn_sign, - hint = Hint_sign, - info = Info_sign, - }, - theme = "tccs", - component_separators = { left = "", right = "" }, - section_separators = { left = "", right = "" }, + opts = { + options = { + globalstatus = true, + symbols = { + error = Error_sign, + warn = Warn_sign, + hint = Hint_sign, + info = Info_sign, }, - sections = { - lualine_b = { - { - require("gitblame").get_current_blame_text, - cond = require("gitblame").is_blame_text_available, - }, + theme = "tccs", + component_separators = { left = "", right = "" }, + section_separators = { left = "", right = "" }, + }, + sections = { + lualine_b = { + { + function() + return require("gitblame").get_current_blame_text() + end, + cond = function() + return require("gitblame").is_blame_text_available() + end, }, - lualine_c = {}, - lualine_x = { - require("action-hints").statusline, - "encoding", - "fileformat", - { - "filetype", - icon_only = true, - }, - }, - lualine_y = { - { - "filename", - file_status = true, - newfile_status = true, - path = 1, - shorting_target = 50, - symbols = { - modified = Lualine_signs["modified"], - readonly = Lualine_signs["readonly"], - unnamed = Lualine_signs["unnamed"], - newfile = Lualine_signs["newfile"], - }, - }, - }, - lualine_z = { "progress", "location" }, }, - }) - end, + lualine_c = {}, + lualine_x = { + function() + return require("action-hints").statusline() + end, + "encoding", + "fileformat", + { + "filetype", + icon_only = true, + }, + }, + lualine_y = { + { + "filename", + file_status = true, + newfile_status = true, + path = 1, + shorting_target = 50, + symbols = { + modified = Lualine_signs["modified"], + readonly = Lualine_signs["readonly"], + unnamed = Lualine_signs["unnamed"], + newfile = Lualine_signs["newfile"], + }, + }, + }, + lualine_z = { "progress", "location" }, + }, + }, } diff --git a/.config/nvim/lua/plugins/modes.lua b/.config/nvim/lua/plugins/modes.lua index 48a90de..1448073 100644 --- a/.config/nvim/lua/plugins/modes.lua +++ b/.config/nvim/lua/plugins/modes.lua @@ -1,7 +1,5 @@ return { -- decorations for the current line mode "mvllow/modes.nvim", - config = function() - require("modes").setup() - end, + opts = {}, } diff --git a/.config/nvim/lua/plugins/molten.lua b/.config/nvim/lua/plugins/molten.lua index b2c8315..05337a8 100644 --- a/.config/nvim/lua/plugins/molten.lua +++ b/.config/nvim/lua/plugins/molten.lua @@ -65,28 +65,30 @@ return { desc = "Quarto: Run all cells of all languages", }, }, - config = function() - require("quarto").setup({ - lspFeatures = { - languages = { "python" }, - chunks = "all", - diagnostics = { - enabled = true, - triggers = { "BufWritePost" }, - }, - completion = { - enabled = true, - }, - }, - codeRunner = { + opts = { + lspFeatures = { + languages = { "python" }, + chunks = "all", + diagnostics = { enabled = true, - default_method = "molten", + triggers = { "BufWritePost" }, }, - }) + completion = { + enabled = true, + }, + }, + codeRunner = { + enabled = true, + default_method = "molten", + }, + }, + config = function(_, opts) + local quarto = require("quarto") + quarto.setup(opts) vim.api.nvim_create_autocmd("FileType", { pattern = "markdown", callback = function() - require("quarto").activate() + quarto.activate() end, }) end, diff --git a/.config/nvim/lua/plugins/nvim-cmp.lua b/.config/nvim/lua/plugins/nvim-cmp.lua index 4abf21d..40dcc9b 100644 --- a/.config/nvim/lua/plugins/nvim-cmp.lua +++ b/.config/nvim/lua/plugins/nvim-cmp.lua @@ -17,7 +17,7 @@ return { end, version = "v2.*", -- build = "make install_jsregexp", - dependencies = { "saadparwaiz1/cmp_luasnip" }, + dependencies = "saadparwaiz1/cmp_luasnip", }, }, config = function() diff --git a/.config/nvim/lua/plugins/nvim-lilypond-suite.lua b/.config/nvim/lua/plugins/nvim-lilypond-suite.lua index 7f42095..b334a96 100644 --- a/.config/nvim/lua/plugins/nvim-lilypond-suite.lua +++ b/.config/nvim/lua/plugins/nvim-lilypond-suite.lua @@ -3,31 +3,33 @@ return { "martineausimon/nvim-lilypond-suite", ft = "lilypond", dependencies = "uga-rosa/cmp-dictionary", - config = function() - require("nvls").setup({ - lilypond = { - mappings = { - player = "", - compile = "", - open_pdf = "", - switch_buffers = "", - insert_version = "", - hyphenation = "", - hyphenation_change_lang = "", - insert_hyphen = "", - add_hyphen = "", - del_next_hyphen = "", - del_prev_hyphen = "", + opts = { + lilypond = { + mappings = { + player = "", + compile = "", + open_pdf = "", + switch_buffers = "", + insert_version = "", + hyphenation = "", + hyphenation_change_lang = "", + insert_hyphen = "", + add_hyphen = "", + del_next_hyphen = "", + del_prev_hyphen = "", + }, + }, + player = { + options = { + fluidsynth_flags = { + "/usr/share/soundfonts/FluidR3_GM.sf2", }, }, - player = { - options = { - fluidsynth_flags = { - "/usr/share/soundfonts/FluidR3_GM.sf2", - }, - }, - }, - }) + }, + }, + config = function(_, opts) + local nvls = require("nvls") + nvls.setup(opts) local lily_dicts = { "~/.local/share/nvim/lazy/nvim-lilypond-suite/lilywords/keywords", "~/.local/share/nvim/lazy/nvim-lilypond-suite/lilywords/musicCommands", @@ -37,59 +39,52 @@ return { } vim.api.nvim_create_autocmd("FileType", { pattern = "lilypond", - callback = function() + callback = function(args) + local bufnr = args.buf require("cmp_dictionary").setup({ paths = lily_dicts, }) + local fluidsynth_job = nil + vim.keymap.set("n", "pm", function() + local midi = vim.fn.expand("%:r") .. ".midi" + if fluidsynth_job then + vim.fn.jobstop(fluidsynth_job) + fluidsynth_job = nil + print("fluidsynth stopped") + return + end + fluidsynth_job = vim.fn.jobstart({ "fluidsynth", "-i", midi }) + print("fluidsynth playing (Ctrl-C to stop)") + end, { + buffer = bufnr, + desc = "Lilypond: output MIDI", + }) + vim.keymap.set("n", "pp", "Viewer", { + buffer = bufnr, + desc = "Lilypond: open PDF", + }) + vim.keymap.set("n", "", function() + if fluidsynth_job then + vim.fn.jobstop(fluidsynth_job) + fluidsynth_job = nil + print("fluidsynth stopped") + else + vim.cmd("normal! ") + end + end, { + buffer = bufnr, + desc = "Stop MIDI playback", + }) + if vim.b[bufnr].first_start_lilypond then + return + end + vim.b[bufnr].first_start_lilypond = true + vim.schedule(function() + if vim.fn.exists(":Viewer") == 2 then + vim.cmd.Viewer() + end + end) end, }) - - local fluidsynth_job = nil - - vim.keymap.set("n", "pm", function() - local midi = vim.fn.expand("%:r") .. ".midi" - - if fluidsynth_job then - vim.fn.jobstop(fluidsynth_job) - fluidsynth_job = nil - print("fluidsynth stopped") - return - end - - fluidsynth_job = vim.fn.jobstart({ "fluidsynth", "-i", midi }) - print("fluidsynth playing (Ctrl-C to stop)") - end, { - buffer = bufnr, - desc = "Lilypond: output MIDI", - }) - - vim.keymap.set("n", "pp", "Viewer", { - buffer = bufnr, - desc = "Lilypond: open PDF", - }) - - vim.keymap.set("n", "", function() - if fluidsynth_job then - vim.fn.jobstop(fluidsynth_job) - fluidsynth_job = nil - print("fluidsynth stopped") - else - vim.cmd("normal! ") - end - end, { - buffer = bufnr, - desc = "Stop MIDI playback", - }) - - if vim.b.first_start_lilypond then - return - end - vim.b.first_start_lilypond = true - - vim.schedule(function() - if vim.fn.exists(":Viewer") == 2 then - vim.cmd.Viewer() - end - end) end, } diff --git a/.config/nvim/lua/plugins/nvim-lspconfig.lua b/.config/nvim/lua/plugins/nvim-lspconfig.lua index 51e86bd..fbb8a22 100644 --- a/.config/nvim/lua/plugins/nvim-lspconfig.lua +++ b/.config/nvim/lua/plugins/nvim-lspconfig.lua @@ -19,47 +19,32 @@ return { end, }, }, - config = function() - require("mason-lspconfig").setup({ - automatic_setup = true, - ensure_installed = { - -- assembler - "asm_lsp", - -- c - "clangd", - -- docker - "dockerls", - -- go - "gopls", - -- html - "html", - -- json - "jsonls", - -- xml - "lemminx", - -- latex - "ltex", - "texlab", - -- lua - "lua_ls", - -- markdown - "marksman", - -- nim - "nimls", - -- python - "pyright", - -- r - "r_language_server", - -- shell - "bashls", - -- sql - "sqlls", - -- typescript / javascript - "ts_ls", - -- yaml - "yamlls", - }, - }) + opts = { + automatic_setup = true, + ensure_installed = { + "asm_lsp", + "clangd", + "dockerls", + "gopls", + "html", + "jsonls", + "lemminx", + "ltex", + "texlab", + "lua_ls", + "marksman", + "nimls", + "pyright", + "r_language_server", + "bashls", + "sqlls", + "ts_ls", + "yamlls", + }, + }, + config = function(_, opts) + local mason_lspconfig = require("mason-lspconfig") + mason_lspconfig.setup(opts) local default_flags = { debounce_text_changes = 150, allow_incremental_sync = true, @@ -69,7 +54,6 @@ return { ltex = { settings = { ltex = { - -- language = "de-DE", enabled = { "latex", "markdown" }, dictionary = Dictionaries, }, @@ -95,10 +79,16 @@ return { }) ) end - vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts) - vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts) - vim.keymap.set("n", "gT", vim.lsp.buf.type_definition, opts) - vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts) - vim.keymap.set("n", "gr", vim.lsp.buf.references, opts) + vim.api.nvim_create_autocmd("LspAttach", { + callback = function(args) + local bufnr = args.buf + local opts = { buffer = bufnr } + vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts) + vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts) + vim.keymap.set("n", "gT", vim.lsp.buf.type_definition, opts) + vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts) + vim.keymap.set("n", "gr", vim.lsp.buf.references, opts) + end, + }) end, } diff --git a/.config/nvim/lua/plugins/nvim-scrollbar.lua b/.config/nvim/lua/plugins/nvim-scrollbar.lua index 2647f37..1cd4b1d 100644 --- a/.config/nvim/lua/plugins/nvim-scrollbar.lua +++ b/.config/nvim/lua/plugins/nvim-scrollbar.lua @@ -5,52 +5,34 @@ return { "kevinhwang91/nvim-hlslens", "lewis6991/gitsigns.nvim", }, - config = function() - require("scrollbar").setup({ - marks = { - Cursor = { - highlight = "Normal", - }, - Search = { - highlight = "Special", - }, - Error = { - highlight = "DiagnosticSignError", - }, - Warn = { - highlight = "DiagnosticSignWarn", - }, - Info = { - highlight = "DiagnosticSignInfo", - }, - Hint = { - highlight = "DiagnosticSignHint", - }, - Misc = { - highlight = "Special", - }, - GitAdd = { - highlight = "GitGutterAdd", - }, - GitChange = { - highlight = "GitGutterChange", - }, - GitDelete = { - highlight = "GitGutterDelete", - }, - }, - excluded_filetypes = { - "cmp_docs", - "cmp_menu", - "noice", - "prompt", - "TelescopePrompt", - "NvimTree", - "Navbuddy", - "FTerm", - "", - }, - }) + opts = { + marks = { + Cursor = { highlight = "Normal" }, + Search = { highlight = "Special" }, + Error = { highlight = "DiagnosticSignError" }, + Warn = { highlight = "DiagnosticSignWarn" }, + Info = { highlight = "DiagnosticSignInfo" }, + Hint = { highlight = "DiagnosticSignHint" }, + Misc = { highlight = "Special" }, + GitAdd = { highlight = "GitGutterAdd" }, + GitChange = { highlight = "GitGutterChange" }, + GitDelete = { highlight = "GitGutterDelete" }, + }, + excluded_filetypes = { + "cmp_docs", + "cmp_menu", + "noice", + "prompt", + "TelescopePrompt", + "NvimTree", + "Navbuddy", + "FTerm", + "", + }, + }, + config = function(_, opts) + local scrollbar = require("scrollbar") + scrollbar.setup(opts) require("scrollbar.handlers.search").setup() require("scrollbar.handlers.gitsigns").setup() end, diff --git a/.config/nvim/lua/plugins/nvim-tree.lua b/.config/nvim/lua/plugins/nvim-tree.lua index 403c791..61ab359 100644 --- a/.config/nvim/lua/plugins/nvim-tree.lua +++ b/.config/nvim/lua/plugins/nvim-tree.lua @@ -15,23 +15,21 @@ return { desc = "File tree: toggle", }, }, - config = function() - require("nvim-tree").setup({ - sort_by = "case_sensitive", - view = { - width = 30, - }, - filters = { - dotfiles = true, - }, - renderer = { - group_empty = true, - icons = { - glyphs = { - git = Git_signs, - }, + opts = { + sort_by = "case_sensitive", + view = { + width = 30, + }, + filters = { + dotfiles = true, + }, + renderer = { + group_empty = true, + icons = { + glyphs = { + git = Git_signs, }, }, - }) - end, + }, + }, } diff --git a/.config/nvim/lua/plugins/nvim-treesitter.lua b/.config/nvim/lua/plugins/nvim-treesitter.lua index 3859bc7..0cac71b 100644 --- a/.config/nvim/lua/plugins/nvim-treesitter.lua +++ b/.config/nvim/lua/plugins/nvim-treesitter.lua @@ -4,9 +4,16 @@ return { build = ":TSUpdate", dependencies = { -- automatically close html-tags - "windwp/nvim-ts-autotag", - -- color brackets - -- 'p00f/nvim-ts-rainbow', + { + "windwp/nvim-ts-autotag", + opts = { + opts = { + enable_close = true, + enable_rename = true, + }, + }, + }, + -- 'p00f/nvim-ts-rainbow', -- color brackets "nvim-treesitter/nvim-treesitter-context", }, config = function() @@ -24,11 +31,5 @@ return { "lua", "yaml", }) - require("nvim-ts-autotag").setup({ - opts = { - enable_close = true, - enable_rename = true, - }, - }) end, } diff --git a/.config/nvim/lua/plugins/ogpt.lua b/.config/nvim/lua/plugins/ogpt.lua index 3e04ed3..2409d39 100644 --- a/.config/nvim/lua/plugins/ogpt.lua +++ b/.config/nvim/lua/plugins/ogpt.lua @@ -8,14 +8,11 @@ return { "nvim-telescope/telescope.nvim", { "folke/edgy.nvim", - event = "VeryLazy", - init = function() vim.opt.laststatus = 3 vim.opt.splitkeep = "screen" -- or "topline" or "screen" end, - opts = { exit_when_last = false, animate = { diff --git a/.config/nvim/lua/plugins/outline.lua b/.config/nvim/lua/plugins/outline.lua index 6fc2e38..877fe33 100644 --- a/.config/nvim/lua/plugins/outline.lua +++ b/.config/nvim/lua/plugins/outline.lua @@ -1,4 +1,5 @@ return { + -- tree-like outline sidebar "hedyhli/outline.nvim", keys = { { @@ -7,14 +8,12 @@ return { desc = "CTags: toggle", }, }, - config = function() - require("outline").setup({ - outline_window = { - width = 25, - }, - symbols = { - icon_source = "lspkind", - }, - }) - end, + opts = { + outline_window = { + width = 25, + }, + symbols = { + icon_source = "lspkind", + }, + }, } diff --git a/.config/nvim/lua/plugins/papis.lua b/.config/nvim/lua/plugins/papis.lua index 2698b88..d82fe31 100644 --- a/.config/nvim/lua/plugins/papis.lua +++ b/.config/nvim/lua/plugins/papis.lua @@ -7,10 +7,7 @@ return { "hrsh7th/nvim-cmp", "nvim-telescope/telescope.nvim", }, - config = function() - require("papis").setup({ - -- Your configuration goes here - enable_keymaps = false, - }) - end, + opts = { + enable_keymaps = false, + }, } diff --git a/.config/nvim/lua/plugins/projections.lua b/.config/nvim/lua/plugins/projections.lua index 718aaf1..0765a93 100644 --- a/.config/nvim/lua/plugins/projections.lua +++ b/.config/nvim/lua/plugins/projections.lua @@ -14,22 +14,22 @@ return { desc = "Telescope: find projects", }, }, - config = function() - require("projections").setup({ - workspaces = { -- Default workspaces to search for - { "~/code/main", { ".git" } }, - { "~/code/uni", { ".git" } }, - }, - store_hooks = { - pre = function() - -- nvim-tree - local nvim_tree_present, api = pcall(require, "nvim-tree.api") - if nvim_tree_present then - api.tree.close() - end - end, - }, - }) + opts = { + workspaces = { + { "~/code/main", { ".git" } }, + { "~/code/uni", { ".git" } }, + }, + store_hooks = { + pre = function() + local ok, api = pcall(require, "nvim-tree.api") + if ok then + api.tree.close() + end + end, + }, + }, + config = function(_, opts) + require("projections").setup(opts) require("telescope").load_extension("projections") end, } diff --git a/.config/nvim/lua/plugins/spelunker.lua b/.config/nvim/lua/plugins/spelunker.lua index cda6fb2..804bfa7 100644 --- a/.config/nvim/lua/plugins/spelunker.lua +++ b/.config/nvim/lua/plugins/spelunker.lua @@ -1,24 +1,22 @@ return { -- improve spelling check for coding to feature camelcase, etc - { - "kamykn/spelunker.vim", - dependencies = { "kamykn/popup-menu.nvim" }, - keys = { - { - "t", - "call spelunker#toggle()", - desc = "Spelunker: toggle spell check", - }, - { - "s", - "z=", - desc = "Spell: display suggestions", - }, + "kamykn/spelunker.vim", + dependencies = { "kamykn/popup-menu.nvim" }, + keys = { + { + "t", + "call spelunker#toggle()", + desc = "Spelunker: toggle spell check", + }, + { + "s", + "z=", + desc = "Spell: display suggestions", }, - config = function() - -- vim.o.nospell = true - vim.g.enable_spelunker_vim = 0 - vim.g.spelunker_disable_acronym_checking = 1 - end, }, + config = function() + -- vim.o.nospell = true + vim.g.enable_spelunker_vim = 0 + vim.g.spelunker_disable_acronym_checking = 1 + end, } diff --git a/.config/nvim/lua/plugins/tccs.lua b/.config/nvim/lua/plugins/tccs.lua index 6f515c0..ac46636 100644 --- a/.config/nvim/lua/plugins/tccs.lua +++ b/.config/nvim/lua/plugins/tccs.lua @@ -3,9 +3,7 @@ return { "tiyn/tccs.nvim", lazy = false, priority = 1000, - config = function() - require("tccs").setup({ - require("tccs").load(), - }) - end, + opts = { + require("tccs").load(), + }, } diff --git a/.config/nvim/lua/plugins/tidy.lua b/.config/nvim/lua/plugins/tidy.lua index b632776..0b8ece0 100644 --- a/.config/nvim/lua/plugins/tidy.lua +++ b/.config/nvim/lua/plugins/tidy.lua @@ -3,11 +3,12 @@ return { "mcauley-penney/tidy.nvim", branch = "main", ft = { "markdown", "tex" }, - config = function() + opts = { + filetype_exclude = { "diff" }, + }, + config = function(_, opts) local tidy = require("tidy") - tidy.setup({ - filetype_exclude = { "diff" }, - }) + tidy.setup(opts) tidy.opts.enabled_on_save = false vim.api.nvim_create_autocmd("BufLeave", { pattern = { "*.md", "*.tex" }, diff --git a/.config/nvim/lua/plugins/tiny-inline-diagnostic.lua b/.config/nvim/lua/plugins/tiny-inline-diagnostic.lua index 9eca2d5..b1f2344 100644 --- a/.config/nvim/lua/plugins/tiny-inline-diagnostic.lua +++ b/.config/nvim/lua/plugins/tiny-inline-diagnostic.lua @@ -3,11 +3,14 @@ return { "rachartier/tiny-inline-diagnostic.nvim", event = "VeryLazy", priority = 1000, - config = function() - require("tiny-inline-diagnostic").setup({ - preset = "classic", - transparent_bg = true, + opts = { + preset = "classic", + transparent_bg = true, + }, + config = function(_, opts) + require("tiny-inline-diagnostic").setup(opts) + vim.diagnostic.config({ + virtual_text = false, }) - vim.diagnostic.config({ virtual_text = false }) end, } diff --git a/.config/nvim/lua/plugins/treesj.lua b/.config/nvim/lua/plugins/treesj.lua index cbe5a84..2df6d8d 100644 --- a/.config/nvim/lua/plugins/treesj.lua +++ b/.config/nvim/lua/plugins/treesj.lua @@ -10,7 +10,5 @@ return { end, }, }, - config = function() - require("treesj").setup() - end, + opts = {}, } diff --git a/.config/nvim/lua/plugins/vim-markdown.lua b/.config/nvim/lua/plugins/vim-markdown.lua index a896682..063583c 100644 --- a/.config/nvim/lua/plugins/vim-markdown.lua +++ b/.config/nvim/lua/plugins/vim-markdown.lua @@ -3,5 +3,5 @@ return { "preservim/vim-markdown", ft = { "markdown" }, dependencies = { "godlygeek/tabular" }, - config = function() end, + config = function() end, -- needed this way by the plugin } diff --git a/.config/nvim/lua/plugins/viper-nvim.lua b/.config/nvim/lua/plugins/viper-nvim.lua index 7b13458..79c31ac 100644 --- a/.config/nvim/lua/plugins/viper-nvim.lua +++ b/.config/nvim/lua/plugins/viper-nvim.lua @@ -2,7 +2,5 @@ return { -- highlighting for the viper verification language "tiyn/viper.nvim", event = { "BufReadPre *.vpr", "FileType viper" }, - config = function() - require("viper").setup() - end, + opts = {} } diff --git a/.config/nvim/lua/plugins/wilder.lua b/.config/nvim/lua/plugins/wilder.lua index a6b5999..af6ea9a 100644 --- a/.config/nvim/lua/plugins/wilder.lua +++ b/.config/nvim/lua/plugins/wilder.lua @@ -11,13 +11,14 @@ return { "romgrk/fzy-lua-native", "nixprime/cpsm", }, - config = function() + opts = { + modes = { ":", "/", "?" }, + accept_key = "", + reject_key = "", + }, + config = function(_, opts) local wilder = require("wilder") - wilder.setup({ - modes = { ":", "/", "?" }, - accept_key = "", - reject_key = "", - }) + wilder.setup(opts) wilder.set_option("pipeline", { wilder.branch( wilder.python_file_finder_pipeline({