diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 4ce04b4..f6dd06b 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -17,7 +17,7 @@ "lazy.nvim": { "branch": "main", "commit": "cf8ecc2c5e4332760431a33534240b0cbc6680ab" }, "lazygit.nvim": { "branch": "main", "commit": "56760339a81cd1540d5a72fd9d93010a2677b55d" }, "lspkind.nvim": { "branch": "master", "commit": "a700f1436d4a938b1a1a93c9962dc796afbaef4d" }, - "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, + "lualine.nvim": { "branch": "master", "commit": "b39f1f02f1799da88d552c522f4cb0c786b14440" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "4d0e5b49363cac187326998b96aa6a2884e0e89b" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, @@ -28,19 +28,23 @@ "nvim-lint": { "branch": "master", "commit": "36da8dd0ddc4f88e0beae234c20e75397326f143" }, "nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" }, "nvim-lspconfig": { "branch": "master", "commit": "54617a18f4cf46f0c2f6d024fa6feb7515fe036d" }, + "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" }, "nvim-tree.lua": { "branch": "master", "commit": "120ba58254835d412bbc91cffe847e9be835fadd" }, - "nvim-treesitter": { "branch": "master", "commit": "92d2501d698e0fe855bd222540f9648890fab6c7" }, + "nvim-treesitter": { "branch": "master", "commit": "b065b59196edb10a7c29bfbed88cc225b7e3de37" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" }, "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "9c74db656c3d0b1c4392fc89a016b1910539e7c0" }, "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, "onenord.nvim": { "branch": "main", "commit": "7f8a7482a1145c1286ee05d46ef4d028a4f7264a" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "render-markdown.nvim": { "branch": "main", "commit": "fc05fb7c56795f191b6800799a2ec6ea325ba715" }, "substitute.nvim": { "branch": "main", "commit": "97f49d16f8eea7967d41db4f657dd63af53eeba1" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "trouble.nvim": { "branch": "main", "commit": "2f3b537f2207ce32f4459f9d56746ee013b5e01b" }, + "vim-be-good": { "branch": "master", "commit": "4fa57b7957715c91326fcead58c1fa898b9b3625" }, "vim-maximizer": { "branch": "master", "commit": "2e54952fe91e140a2e69f35f22131219fcd9c5f1" }, "vim-tmux-navigator": { "branch": "master", "commit": "a9b52e7d36114d40350099f254b5f299a35df978" }, "which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" } diff --git a/.config/nvim/lua/plugins/nvim-notify.lua b/.config/nvim/lua/plugins/nvim-notify.lua new file mode 100644 index 0000000..0b90309 --- /dev/null +++ b/.config/nvim/lua/plugins/nvim-notify.lua @@ -0,0 +1,4 @@ +return { + "rcarriga/nvim-notify", + opts = {}, +} diff --git a/.config/nvim/lua/plugins/nvim-treesitter-text-objects.lua b/.config/nvim/lua/plugins/nvim-treesitter-text-objects.lua new file mode 100644 index 0000000..8778d2a --- /dev/null +++ b/.config/nvim/lua/plugins/nvim-treesitter-text-objects.lua @@ -0,0 +1,110 @@ +return { + "nvim-treesitter/nvim-treesitter-textobjects", + lazy = true, + config = function() + require("nvim-treesitter.configs").setup { + textobjects = { + select = { + enable = true, + + -- Automatically jump forward to textobj, similar to targets.vim + lookahead = true, + + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ["a="] = { query = "@assignment.outer", desc = "Select outer part of an assignment" }, + ["i="] = { query = "@assignment.inner", desc = "Select inner part of an assignment" }, + ["l="] = { query = "@assignment.lhs", desc = "Select left hand side of an assignment" }, + ["r="] = { query = "@assignment.rhs", desc = "Select right hand side of an assignment" }, + + -- works for javascript/typescript files (custom capture I created in after/queries/ecma/textobjects.scm) + ["a:"] = { query = "@property.outer", desc = "Select outer part of an object property" }, + ["i:"] = { query = "@property.inner", desc = "Select inner part of an object property" }, + ["l:"] = { query = "@property.lhs", desc = "Select left part of an object property" }, + ["r:"] = { query = "@property.rhs", desc = "Select right part of an object property" }, + + ["aa"] = { query = "@parameter.outer", desc = "Select outer part of a parameter/argument" }, + ["ia"] = { query = "@parameter.inner", desc = "Select inner part of a parameter/argument" }, + + ["ai"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" }, + ["ii"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" }, + + ["al"] = { query = "@loop.outer", desc = "Select outer part of a loop" }, + ["il"] = { query = "@loop.inner", desc = "Select inner part of a loop" }, + + ["af"] = { query = "@call.outer", desc = "Select outer part of a function call" }, + ["if"] = { query = "@call.inner", desc = "Select inner part of a function call" }, + + ["am"] = { query = "@function.outer", desc = "Select outer part of a method/function definition" }, + ["im"] = { query = "@function.inner", desc = "Select inner part of a method/function definition" }, + + ["ac"] = { query = "@class.outer", desc = "Select outer part of a class" }, + ["ic"] = { query = "@class.inner", desc = "Select inner part of a class" }, + }, + }, + swap = { + enable = true, + swap_next = { + ["na"] = "@parameter.inner", -- swap parameters/argument with next + ["n:"] = "@property.outer", -- swap object property with next + ["nm"] = "@function.outer", -- swap function with next + }, + swap_previous = { + ["pa"] = "@parameter.inner", -- swap parameters/argument with prev + ["p:"] = "@property.outer", -- swap object property with prev + ["pm"] = "@function.outer", -- swap function with previous + }, + }, + move = { + enable = true, + set_jumps = true, -- whether to set jumps in the jumplist + goto_next_start = { + ["]f"] = { query = "@call.outer", desc = "Next function call start" }, + ["]m"] = { query = "@function.outer", desc = "Next method/function def start" }, + ["]c"] = { query = "@class.outer", desc = "Next class start" }, + ["]i"] = { query = "@conditional.outer", desc = "Next conditional start" }, + ["]l"] = { query = "@loop.outer", desc = "Next loop start" }, + + -- You can pass a query group to use query from `queries//.scm file in your runtime path. + -- Below example nvim-treesitter's `locals.scm` and `folds.scm`. They also provide highlights.scm and indent.scm. + ["]s"] = { query = "@scope", query_group = "locals", desc = "Next scope" }, + ["]z"] = { query = "@fold", query_group = "folds", desc = "Next fold" }, + }, + goto_next_end = { + ["]F"] = { query = "@call.outer", desc = "Next function call end" }, + ["]M"] = { query = "@function.outer", desc = "Next method/function def end" }, + ["]C"] = { query = "@class.outer", desc = "Next class end" }, + ["]I"] = { query = "@conditional.outer", desc = "Next conditional end" }, + ["]L"] = { query = "@loop.outer", desc = "Next loop end" }, + }, + goto_previous_start = { + ["[f"] = { query = "@call.outer", desc = "Prev function call start" }, + ["[m"] = { query = "@function.outer", desc = "Prev method/function def start" }, + ["[c"] = { query = "@class.outer", desc = "Prev class start" }, + ["[i"] = { query = "@conditional.outer", desc = "Prev conditional start" }, + ["[l"] = { query = "@loop.outer", desc = "Prev loop start" }, + }, + goto_previous_end = { + ["[F"] = { query = "@call.outer", desc = "Prev function call end" }, + ["[M"] = { query = "@function.outer", desc = "Prev method/function def end" }, + ["[C"] = { query = "@class.outer", desc = "Prev class end" }, + ["[I"] = { query = "@conditional.outer", desc = "Prev conditional end" }, + ["[L"] = { query = "@loop.outer", desc = "Prev loop end" }, + }, + }, + }, + } + + local ts_repeat_move = require "nvim-treesitter.textobjects.repeatable_move" + + -- vim way: ; goes to the direction you were moving. + vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move) + vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_opposite) + + -- Optionally, make builtin f, F, t, T also repeatable with ; and , + vim.keymap.set({ "n", "x", "o" }, "f", ts_repeat_move.builtin_f) + vim.keymap.set({ "n", "x", "o" }, "F", ts_repeat_move.builtin_F) + vim.keymap.set({ "n", "x", "o" }, "t", ts_repeat_move.builtin_t) + vim.keymap.set({ "n", "x", "o" }, "T", ts_repeat_move.builtin_T) + end, +} diff --git a/.config/nvim/lua/plugins/render-markdown.lua b/.config/nvim/lua/plugins/render-markdown.lua new file mode 100644 index 0000000..e1c2164 --- /dev/null +++ b/.config/nvim/lua/plugins/render-markdown.lua @@ -0,0 +1,397 @@ +return { + "MeanderingProgrammer/render-markdown.nvim", + dependencies = { + "nvim-treesitter/nvim-treesitter", + "nvim-tree/nvim-web-devicons", + }, + ---@module 'render-markdown' + ---@type render.md.UserConfig + opts = { + enabled = true, + max_file_size = 10.0, -- Max filesize to be rendered (in MB) + debounce = 100, + preset = "none", -- 'obsidian', 'lazy', or 'none' + log_level = "error", + log_runtime = false, + file_types = { "markdown" }, + injections = { + gitcommit = { + enabled = true, + query = [[ + ((message) @injection.content + (#set! injection.combined) + (#set! injection.include-children) + (#set! injection.language "markdown")) + ]], + }, + }, + render_modes = { "n", "c" }, + anti_conceal = { + enabled = true, -- This enables hiding any added text on the line the cursor is on + ignore = { + code_background = true, + sign = true, + }, + above = 0, -- Number of lines above cursor to show + below = 0, -- Number of lines below cursor to show + }, + padding = { + highlight = "Normal", + }, + latex = { + enabled = true, + converter = "latex2text", + highlight = "RenderMarkdownMath", + top_pad = 0, + bottom_pad = 0, + }, + on = { + attach = function() end, + }, + heading = { + enabled = true, + sign = true, + position = "inline", -- 'inline' or 'overlay' + icons = { "󰲡 ", "󰲣 ", "󰲥 ", "󰲧 ", "󰲩 ", "󰲫 " }, + signs = { "󰫎 " }, + width = "block", -- 'full' or 'block' + --left_margin = 5.0, + left_pad = 3.0, + right_pad = 3.0, + min_width = 0, + border = false, + border_virtual = false, + -- Highlight the start of the border using the foreground highlight + border_prefix = false, + -- Used above heading for border + above = "▄", + -- Used below heading for border + below = "▀", + -- The 'level' is used to index into the list using a clamp + -- Highlight for the heading icon and extends through the entire line + backgrounds = { + "RenderMarkdownH1bg", + "RenderMarkdownH2Bg", + "RenderMarkdownH3Bg", + "RenderMarkdownH4Bg", + "RenderMarkdownH5Bg", + "RenderMarkdownH6Bg", + }, + -- The 'level' is used to index into the list using a clamp + -- Highlight for the heading and sign icons + foregrounds = { + "RenderMarkdownH1", + "RenderMarkdownH2", + "RenderMarkdownH3", + "RenderMarkdownH4", + "RenderMarkdownH5", + "RenderMarkdownH6", + }, + }, + paragraph = { + -- Turn on / off paragraph rendering + enabled = true, + -- Amount of margin to add to the left of paragraphs + -- If a floating point value < 1 is provided it is treated as a percentage of the available window space + left_margin = 0, + -- Minimum width to use for paragraphs + min_width = 0, + }, + code = { + -- Turn on / off code block & inline code rendering + enabled = true, + -- Turn on / off any sign column related rendering + sign = true, + -- Determines how code blocks & inline code are rendered: + -- none: disables all rendering + -- normal: adds highlight group to code blocks & inline code, adds padding to code blocks + -- language: adds language icon to sign column if enabled and icon + name above code blocks + -- full: normal + language + style = "full", + -- Determines where language icon is rendered: + -- right: right side of code block + -- left: left side of code block + position = "left", + -- Amount of padding to add around the language + -- If a floating point value < 1 is provided it is treated as a percentage of the available window space + language_pad = 0, + -- Whether to include the language name next to the icon + language_name = true, + -- A list of language names for which background highlighting will be disabled + -- Likely because that language has background highlights itself + disable_background = { "diff" }, + -- Width of the code block background: + -- block: width of the code block + -- full: full width of the window + width = "full", + -- Amount of margin to add to the left of code blocks + -- If a floating point value < 1 is provided it is treated as a percentage of the available window space + -- Margin available space is computed after accounting for padding + left_margin = 0, + -- Amount of padding to add to the left of code blocks + -- If a floating point value < 1 is provided it is treated as a percentage of the available window space + left_pad = 0, + -- Amount of padding to add to the right of code blocks when width is 'block' + -- If a floating point value < 1 is provided it is treated as a percentage of the available window space + right_pad = 0, + -- Minimum width to use for code blocks when width is 'block' + min_width = 0, + -- Determines how the top / bottom of code block are rendered: + -- thick: use the same highlight as the code body + -- thin: when lines are empty overlay the above & below icons + border = "thin", + -- Used above code blocks for thin border + above = "▄", + -- Used below code blocks for thin border + below = "▀", + -- Highlight for code blocks + highlight = "RenderMarkdownCode", + -- Highlight for inline code + highlight_inline = "RenderMarkdownCodeInline", + -- Highlight for language, overrides icon provider value + highlight_language = nil, + }, + dash = { + -- Turn on / off thematic break rendering + enabled = true, + -- Replaces '---'|'***'|'___'|'* * *' of 'thematic_break' + -- The icon gets repeated across the window's width + icon = "─", + -- Width of the generated line: + -- : a hard coded width value + -- full: full width of the window + width = "full", + -- Highlight for the whole line generated from the icon + highlight = "RenderMarkdownDash", + }, + bullet = { + -- Turn on / off list bullet rendering + enabled = true, + -- Replaces '-'|'+'|'*' of 'list_item' + -- How deeply nested the list is determines the 'level' which is used to index into the list using a cycle + -- The item number in the list is used to index into the value using a clamp if the value is also a list + -- If the item is a 'checkbox' a conceal is used to hide the bullet instead + icons = { "●", "○", "◆", "◇" }, + -- Replaces 'n.'|'n)' of 'list_item' + -- How deeply nested the list is determines the 'level' which is used to index into the list using a cycle + -- The item number in the list is used to index into the value using a clamp if the value is also a list + ordered_icons = {}, + -- Padding to add to the left of bullet point + left_pad = 0, + -- Padding to add to the right of bullet point + right_pad = 0, + -- Highlight for the bullet icon + highlight = "RenderMarkdownBullet", + }, + -- Checkboxes are a special instance of a 'list_item' that start with a 'shortcut_link' + -- There are two special states for unchecked & checked defined in the markdown grammar + checkbox = { + -- Turn on / off checkbox state rendering + enabled = true, + -- Determines how icons fill the available space: + -- inline: underlying text is concealed resulting in a left aligned icon + -- overlay: result is left padded with spaces to hide any additional text + position = "inline", + unchecked = { + -- Replaces '[ ]' of 'task_list_marker_unchecked' + icon = "󰄱 ", + -- Highlight for the unchecked icon + highlight = "RenderMarkdownUnchecked", + -- Highlight for item associated with unchecked checkbox + scope_highlight = nil, + }, + checked = { + -- Replaces '[x]' of 'task_list_marker_checked' + icon = "󰱒 ", + -- Highlight for the checked icon + highlight = "RenderMarkdownChecked", + -- Highlight for item associated with checked checkbox + scope_highlight = nil, + }, + -- Define custom checkbox states, more involved as they are not part of the markdown grammar + -- As a result this requires neovim >= 0.10.0 since it relies on 'inline' extmarks + -- Can specify as many additional states as you like following the 'todo' pattern below + -- The key in this case 'todo' is for healthcheck and to allow users to change its values + -- 'raw': Matched against the raw text of a 'shortcut_link' + -- 'rendered': Replaces the 'raw' value when rendering + -- 'highlight': Highlight for the 'rendered' icon + -- 'scope_highlight': Highlight for item associated with custom checkbox + custom = { + todo = { raw = "[-]", rendered = "󰥔 ", highlight = "RenderMarkdownTodo", scope_highlight = nil }, + }, + }, + quote = { + -- Turn on / off block quote & callout rendering + enabled = true, + -- Replaces '>' of 'block_quote' + icon = "▋", + -- Whether to repeat icon on wrapped lines. Requires neovim >= 0.10. This will obscure text if + -- not configured correctly with :h 'showbreak', :h 'breakindent' and :h 'breakindentopt'. A + -- combination of these that is likely to work is showbreak = ' ' (2 spaces), breakindent = true, + -- breakindentopt = '' (empty string). These values are not validated by this plugin. If you want + -- to avoid adding these to your main configuration then set them in win_options for this plugin. + repeat_linebreak = false, + -- Highlight for the quote icon + highlight = "RenderMarkdownQuote", + }, + pipe_table = { + -- Turn on / off pipe table rendering + enabled = true, + -- Pre configured settings largely for setting table border easier + -- heavy: use thicker border characters + -- double: use double line border characters + -- round: use round border corners + -- none: does nothing + preset = "none", + -- Determines how the table as a whole is rendered: + -- none: disables all rendering + -- normal: applies the 'cell' style rendering to each row of the table + -- full: normal + a top & bottom line that fill out the table when lengths match + style = "full", + -- Determines how individual cells of a table are rendered: + -- overlay: writes completely over the table, removing conceal behavior and highlights + -- raw: replaces only the '|' characters in each row, leaving the cells unmodified + -- padded: raw + cells are padded to maximum visual width for each column + -- trimmed: padded except empty space is subtracted from visual width calculation + cell = "padded", + -- Amount of space to put between cell contents and border + padding = 1, + -- Minimum column width to use for padded or trimmed cell + min_width = 0, + -- Characters used to replace table border + -- Correspond to top(3), delimiter(3), bottom(3), vertical, & horizontal + -- stylua: ignore + border = { + '┌', '┬', '┐', + '├', '┼', '┤', + '└', '┴', '┘', + '│', '─', + }, + -- Gets placed in delimiter row for each column, position is based on alignment + alignment_indicator = "━", + -- Highlight for table heading, delimiter, and the line above + head = "RenderMarkdownTableHead", + -- Highlight for everything else, main table rows and the line below + row = "RenderMarkdownTableRow", + -- Highlight for inline padding used to add back concealed space + filler = "RenderMarkdownTableFill", + }, + -- Callouts are a special instance of a 'block_quote' that start with a 'shortcut_link' + -- Can specify as many additional values as you like following the pattern from any below, such as 'note' + -- The key in this case 'note' is for healthcheck and to allow users to change its values + -- '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 + callout = { + 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" }, + -- Obsidian: https://help.obsidian.md/Editing+and+formatting/Callouts + 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" }, + }, + link = { + -- Turn on / off inline link icon rendering + enabled = true, + -- Inlined with 'image' elements + image = "󰥶 ", + -- Inlined with 'email_autolink' elements + email = "󰀓 ", + -- Fallback icon for 'inline_link' elements + hyperlink = "󰌹 ", + -- Applies to the fallback inlined icon + highlight = "RenderMarkdownLink", + -- Applies to WikiLink elements + wiki = { icon = "󱗖 ", highlight = "RenderMarkdownWikiLink" }, + -- Define custom destination patterns so icons can quickly inform you of what a link + -- contains. Applies to 'inline_link' and wikilink nodes. + -- Can specify as many additional values as you like following the 'web' pattern below + -- The key in this case 'web' is for healthcheck and to allow users to change its values + -- 'pattern': Matched against the destination text see :h lua-pattern + -- 'icon': Gets inlined before the link text + -- 'highlight': Highlight for the 'icon' + custom = { + web = { pattern = "^http[s]?://", icon = "󰖟 ", highlight = "RenderMarkdownLink" }, + }, + }, + sign = { + -- Turn on / off sign rendering + enabled = true, + -- Applies to background of sign text + highlight = "RenderMarkdownSign", + }, + -- Mimic org-indent-mode behavior by indenting everything under a heading based on the + -- level of the heading. Indenting starts from level 2 headings onward. + indent = { + -- Turn on / off org-indent-mode + enabled = false, + -- Amount of additional padding added for each heading level + per_level = 2, + -- Heading levels <= this value will not be indented + -- Use 0 to begin indenting from the very first level + skip_level = 1, + -- Do not indent heading titles, only the body + skip_heading = false, + }, + -- Window options to use that change between rendered and raw view + win_options = { + -- See :h 'conceallevel' + conceallevel = { + -- Used when not being rendered, get user setting + default = vim.api.nvim_get_option_value("conceallevel", {}), + -- Used when being rendered, concealed text is completely hidden + rendered = 3, + }, + -- See :h 'concealcursor' + concealcursor = { + -- Used when not being rendered, get user setting + default = vim.api.nvim_get_option_value("concealcursor", {}), + -- Used when being rendered, disable concealing text in all modes + rendered = "", + }, + }, + -- More granular configuration mechanism, allows different aspects of buffers + -- to have their own behavior. Values default to the top level configuration + -- if no override is provided. Supports the following fields: + -- enabled, max_file_size, debounce, render_modes, anti_conceal, padding, + -- heading, paragraph, code, dash, bullet, checkbox, quote, pipe_table, + -- callout, link, sign, indent, win_options + overrides = { + -- Overrides for different buftypes, see :h 'buftype' + buftype = { + nofile = { + padding = { highlight = "NormalFloat" }, + sign = { enabled = false }, + }, + }, + -- Overrides for different filetypes, see :h 'filetype' + filetype = {}, + }, + -- Mapping from treesitter language to user defined handlers + -- See 'Custom Handlers' document for more info + custom_handlers = {}, + }, +} diff --git a/.config/nvim/lua/plugins/vim-be-good.lua b/.config/nvim/lua/plugins/vim-be-good.lua new file mode 100644 index 0000000..6ef7bd0 --- /dev/null +++ b/.config/nvim/lua/plugins/vim-be-good.lua @@ -0,0 +1,3 @@ +return { + "ThePrimeagen/vim-be-good", +}