Skip to content

Commit cf118dd

Browse files
fix: correctly using freeze_config.config in case is not default values (#10)
* fix: correctly usin `freeze_config.config` in case is not default values * fix: removed `print` * fix: according to `codespell` checks
1 parent 66c4298 commit cf118dd

File tree

3 files changed

+30
-15
lines changed

3 files changed

+30
-15
lines changed

CODE_OF_CONDUCT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Followed is an unmodified [Contributor Covenant Code of Conduct 2.1](https://www
1111
We as members, contributors, and leaders pledge to make participation in our
1212
community a harassment-free experience for everyone, regardless of age, body
1313
size, visible or invisible disability, ethnicity, sex characteristics, gender
14-
identity and expression, level of experience, education, socio-economic status,
14+
identity and expression, level of experience, education, socioeconomic status,
1515
nationality, personal appearance, race, religion, or sexual identity
1616
and orientation.
1717

lua/freeze-code/health.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ local optional_dependencies = {
160160
},
161161
}
162162

163-
---Check if the package is needed by the platorm
163+
---Check if the package is needed by the platform
164164
---@param pkg FreezeCodeHealthPackage
165165
---@return boolean
166166
local check_platform_needed = function(pkg)

lua/freeze-code/init.lua

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -323,19 +323,34 @@ freeze_code.freeze = function(s_line, e_line)
323323

324324
freeze_code.config.output = dir .. "/" .. output .. ".png"
325325

326-
local cmd_args = {
327-
"--output",
328-
freeze_code.config.output,
329-
"--language",
330-
lang,
331-
"--lines",
332-
s_line .. "," .. e_line,
333-
"--config",
334-
conf,
335-
"--theme",
336-
theme,
337-
file,
338-
}
326+
local cmd_args = {}
327+
if conf == "base" or conf == "full" then
328+
cmd_args = {
329+
"--output",
330+
freeze_code.config.output,
331+
"--language",
332+
lang,
333+
"--lines",
334+
s_line .. "," .. e_line,
335+
"--config",
336+
conf,
337+
"--theme",
338+
theme,
339+
file,
340+
}
341+
else
342+
cmd_args = {
343+
"--output",
344+
freeze_code.config.output,
345+
"--language",
346+
lang,
347+
"--lines",
348+
s_line .. "," .. e_line,
349+
"--config",
350+
conf,
351+
file,
352+
}
353+
end
339354

340355
commands.job = {}
341356
commands.job.stdout = vim.loop.new_pipe(false)

0 commit comments

Comments
 (0)