diff --git a/nvim/lua/plugins/autopairs.lua b/nvim/lua/plugins/autopairs.lua index d3461dc..d878d76 100644 --- a/nvim/lua/plugins/autopairs.lua +++ b/nvim/lua/plugins/autopairs.lua @@ -1,6 +1,6 @@ return { 'windwp/nvim-autopairs', - config = function () + config = function() require('nvim-autopairs').setup() end } diff --git a/nvim/lua/plugins/dap.lua b/nvim/lua/plugins/dap.lua index 225d3c1..feed76a 100644 --- a/nvim/lua/plugins/dap.lua +++ b/nvim/lua/plugins/dap.lua @@ -96,11 +96,11 @@ return { vim.fn.sign_define('DapBreakpointCondition', { text = '🝌', texthl = '', lineh = '', numhl = '' }) vim.fn.sign_define('DapStopped', { text = '▶️' }) - -- dap.adapters.gdb = { - -- type = 'executable', - -- command = 'gdb', - -- args = { '-i', 'dap' }, - -- } + dap.adapters.gdb = { + type = 'executable', + command = 'gdb', + args = { '-i', 'dap' }, + } dap.adapters.lldb = { command = 'lldb', @@ -130,7 +130,7 @@ return { name = 'Launch current file', request = 'launch', program = '${file}', - pythonPath = function () + pythonPath = function() if vim.env.VIRTUAL_ENV then return vim.env.VIRTUAL_ENV .. '/bin/python' end @@ -157,7 +157,7 @@ return { { 'dh', function() require('dap.ui.widgets').hover() end, - mode = 'n', 'v', + mode = { 'n', 'v' }, desc = 'DAP: Debug hover', }, { diff --git a/nvim/lua/plugins/gitsigns.lua b/nvim/lua/plugins/gitsigns.lua index 7492065..55684af 100644 --- a/nvim/lua/plugins/gitsigns.lua +++ b/nvim/lua/plugins/gitsigns.lua @@ -6,46 +6,46 @@ return { local gitsigns = require('gitsigns') local function map(mode, l, r, opts) - opts = opts or {} - opts.buffer = bufnr - vim.keymap.set(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) end -- Navigation map('n', ']c', function() - if vim.wo.diff then - vim.cmd.normal({']c', bang = true}) - else - gitsigns.nav_hunk('next') - end + if vim.wo.diff then + vim.cmd.normal({ ']c', bang = true }) + else + gitsigns.nav_hunk('next') + end end) map('n', '[c', function() - if vim.wo.diff then - vim.cmd.normal({'[c', bang = true}) - else - gitsigns.nav_hunk('prev') - end + if vim.wo.diff then + vim.cmd.normal({ '[c', bang = true }) + else + gitsigns.nav_hunk('prev') + end end) -- Actions map('n', 'gs', gitsigns.stage_hunk) map('n', 'gu', gitsigns.undo_stage_hunk) map('n', 'gr', gitsigns.reset_hunk) - map('v', 'gs', function() gitsigns.stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end) - map('v', 'gu', function() gitsigns.undo_stage_hunk {vim.fn.line('.'), vim.fn.line('v')} end) - map('v', 'gr', function() gitsigns.reset_hunk {vim.fn.line('.'), vim.fn.line('v')} end) + map('v', 'gs', function() gitsigns.stage_hunk { vim.fn.line('.'), vim.fn.line('v') } end) + map('v', 'gu', function() gitsigns.undo_stage_hunk { vim.fn.line('.'), vim.fn.line('v') } end) + map('v', 'gr', function() gitsigns.reset_hunk { vim.fn.line('.'), vim.fn.line('v') } end) map('n', 'gS', gitsigns.stage_buffer) map('n', 'gR', gitsigns.reset_buffer) map('n', 'gp', gitsigns.preview_hunk) - map('n', 'gb', function() gitsigns.blame_line{full=true} end) + map('n', 'gb', function() gitsigns.blame_line { full = true } end) map('n', 'gtb', gitsigns.toggle_current_line_blame) map('n', 'gd', gitsigns.diffthis) map('n', 'gD', function() gitsigns.diffthis('~') end) map('n', 'gtd', gitsigns.toggle_deleted) -- Text object - map({'o', 'x'}, 'ih', ':Gitsigns select_hunk') + map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk') end } end, diff --git a/nvim/lua/plugins/lspconfig.lua b/nvim/lua/plugins/lspconfig.lua index ececc9d..5071228 100644 --- a/nvim/lua/plugins/lspconfig.lua +++ b/nvim/lua/plugins/lspconfig.lua @@ -1,10 +1,10 @@ return { 'neovim/nvim-lspconfig', - config = function () + config = function() local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities.textDocument.completion.completionItem.snippetSupport = true - vim.diagnostic.config ({ + vim.diagnostic.config({ virtual_text = { source = 'always', }, diff --git a/nvim/lua/plugins/luasnip.lua b/nvim/lua/plugins/luasnip.lua index 9f9e5d6..035932a 100644 --- a/nvim/lua/plugins/luasnip.lua +++ b/nvim/lua/plugins/luasnip.lua @@ -17,7 +17,7 @@ return { }, }) require('luasnip.loaders.from_vscode').lazy_load() - require('luasnip.loaders.from_lua').lazy_load({paths = "./snippets"}) + require('luasnip.loaders.from_lua').lazy_load({ paths = "./snippets" }) end, dependencies = { 'saadparwaiz1/cmp_luasnip', -- Wrapper to load snippets in nvim-cmp diff --git a/nvim/lua/plugins/mason.lua b/nvim/lua/plugins/mason.lua index 348ee6f..8634c65 100644 --- a/nvim/lua/plugins/mason.lua +++ b/nvim/lua/plugins/mason.lua @@ -7,20 +7,18 @@ return { automatic_enable = true, ensure_installed = { -- Currently having issues with including some of the LSPs, even though they match the names in Mason - 'ansiblels', -- Ansible + 'ansiblels', -- Ansible 'arduino_language_server', -- Arduino specific C - 'bashls', -- Bash - -- 'cfn-lint', -- Cloudformation for AWS - 'clangd', -- C/C++ - -- 'gdtoolkit', -- Godot script - -- 'hadolint', -- Dockerfile linting - 'intelephense', -- PHP - 'lua_ls', -- Lua - 'marksman', -- markdown - 'pylsp', -- Python - 'rust_analyzer', -- Rust - 'ts_ls', -- Typscript - 'yamlls', -- YAML + 'bashls', -- Bash + 'cfn-lint', -- Cloudformation for AWS + 'clangd', -- C/C++ + 'intelephense', -- PHP + 'lua_ls', -- Lua + 'marksman', -- markdown + 'pylsp', -- Python + 'rust_analyzer', -- Rust + 'ts_ls', -- Typscript + 'yamlls', -- YAML } } end, diff --git a/nvim/lua/plugins/render-markdown.lua b/nvim/lua/plugins/render-markdown.lua index ba721c6..89482a0 100644 --- a/nvim/lua/plugins/render-markdown.lua +++ b/nvim/lua/plugins/render-markdown.lua @@ -1,116 +1,14 @@ return { 'meanderingprogrammer/render-markdown.nvim', - config = function () + config = function() require('render-markdown').setup({ enabled = true, render_modes = { 'n', 'c', 't' }, max_file_size = 10.0, - debounce = 100, file_types = { 'markdown', 'telekasten' }, - link = { - enabled = true, - footnote = { - enabled = true, - superscript = true, - prefix = '', - suffix = '', - }, - highlight = 'RenderMarkdownLink', - }, - latex = { - enabled = false, - }, - checkbox = { - enabled = true, - render_modes = false, - bullet = false, - right_pad = 1, - unchecked = { - -- icon = '󰄱 ', - highlight = 'RenderMarkdownUnchecked', - scope_highlight = nil, - }, - checked = { - -- icon = '󰱒 ', - highlight = 'RenderMarkdownChecked', - }, - custom = { - todo = { - raw = '[-]', - -- rendered = '', - highlight = 'RenderMarkdownTodo', - scope_highlight = nil, - }, - }, - }, - bullet = { - enabled = true, - render_modes = false, - icons = { '●', '○', '◆', '◇' }, - ordered_icons = function (ctx) - local value = vim.trim(ctx.value) - local index = tonumber(value:sub(1, #value - 1)) - return ('%d'):format(index > 1 and index or ctx.index) - end, - left_pad = 0, - right_pad = 0, - highlight = 'RenderMarkdownBullet', - scope_highlight = {}, - }, - -- quote = { icon = '▋' }, - anti_conceal = { - enabled = true, - ignore = { - code_background = true, - sign = true, - }, - above = 0, - below = 0, - }, - custom = { - }, - callout = { - -- Callouts are a special instance of a 'block_quote' that start with a 'shortcut_link'. - -- The key is for healthcheck and to allow users to change its values, value type below. - -- | raw | matched against the raw text of a 'shortcut_link', case insensitive | - -- | rendered | replaces the 'raw' value when rendering | - -- | highlight | highlight for the 'rendered' text and quote markers | - -- | quote_icon | optional override for quote.icon value for individual callout | - -- | category | optional metadata useful for filtering | - - note = { raw = '[!NOTE]', rendered = '󰋽 Note', highlight = 'RenderMarkdownInfo'}, - tip = { raw = '[!TIP]', rendered = '󰌶 Tip', highlight = 'RenderMarkdownSuccess'}, - important = { raw = '[!IMPORTANT]', rendered = '󰅾 Important', highlight = 'RenderMarkdownHint'}, - warning = { raw = '[!WARNING]', rendered = '󰀪 Warning', highlight = 'RenderMarkdownWarn'}, - caution = { raw = '[!CAUTION]', rendered = '󰳦 Caution', highlight = 'RenderMarkdownError'}, - abstract = { raw = '[!ABSTRACT]', rendered = '󰨸 Abstract', highlight = 'RenderMarkdownInfo'}, - summary = { raw = '[!SUMMARY]', rendered = '󰨸 Summary', highlight = 'RenderMarkdownInfo'}, - tldr = { raw = '[!TLDR]', rendered = '󰨸 Tldr', highlight = 'RenderMarkdownInfo'}, - info = { raw = '[!INFO]', rendered = '󰋽 Info', highlight = 'RenderMarkdownInfo'}, - todo = { raw = '[!TODO]', rendered = '󰗡 Todo', highlight = 'RenderMarkdownInfo'}, - hint = { raw = '[!HINT]', rendered = '󰌶 Hint', highlight = 'RenderMarkdownSuccess'}, - success = { raw = '[!SUCCESS]', rendered = '󰄬 Success', highlight = 'RenderMarkdownSuccess'}, - check = { raw = '[!CHECK]', rendered = '󰄬 Check', highlight = 'RenderMarkdownSuccess'}, - done = { raw = '[!DONE]', rendered = '󰄬 Done', highlight = 'RenderMarkdownSuccess'}, - question = { raw = '[!QUESTION]', rendered = '󰘥 Question', highlight = 'RenderMarkdownWarn'}, - help = { raw = '[!HELP]', rendered = '󰘥 Help', highlight = 'RenderMarkdownWarn'}, - faq = { raw = '[!FAQ]', rendered = '󰘥 Faq', highlight = 'RenderMarkdownWarn'}, - attention = { raw = '[!ATTENTION]', rendered = '󰀪 Attention', highlight = 'RenderMarkdownWarn'}, - failure = { raw = '[!FAILURE]', rendered = '󰅖 Failure', highlight = 'RenderMarkdownError'}, - fail = { raw = '[!FAIL]', rendered = '󰅖 Fail', highlight = 'RenderMarkdownError'}, - missing = { raw = '[!MISSING]', rendered = '󰅖 Missing', highlight = 'RenderMarkdownError'}, - danger = { raw = '[!DANGER]', rendered = '󱐌 Danger', highlight = 'RenderMarkdownError'}, - error = { raw = '[!ERROR]', rendered = '󱐌 Error', highlight = 'RenderMarkdownError'}, - bug = { raw = '[!BUG]', rendered = '󰨰 Bug', highlight = 'RenderMarkdownError'}, - example = { raw = '[!EXAMPLE]', rendered = '󰉹 Example', highlight = 'RenderMarkdownHint' }, - quote = { raw = '[!QUOTE]', rendered = '󱆨 Quote', highlight = 'RenderMarkdownQuote'}, - cite = { raw = '[!CITE]', rendered = '󱆨 Cite', highlight = 'RenderMarkdownQuote'}, - }, }) end, - dependencies = { - } } diff --git a/nvim/lua/plugins/telekasten.lua b/nvim/lua/plugins/telekasten.lua index 6044178..787b55a 100644 --- a/nvim/lua/plugins/telekasten.lua +++ b/nvim/lua/plugins/telekasten.lua @@ -1,5 +1,5 @@ function string.insert(str1, str2, pos) - return str1:sub(1, pos)..str2..str1:sub(pos+1) + return str1:sub(1, pos) .. str2 .. str1:sub(pos + 1) end function toggleTODO(current_line) @@ -22,7 +22,7 @@ vim.api.nvim_create_user_command('ToggleTODO', function() local new_line = toggleTODO(current_line) - vim.api.nvim_buf_set_lines(0, row-1, row, true, {new_line}) + vim.api.nvim_buf_set_lines(0, row - 1, row, true, { new_line }) end, {}) return { diff --git a/nvim/lua/plugins/telescope.lua b/nvim/lua/plugins/telescope.lua index e745a16..f59f9a9 100644 --- a/nvim/lua/plugins/telescope.lua +++ b/nvim/lua/plugins/telescope.lua @@ -140,7 +140,7 @@ return { grouped = true, previewer = false, initial_mode = 'normal', - layout_config = {height = 40}, + layout_config = { height = 40 }, }) end, }, diff --git a/nvim/lua/plugins/twilight.lua b/nvim/lua/plugins/twilight.lua index dc41447..19f10ba 100644 --- a/nvim/lua/plugins/twilight.lua +++ b/nvim/lua/plugins/twilight.lua @@ -1,6 +1,6 @@ return { 'folke/twilight.nvim', - config = function () + config = function() require('twilight').setup({ dimming = { alpha = 0.3,