Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lua/orgmode/utils/treesitter/install.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local M = {
compilers = { 'tree-sitter', vim.fn.getenv('CC'), 'cc', 'gcc', 'clang', 'cl', 'zig' },
}

local required_version = '2.0.0'
local required_version = '2.0.2'

function M.install()
local version_info = M.get_version_info()
Expand Down
2 changes: 2 additions & 0 deletions queries/org/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
(dynamic_block parameter: (expr) @org.block)
(property_drawer (property name: (expr) @org.properties.name)) @org.properties
(latex_env) @org.latex_env
(inline_math_block) @org.latex
(display_math_block) @org.latex
(drawer) @org.drawer
(tag_list) @org.tag
(directive name: (expr) @_directive_name value: (value) @org.tag (#match? @_directive_name "\\c^filetags$"))
Expand Down
10 changes: 8 additions & 2 deletions queries/org/images.scm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
(#set! image.ext "math.tex"))

(latex_env
(contents) @image.content
(#set! injection.language "latex")
(#set! image.ext "math.tex"))
(#set! image.ext "math.tex")) @image.content @image

(inline_math_block
(#set! injection.language "latex")
(#set! image.ext "math.tex")) @image.content @image

(display_math_block
(#set! injection.language "latex")
(#set! image.ext "math.tex")) @image.content @image
6 changes: 2 additions & 4 deletions tests/plenary/colors/highlighter_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,8 @@ describe('highlighter', function()
[[this is \[1 + 1\] math]],
[[this is \{1 + 1\} math]],
})
assert.are.same(3, #extmarks)
assert_extmark(extmarks[1], { line = 0, start_col = 8, end_col = 17, hl_group = '@org.latex' })
assert_extmark(extmarks[2], { line = 1, start_col = 8, end_col = 17, hl_group = '@org.latex' })
assert_extmark(extmarks[3], { line = 2, start_col = 8, end_col = 17, hl_group = '@org.latex' })
assert.are.same(1, #extmarks)
assert_extmark(extmarks[1], { line = 2, start_col = 8, end_col = 17, hl_group = '@org.latex' })
end)
end)
end)