not a ๐ Bug: LaTeX isn't rendering
Closed this issue ยท 3 comments
4rtemis-4rrow commented
Before reporting:
- Ensure that the issue is reproducable on the main branch.
- Ensure that there isn't an issue on this(either open or closed).
Problem:
I have installed the latex parser for treesitter, I have enabled latex in the config, and markdown is enabled, as far as I know it should be rendering, but given the fact no one has reported this, I know it's an issue in something I'm doing, and not a bug, the following is my markview config
markview.setup({
checkboxes = presets.checkboxes.nerd,
headings = presets.headings.glow_center,
latex = {
enable = true,
--- Bracket conceal configuration.
--- Shows () in specific cases
brackets = {
enable = true,
--- Highlight group for the ()
---@type string
hl = "@punctuation.brackets"
},
--- LaTeX blocks renderer
block = {
enable = true,
--- Highlight group for the block
---@type string
hl = "Code",
--- Virtual text to show on the bottom
--- right.
--- First value is the text and second value
--- is the highlight group.
---@type string[]
text = { "๎ LaTeX ", "Special" }
},
--- Configuration for inline LaTeX maths
inline = {
enable = true
},
--- Configuration for operators(e.g. "\frac{1}{2}")
operators = {
enable = true,
configs = {
sin = {
--- Configuration for the extmark added
--- to the name of the operator(e.g. "\sin").
---
--- see `nvim_buf_set_extmark()` for all the
--- options.
---@type table
operator = {
conceal = "",
virt_text = { { "๐๐๐", "Special" } }
},
--- Configuration for the arguments of this
--- operator.
--- Item index is used to apply the configuration
--- to a specific argument
---@type table[]
args = {
{
--- Extmarks are only added
--- if a config for it exists.
--- Configuration for the extmark
--- added before this argument.
---
--- see `nvim_buf_set_extmark` for more.
before = {},
--- Configuration for the extmark
--- added after this argument.
---
--- see `nvim_buf_set_extmark` for more.
after = {},
--- Configuration for the extmark
--- added to the range of text of
--- this argument.
---
--- see `nvim_buf_set_extmark` for more.
scope = {}
}
}
}
}
},
--- Configuration for LaTeX symbols.
symbols = {
enable = true,
--- Highlight group for the symbols.
---@type string?
hl = "@operator.latex",
--- Allows adding/modifying symbol definitions.
overwrite = {
--- Symbols can either be strings or functions.
--- When the value is a function it receives the buffer
--- id as the parameter.
---
--- The resulting string is then used.
---@param buffer integer.
today = function (buffer)
return os.date("%d %B, %Y");
end
},
--- Create groups of symbols to only change their
--- appearance.
groups = {
{
--- Matcher for this group.
---
--- Can be a list of symbols or a function
--- that takes the symbol as the parameter
--- and either returns true or false.
---
---@type string[] | fun(symbol: string): boolean
match = { "lim", "today" },
--- Highlight group for this group.
---@type string
hl = "Special"
}
}
},
subscript = {
enable = true,
hl = "MarkviewLatexSubscript"
},
superscript = {
enable = true,
hl = "MarkviewLatexSuperscript"
}
},
tables = {
enable = true,
--- Parts for the table border.
---@type { [string]: string[] }
text = {
top = { "โญ", "โ", "โฎ", "โฌ" },
header = { "โ", "โ", "โ" },
separator = { "โ", "โ", "โค", "โผ" },
row = { "โ", "โ", "โ" },
bottom = { "โฐ", "โ", "โฏ", "โด" },
--- Used when table borders are overlapping.
overlap = { "โ", "โ", "โค", "โผ" },
align_left = "โผ",
align_right = "โพ",
align_center = { "โด", "โถ",}
},
--- Highlight groups for the "parts".
---@type { [string]: string[] }
hls = {
top = { "TableHeader", "TableHeader", "TableHeader", "TableHeader" },
header = { "TableHeader", "TableHeader", "TableHeader" },
separator = { "TableHeader", "TableHeader", "TableHeader", "TableHeader" },
row = { "TableBorder", "TableBorder", "TableBorder" },
bottom = { "TableBorder", "TableBorder", "TableBorder", "TableBorder" },
overlap = { "TableBorder", "TableBorder", "TableBorder", "TableBorder" },
align_left = "TableAlignLeft",
align_right = "TableAlignRight",
align_center = { "TableAlignCenter", "TableAlignCenter",}
},
--- Minimum width of a table cell
---@type integer?
col_min_width = 5,
--- When true, top & bottom borders aren't drawn
---@type boolean
block_decorator = true,
--- When true, top & bottom borders are made with
--- virtual lines instead of virtual text.
---@type boolean
use_virt_lines = true
},
list_items = {
enable = true,
--- Amount of spaces that defines an indent
--- level of the list item.
---@type integer
indent_size = 2,
--- Amount of spaces to add per indent level
--- of the list item.
---@type integer
shift_width = 4,
marker_minus = {
add_padding = true,
text = "๎ฉฑ",
hl = "MarkviewListItemMinus"
},
marker_plus = {
add_padding = true,
text = "๎ชซ",
hl = "MarkviewListItemPlus"
},
marker_star = {
add_padding = true,
text = "๎ชฉ",
hl = "MarkviewListItemStar"
},
--- These items do NOT have a text or
--- a hl property!
--- n. Items
marker_dot = {
add_padding = true
},
--- n) Items
marker_parenthesis = {
add_padding = true
}
},
});
vim.cmd("Markview enableAll");
Steps to reproduce the issue:
- I only have markview installed to begin with
- I had just updated like 5 minutes ago
- 0.10.1
- I have markdown, markdown_inline, html, and latex
Expected behavior:
No response
Neovim version:
NVIM v0.10.1
4rtemis-4rrow commented
note that the latex document above is an example curtsy of chatGPT, I didn't want to share any that I wrote
OXY2DEV commented
markview.nvim
doesn't work(by default) on latex files.
Use this in your config.
filetypes = { "markdown", "latex" },
To use it in latex files.
4rtemis-4rrow commented
ohhh, thank you so much
I think this should be in the wiki tbh