Repository navigation
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The wrapper is not integrated, and library-loading edge cases remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 2
Open (3)
What changed in this PR
Adds a LuaJIT FFI wrapper for Rust-backed LaTeX-to-Unicode conversion in markview.nvim.
Changes:
- Declares C-ABI bindings and conversion helpers.
- Searches shared-library paths with fallback behavior.
- Adds memory cleanup support, but is not yet connected to the existing LaTeX pipeline.
| File | Description |
|---|---|
lua/markview/ffi/math.lua |
Adds the FFI-based LaTeX conversion bridge. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| void latex_unicode_free(char* ptr); | ||
| ]] | ||
|
|
||
| local M = {} |
Comment on lines
+14
to
+18
| local home = os.getenv("HOME") | ||
| local candidates = { | ||
| home .. "/Labs/KpihX-Labs/latex-to-unicode/target/release/liblatex_to_unicode_c_api.so", | ||
| home .. "/.local/lib/liblatex_to_unicode_c_api.so", | ||
| "/usr/local/lib/liblatex_to_unicode_c_api.so", |
| end | ||
|
|
||
| function M.init() | ||
| if lib then return true end |
Owner
|
Please explain to me what is the advantage of using this over any other latex renderers. People are less likely to use a feature if it requires extra steps to set up, which is the whole point of the plugin, to have everything "just work" out of the box without any extra steps. |
Anchor virt_lines on the previous visible row and conceal_lines the math block so Markview no longer stacks ASCII Unicode on top of raw LaTeX.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description
This PR introduces high-performance LaTeX-to-Unicode mathematical conversion support for
markview.nvimvia a zero-dependency C-ABI FFI layer backed bylatex-to-unicode.Highlights
Co-authored-by: Ivann H. KAMDEM POUOKAM (KpihX) kapoivha@gmail.com