Continue work on nvim
This commit is contained in:
10
private_dot_config/nvim/lua/plugins/colorizer.lua
Normal file
10
private_dot_config/nvim/lua/plugins/colorizer.lua
Normal file
@@ -0,0 +1,10 @@
|
||||
require("colorizer").setup({ "*" }, {
|
||||
RGB = true, -- #RGB hex codes
|
||||
RRGGBB = true, -- #RRGGBB hex codes
|
||||
names = false, -- "Name" codes like Blue
|
||||
RRGGBBAA = true, -- #RRGGBBAA hex codes
|
||||
rgb_fn = true, -- CSS rgb() and rgba() functions
|
||||
hsl_fn = true, -- CSS hsl() and hsla() functions
|
||||
css = true, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
|
||||
css_fn = true, -- Enable all CSS *functions*: rgb_fn, hsl_fn
|
||||
})
|
||||
50
private_dot_config/nvim/lua/plugins/gitsigns.lua
Normal file
50
private_dot_config/nvim/lua/plugins/gitsigns.lua
Normal file
@@ -0,0 +1,50 @@
|
||||
require('gitsigns').setup {
|
||||
signs = {
|
||||
add = { text = '┃' },
|
||||
change = { text = '┃' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
signs_staged = {
|
||||
add = { text = '┃' },
|
||||
change = { text = '┃' },
|
||||
delete = { text = '_' },
|
||||
topdelete = { text = '‾' },
|
||||
changedelete = { text = '~' },
|
||||
untracked = { text = '┆' },
|
||||
},
|
||||
signs_staged_enable = true,
|
||||
signcolumn = true, -- Toggle with `:Gitsigns toggle_signs`
|
||||
numhl = false, -- Toggle with `:Gitsigns toggle_numhl`
|
||||
linehl = false, -- Toggle with `:Gitsigns toggle_linehl`
|
||||
word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff`
|
||||
watch_gitdir = {
|
||||
follow_files = true
|
||||
},
|
||||
auto_attach = true,
|
||||
attach_to_untracked = false,
|
||||
current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame`
|
||||
current_line_blame_opts = {
|
||||
virt_text = true,
|
||||
virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align'
|
||||
delay = 1000,
|
||||
ignore_whitespace = false,
|
||||
virt_text_priority = 100,
|
||||
use_focus = true,
|
||||
},
|
||||
current_line_blame_formatter = '<author>, <author_time:%R> - <summary>',
|
||||
sign_priority = 6,
|
||||
update_debounce = 100,
|
||||
status_formatter = nil, -- Use default
|
||||
max_file_length = 40000, -- Disable if file is longer than this (in lines)
|
||||
preview_config = {
|
||||
-- Options passed to nvim_open_win
|
||||
border = 'single',
|
||||
style = 'minimal',
|
||||
relative = 'cursor',
|
||||
row = 0,
|
||||
col = 1
|
||||
},
|
||||
}
|
||||
139
private_dot_config/nvim/lua/plugins/render-markdown.lua
Normal file
139
private_dot_config/nvim/lua/plugins/render-markdown.lua
Normal file
@@ -0,0 +1,139 @@
|
||||
require('render-markdown').setup({
|
||||
link = {
|
||||
-- Turn on / off inline link icon rendering.
|
||||
enabled = true,
|
||||
-- Additional modes to render links.
|
||||
render_modes = false,
|
||||
-- How to handle footnote links, start with a '^'.
|
||||
footnote = {
|
||||
-- Turn on / off footnote rendering.
|
||||
enabled = true,
|
||||
-- Replace value with superscript equivalent.
|
||||
superscript = true,
|
||||
-- Added before link content.
|
||||
prefix = '',
|
||||
-- Added after link content.
|
||||
suffix = '',
|
||||
},
|
||||
-- Inlined with 'image' elements.
|
||||
image = ' ',
|
||||
-- Inlined with 'email_autolink' elements.
|
||||
email = ' ',
|
||||
-- Fallback icon for 'inline_link' and 'uri_autolink' elements.
|
||||
hyperlink = ' ',
|
||||
-- Applies to the inlined icon as a fallback.
|
||||
highlight = 'RenderMarkdownLink',
|
||||
-- Applies to WikiLink elements.
|
||||
wiki = {
|
||||
icon = ' ',
|
||||
body = function()
|
||||
return nil
|
||||
end,
|
||||
highlight = 'RenderMarkdownWikiLink',
|
||||
},
|
||||
-- Define custom destination patterns so icons can quickly inform you of what a link
|
||||
-- contains. Applies to 'inline_link', 'uri_autolink', and wikilink nodes. When multiple
|
||||
-- patterns match a link the one with the longer pattern is used.
|
||||
-- The key is for healthcheck and to allow users to change its values, value type below.
|
||||
-- | pattern | matched against the destination text |
|
||||
-- | icon | gets inlined before the link text |
|
||||
-- | kind | optional determines how pattern is checked |
|
||||
-- | | pattern | @see :h lua-patterns, is the default if not set |
|
||||
-- | | suffix | @see :h vim.endswith() |
|
||||
-- | priority | optional used when multiple match, uses pattern length if empty |
|
||||
-- | highlight | optional highlight for 'icon', uses fallback highlight if empty |
|
||||
custom = {
|
||||
web = { pattern = '^http', icon = ' ' },
|
||||
github = { pattern = 'github%.com', icon = ' ' },
|
||||
gitlab = { pattern = 'gitlab%.com', icon = ' ' },
|
||||
stackoverflow = { pattern = 'stackoverflow%.com', icon = ' ' },
|
||||
wikipedia = { pattern = 'wikipedia%.org', icon = ' ' },
|
||||
youtube = { pattern = 'youtube%.com', icon = ' ' },
|
||||
},
|
||||
},
|
||||
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'},
|
||||
},
|
||||
checkbox = {
|
||||
enabled = true,
|
||||
render_modes = false,
|
||||
bullet = false,
|
||||
right_pad = 1,
|
||||
unchecked = {
|
||||
icon = ' ',
|
||||
highlight = 'RenderMarkdownUnchecked',
|
||||
scope_highlight = nil,
|
||||
},
|
||||
checked = {
|
||||
icon = ' ',
|
||||
highlight = 'RenderMarkdownChecked',
|
||||
scope_highlight = nil,
|
||||
},
|
||||
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,
|
||||
-- Which elements to always show, ignoring anti conceal behavior. Values can either be
|
||||
-- booleans to fix the behavior or string lists representing modes where anti conceal
|
||||
-- behavior will be ignored. Valid values are:
|
||||
-- head_icon, head_background, head_border, code_language, code_background, code_border,
|
||||
-- dash, bullet, check_icon, check_scope, quote, table_border, callout, link, sign
|
||||
ignore = {
|
||||
code_background = true,
|
||||
sign = true,
|
||||
},
|
||||
above = 0,
|
||||
below = 0,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user