Skip to content

Commit d7462eb

Browse files
chore: apply stylua column width 80
1 parent a615bae commit d7462eb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1148
-827
lines changed

.stylua.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
column_width = 120
1+
column_width = 80
22
line_endings = 'Unix'
33
indent_type = 'Spaces'
44
indent_width = 4

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ require('render-markdown').setup({
554554
-- | rendered | replaces the 'raw' value when rendering |
555555
-- | highlight | highlight for the 'rendered' icon |
556556
-- | scope_highlight | optional highlight for item associated with custom checkbox |
557+
-- stylua: ignore
557558
custom = {
558559
todo = { raw = '[-]', rendered = '󰥔 ', highlight = 'RenderMarkdownTodo', scope_highlight = nil },
559560
},
@@ -1161,6 +1162,7 @@ require('render-markdown').setup({
11611162
-- | rendered | replaces the 'raw' value when rendering |
11621163
-- | highlight | highlight for the 'rendered' icon |
11631164
-- | scope_highlight | optional highlight for item associated with custom checkbox |
1165+
-- stylua: ignore
11641166
custom = {
11651167
todo = { raw = '[-]', rendered = '󰥔 ', highlight = 'RenderMarkdownTodo', scope_highlight = nil },
11661168
},

demo/run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import argparse
12
import subprocess
2-
from argparse import ArgumentParser
33
from pathlib import Path
44

55
from PIL import Image
@@ -90,7 +90,7 @@ def get_move(file: Path) -> str:
9090

9191

9292
if __name__ == "__main__":
93-
parser = ArgumentParser(description="Generate a demo recording using vhs")
93+
parser = argparse.ArgumentParser(description="Generate a demo recording using vhs")
9494
parser.add_argument("--name", type=str, required=True, choices=INFO.keys())
9595
args = parser.parse_args()
9696
main(args.name)

doc/render-markdown.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*render-markdown.txt* For 0.11.0 Last change: 2025 April 06
1+
*render-markdown.txt* For 0.11.0 Last change: 2025 April 07
22

33
==============================================================================
44
Table of Contents *render-markdown-table-of-contents*
@@ -619,6 +619,7 @@ Default Configuration ~
619619
-- | rendered | replaces the 'raw' value when rendering |
620620
-- | highlight | highlight for the 'rendered' icon |
621621
-- | scope_highlight | optional highlight for item associated with custom checkbox |
622+
-- stylua: ignore
622623
custom = {
623624
todo = { raw = '[-]', rendered = '󰥔 ', highlight = 'RenderMarkdownTodo', scope_highlight = nil },
624625
},
@@ -1214,6 +1215,7 @@ Checkbox Configuration ~
12141215
-- | rendered | replaces the 'raw' value when rendering |
12151216
-- | highlight | highlight for the 'rendered' icon |
12161217
-- | scope_highlight | optional highlight for item associated with custom checkbox |
1218+
-- stylua: ignore
12171219
custom = {
12181220
todo = { raw = '[-]', rendered = '󰥔 ', highlight = 'RenderMarkdownTodo', scope_highlight = nil },
12191221
},

lua/render-markdown/api.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ end
4545

4646
function M.debug()
4747
local buf, win = Env.buf.current(), Env.win.current()
48-
local row, marks = require('render-markdown.core.ui').get_row_marks(buf, win)
48+
local row, marks =
49+
require('render-markdown.core.ui').get_row_marks(buf, win)
4950
require('render-markdown.debug.marks').debug(row, marks)
5051
end
5152

lua/render-markdown/colors.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,14 @@ M.colors = {
6666
function M.setup()
6767
-- Reload generated colors on color scheme change
6868
vim.api.nvim_create_autocmd('ColorScheme', {
69-
group = vim.api.nvim_create_augroup('RenderMarkdownColors', { clear = true }),
69+
group = vim.api.nvim_create_augroup('RenderMarkdownColors', {}),
7070
callback = M.reload,
7171
})
7272
for name, link in pairs(M.colors) do
73-
vim.api.nvim_set_hl(0, M.prefix .. name, { link = link, default = true })
73+
vim.api.nvim_set_hl(0, M.prefix .. name, {
74+
link = link,
75+
default = true,
76+
})
7477
end
7578
end
7679

lua/render-markdown/command.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ function M.command(opts)
4141
message = string.format('unexpected # arguments: %d', #args)
4242
end
4343
if message ~= nil then
44-
vim.notify(string.format('%s: %s', M.plugin, message), vim.log.levels.ERROR)
44+
local notification = string.format('%s: %s', M.plugin, message)
45+
vim.notify(notification, vim.log.levels.ERROR)
4546
end
4647
end
4748

lua/render-markdown/config.lua

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ function Config.new(config)
2828
checkbox = Config.normalize(config.checkbox.custom),
2929
}
3030

31-
local instance = vim.tbl_deep_extend('force', { modes = modes, components = components }, config)
31+
local instance = vim.tbl_deep_extend(
32+
'force',
33+
{ modes = modes, components = components },
34+
config
35+
)
3236
return setmetatable(instance, Config)
3337
end
3438

@@ -38,7 +42,10 @@ function Config.validate(spec)
3842
require('render-markdown.config.base').validate(spec)
3943
return spec:type('max_file_size', 'number')
4044
:type('debounce', 'number')
41-
:nested('anti_conceal', require('render-markdown.config.anti_conceal').validate)
45+
:nested(
46+
'anti_conceal',
47+
require('render-markdown.config.anti_conceal').validate
48+
)
4249
:nested('bullet', require('render-markdown.config.bullet').validate)
4350
:nested('callout', require('render-markdown.config.callout').validate)
4451
:nested('checkbox', require('render-markdown.config.checkbox').validate)
@@ -47,15 +54,27 @@ function Config.validate(spec)
4754
:nested('heading', require('render-markdown.config.heading').validate)
4855
:nested('html', require('render-markdown.config.html').validate)
4956
:nested('indent', require('render-markdown.config.indent').validate)
50-
:nested('inline_highlight', require('render-markdown.config.inline_highlight').validate)
57+
:nested(
58+
'inline_highlight',
59+
require('render-markdown.config.inline_highlight').validate
60+
)
5161
:nested('latex', require('render-markdown.config.latex').validate)
5262
:nested('link', require('render-markdown.config.link').validate)
5363
:nested('padding', require('render-markdown.config.padding').validate)
54-
:nested('paragraph', require('render-markdown.config.paragraph').validate)
55-
:nested('pipe_table', require('render-markdown.config.pipe_table').validate)
64+
:nested(
65+
'paragraph',
66+
require('render-markdown.config.paragraph').validate
67+
)
68+
:nested(
69+
'pipe_table',
70+
require('render-markdown.config.pipe_table').validate
71+
)
5672
:nested('quote', require('render-markdown.config.quote').validate)
5773
:nested('sign', require('render-markdown.config.sign').validate)
58-
:nested('win_options', require('render-markdown.config.win_options').validate)
74+
:nested(
75+
'win_options',
76+
require('render-markdown.config.win_options').validate
77+
)
5978
end
6079

6180
---@private
@@ -124,7 +143,10 @@ function Config:hidden(mode, row)
124143
local start = vim.fn.getpos('v')[2] - 1
125144
return Range.new(math.min(row, start), math.max(row, start))
126145
else
127-
return Range.new(row - self.anti_conceal.above, row + self.anti_conceal.below)
146+
return Range.new(
147+
row - self.anti_conceal.above,
148+
row + self.anti_conceal.below
149+
)
128150
end
129151
end
130152

lua/render-markdown/config/anti_conceal.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ local M = {}
3131
function M.validate(spec)
3232
spec:type('enabled', 'boolean')
3333
:nested('ignore', function(ignore)
34-
ignore:list(vim.tbl_keys(element), 'string', { 'boolean', 'nil' }):check()
34+
ignore
35+
:list(vim.tbl_keys(element), 'string', { 'boolean', 'nil' })
36+
:check()
3537
end)
3638
:type('above', 'number')
3739
:type('below', 'number')

lua/render-markdown/config/checkbox.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ function M.validate(spec)
2222
require('render-markdown.config.base').validate(spec)
2323
spec:type('right_pad', 'number')
2424
:nested({ 'unchecked', 'checked' }, function(box)
25-
box:type('icon', 'string'):type('highlight', 'string'):type('scope_highlight', { 'string', 'nil' }):check()
25+
box:type('icon', 'string')
26+
:type('highlight', 'string')
27+
:type('scope_highlight', { 'string', 'nil' })
28+
:check()
2629
end)
2730
:nested('custom', function(boxes)
2831
boxes:each(function(box)

0 commit comments

Comments
 (0)