Skip to content

Commit 7bf951b

Browse files
fix: allow sign when both language_icon & language_name are false
## Details Added some early return logic when handling a code block language based on the values of `language_icon` & `language_name`. However users might still want signs in this case and that should be specifically disabled via the `sign` option. It's unintuitive that disabling the other `language_*` options results in disabling the `sign` as well. The fix simply removes the early return. We'll still avoid adding virtual text as it will end up empty later in the function.
1 parent 8ee2701 commit 7bf951b

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
[62d6681](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/62d6681332365cfddbe916c888752834d9f7ad0c)
1111
- improved completions [9f4ef68](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/9f4ef684da01016c270af2bc2b862eb6823aa7ab)
1212
- filter command completions [#372](https://github.com/MeanderingProgrammer/render-markdown.nvim/pull/372)
13+
- improved advice in checkhealth [5cec1bb](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/5cec1bb5fb11079a88fd5b3abd9c94867aec5945)
14+
- avoid inline text for checkboxes when possible [#378](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/378)
15+
[f9badfb](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/f9badfb5907a16c8e0d5f3c157d63bcea2aa555e)
16+
- `code.language_icon` option [#376](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/376)
17+
[8ee2701](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/8ee2701a6c4cdaef7ea0b27c13c26971ae3c9761)
1318

1419
### Bug Fixes
1520

lua/render-markdown/health.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ local state = require('render-markdown.state')
55
local M = {}
66

77
---@private
8-
M.version = '8.1.11'
8+
M.version = '8.1.12'
99

1010
function M.check()
1111
M.start('version')

lua/render-markdown/render/code.lua

-3
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ function Render:language()
113113
if not vim.tbl_contains({ 'language', 'full' }, self.code.style) then
114114
return false
115115
end
116-
if not self.code.language_icon and not self.code.language_name then
117-
return false
118-
end
119116

120117
local node, padding = self.data.language_node, self.data.language_padding
121118
if node == nil then

0 commit comments

Comments
 (0)