Skip to content

Commit c2aadfb

Browse files
committed
latex
1 parent 18eafdf commit c2aadfb

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

lua/config/plugin_config.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,13 @@ if render_markdown_ok and not is_vscode then
375375
render_markdown.setup({
376376
file_types = { "markdown" },
377377
completions = { lsp = { enabled = true } },
378+
latex = {
379+
enabled = true,
380+
converter = { "utftex", "latex2text" },
381+
inline = true,
382+
block = true,
383+
position = "center",
384+
},
378385
})
379386
vim.keymap.set("n", "<leader>mr", "<cmd>RenderMarkdown toggle<CR>", { desc = "Toggle markdown rendering" })
380387
end
@@ -389,6 +396,7 @@ if obsidian_ok then
389396
end
390397
obsidian.setup({
391398
legacy_commands = false, -- use :Obsidian <subcommand>; legacy :Obsidian* commands warn at startup
399+
ui = { enable = false },
392400
workspaces = {
393401
{
394402
name = "notes",

lua/config/treesitter.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ local parser_repos = {
3535
url = "https://github.com/tree-sitter-grammars/tree-sitter-markdown",
3636
location = "tree-sitter-markdown-inline",
3737
},
38+
{ lang = "latex", url = "https://github.com/latex-lsp/tree-sitter-latex" },
3839
}
3940

4041
-- this function needs to be updated occasionally, as of 260130, glibc should be at least 2.30
@@ -95,6 +96,7 @@ local function ts_install()
9596
"tsx",
9697
"markdown",
9798
"markdown_inline",
99+
"latex",
98100
})
99101
end
100102
end

0 commit comments

Comments
 (0)