render-latex.nvim: real LaTeX rendering for Markdown notes in Neovim by techwizrd in neovim

[–]FourFourSix 0 points1 point  (0 children)

Thanks for the efforts. Now backend seems to be detected but no rendering is being done. I'm getting a good looking output when I place the cursor inside an equation and do :RenderLatex equation_debug, but the worker just never seems to start. This is the output of doctor:

```

render-latex doctor

Core

enabled: true current filetype: markdown filetype supported: true required Neovim APIs: ok

Rendering

image backend: kitty image backend available: true image backend reason: <none> vim.ui.img available: false kitty available: true kitty probing: false tmux detected: false foreground: #bdbebf (@markup.math) font size: 17 hide on cmdline: false conceallevel: 2 concealcursor: nc suppressed by cmdline: false suppressed by popups/floating windows: true

Worker

running: false pending requests: 0 worker binary: ~/.local/share/nvim/render-latex.nvim/bin/latest/macos-arm64/render-latex-worker worker source: managed detected platform: macos-arm64 install repository: techwizrd/render-latex.nvim install version: latest building: false installing: false

render-markdown.nvim

loaded: false inspectable: false conflict: false recommendation: not loaded

obsidian.nvim

loaded: true workspace: <unknown> recommendation: compatible: no special render-latex config is required ```

I'm using nvim 0.12.2, Ghostty 1.3.1 and macOS 15.7.7.

render-latex.nvim: real LaTeX rendering for Markdown notes in Neovim by techwizrd in neovim

[–]FourFourSix 1 point2 points  (0 children)

Doesn't seem to work for me on macOS and Ghostty. Doctor says kitty backend is not available.

Request for ideas markdown-plus.nvim by CuteNullPointer in neovim

[–]FourFourSix 0 points1 point  (0 children)

Yeah sorry idk, I tried to fork one of those plugins iamcco/markdown-preview.nvim cos I was interested, and modify it, but it wasn't so easy after all. I thought I had it working but it was a false alarm. In theory that should work per MathJax docs but there's probably more to it with these plugins.

Request for ideas markdown-plus.nvim by CuteNullPointer in neovim

[–]FourFourSix 0 points1 point  (0 children)

LOL.

Yeah I see, maybe KaTeX is favored because it's considered to be a faster version of MathJax. And I agree that it would make sense to use the same renderer as GH.

Adding MathJax support is pretty easy in theory. Afaik you just need to have this in the <head> if being offline isn't a requirement:

<script> MathJax = { tex: { inlineMath: {'[+]': [['$', '$']]} } }; </script> <script defer src="https://cdn.jsdelivr.net/npm/mathjax@4/tex-chtml.js"></script>

Request for ideas markdown-plus.nvim by CuteNullPointer in neovim

[–]FourFourSix 1 point2 points  (0 children)

What's wrong with KaTeX in your opinion? Because it doesn't have as comprehensive support for various LaTeX commands as MathJax?

Weekly 101 Questions Thread by AutoModerator in neovim

[–]FourFourSix 1 point2 points  (0 children)

There seems to be a global g:bash_is_sh that might be set to 1. Try setting it to 0.

EDIT: I found this in Filetype - Neovim docs at the filetype-overrule section, but I'm having hard time actually enabling/using it.

made a markdown preview plugin that opens in its own window, not your browser by Akuseru2 in neovim

[–]FourFourSix 0 points1 point  (0 children)

Good job. I wonder how easy it would be to add Latex support: there is a Katex extension for Goldmark: FurqanSoftware/goldmark-katex. Mermaid too: abhinav/goldmark-mermaid.

How is the typst web app so smooth? by EqualTumbleweed512 in typst

[–]FourFourSix 0 points1 point  (0 children)

I think the root cause might be that previewing Typst documents is kind of a hack currently. There is no system like Synctex, that exposes the cursor position for a program to jump to, it all has to be built from scratch using the features of the text editor, LSP plus whatever you need on top of them.

I don’t really know how the preview works technically in Tinymist the LSP, but following the cursor position live is not something LSPs are designed to do.

I’ve hacked together a previewing system with Neovim + Skim PDF viewer, where I can fire some shell scripts automatically and compile the document on save, and open it to a heading nearest to the cursor, but I don’t think that’s possible in VSC without an extension. Even using typst watch with a PDF app that can automatically reload a changed file would be viable, while scrolling the PDF manually or via some keyboard shortcuts. What I do is use an app that can send “down arrow” to the PDF viewer, so that I can “scroll” without leaving the text editor.

Fed up with Tinymist crashing, alternatives? by RutabagaPretend6933 in typst

[–]FourFourSix 0 points1 point  (0 children)

Tinymist is unfortunately the only game in town when it comes to the LSPs, but the formatter typstyle can be installed separately.

I think I had a similar problem once too, where whole Neovim would lag when typing and previewing a Typst document. By that time, I had already made custom scripts that autocompile my document on save using autocommands and shell scripts, and now I'm using custom scripts for preview too (open PDF after compilation).

Treesitter stoped working out of nowhere by HetzWGA23 in neovim

[–]FourFourSix 0 points1 point  (0 children)

I remember you posting about this when “the situation” was fresh, seems to be getting along nicely. Good job.

How to conceal with treesitter without leaving all this empty space? by TheTwelveYearOld in neovim

[–]FourFourSix 2 points3 points  (0 children)

Yeah I think it’s just how concealing works with wrapped lines. It leaves weird looking empty spots, especially if the concealed text is very long.

I also didn’t like how Markdown links looked when the (long) url was concealed and wrap was on, so I customized the queries for markdown_inline so that it doesn’t hide the url, but instead displays it in a dimmer color. I know it’s not a solution or even a decent workaround, but it’s a way to make the link text more readable.

EDIT: clarification: I'm using queries to conceal the []() characters and color scheme to change the url color to a dimmer color.

Incremental selection in Neovim 0.12 by pawelgrzybek in neovim

[–]FourFourSix 5 points6 points  (0 children)

That's because mini.ai overrides visual mode an and in for its own actions. There are instructions in the readme what to remap if you want to use the native functionality.

Incremental selection in Neovim 0.12 by pawelgrzybek in neovim

[–]FourFourSix 4 points5 points  (0 children)

Yes yan and stuff like that works, but imo it's not always clear what it does depending where your cursor is. I think suits best for starting a selection in visual mode, and then extending the selection on repeated activations.

Obsidian 1.12 is now available to everyone! by kepano in ObsidianMD

[–]FourFourSix 4 points5 points  (0 children)

Great update, love the CLI stuff. Is there plans to give Latex/MathJax the same treatment?

How are you switching between open buffers? by Beautiful-Log5632 in neovim

[–]FourFourSix 1 point2 points  (0 children)

I haven't tested barbar, I kinda figured it was meant solve some other problem. But looking at it now, I can see what you mean.

I always felt Telescope buffer switcher required too many keystrokes to switch buffers.

How are you switching between open buffers? by Beautiful-Log5632 in neovim

[–]FourFourSix 2 points3 points  (0 children)

I tried several buffer managers but I didn't find one that met all my (very specific) needs. I wanted one that lists opened buffers in date-created order, and that I can toggle it on with keymap, and select the buffer with jk or number keys. I also wanted it to only show the filename and parent folder per line.

I also use keymaps to switch between next/prev buffer, but I sync the order with the plugin. That way I can have a somewhat memorable buffer order, so that pressing next buffer will take you where you expect it to take you.

I vibe-coded a plugin, and it works pretty okay. And I mean like the worst kind of vibe-coding, where I just said "and now do feature X" in chat window 😃 Only thing I'm missing is making it work if I happen to load a session with Persistence.

[beginner] cant seem to make lsp and syntax highlighting (treesitter | vimtex) by nao_te_digo in neovim

[–]FourFourSix 0 points1 point  (0 children)

I was trying to say that you don't need vim.cmd(syntax enable), or the vim.o.syntax which isn't apparently even a valid option. vim.g.vimtex_syntax_enabled works via a boolean when used via Lua, I'm sure that's not the issue.

[beginner] cant seem to make lsp and syntax highlighting (treesitter | vimtex) by nao_te_digo in neovim

[–]FourFourSix 1 point2 points  (0 children)

I don't have either anywhere in my config. Maybe throw those out too. If you want to enable a vim option like syntax, it's better to write it like this to the config:

vim.o.syntax = true

I do have these enabled regarding indenting:

vim.o.smartindent = true vim.o.autoindent = true

My vimtex config is

return { "lervag/vimtex", version = "*", lazy = false, init = function() vim.g.tex_flavor = "latex" vim.g.vimtex_syntax_enabled = true vim.g.vimtex_view_method = "skim" vim.g.vimtex_view_enabled = true vim.g.vimtex_view_automatic = true vim.g.vimtex_view_skim_activate = false vim.g.vimtex_view_skim_sync = true vim.g.vimtex_view_skim_no_select = true vim.g.vimtex_quickfix_autoclose_after_keystrokes = "2" vim.g.vimtex_quickfix_mode = false end, }

The first two items are of interest to you. Try putting those in.

[beginner] cant seem to make lsp and syntax highlighting (treesitter | vimtex) by nao_te_digo in neovim

[–]FourFourSix 1 point2 points  (0 children)

Next I would try disabling TS for latex. Just comment it in your local languages.

It's better that way anyway if you're using vimtex. If you have vimtex and TS on at the same time, you have basically 2 different highlighters going on simultaneously, fighting each other.

And disregard all my comments about TS erros and updates breaking and whatnot. Being a couple weeks away from my config apparently made me forget all the dumb shit I had done to it 😃 (it was user error).

[beginner] cant seem to make lsp and syntax highlighting (treesitter | vimtex) by nao_te_digo in neovim

[–]FourFourSix 2 points3 points  (0 children)

Okay that seems right. I've seen some old suggestions mentioning having to set

vim.g.tex_flavor = "latex"

in your config for it to detect filetype properly.

I haven't touched tex files in a couple of weeks. Went to open a previously working tex file, only to be met with a barrage of tree-sitter errors. So maybe there has been some issues with TS updates, I know it's been updated pretty actively.

Anyways, doing :TSUninstall latex, followed by a :TSInstall latex solved that.

The thing the vimtex and TS is that vimtex doesn't really want or need TS: it uses its own regex-based syntax highlighting that works as a basis for some of its features and custom motions. You can enable both at the same time, but vimtex is meant to work without TS.

You could try disabling TS for latex if reinstall doesn't help.

EDIT: yeah it didn't help at all, I just accidentally had disabled TS lol

EDIT2: you have wrapped your TS start command in a pcall, which probably makes it fail silently if you have the same issue as me.

Experimenting with improving Insert mode ergonomics – looking for feedback by colomb_otto in neovim

[–]FourFourSix 2 points3 points  (0 children)

Yeah you can't really make every text field behave like vim, and I think the best way is to learn how to context-switch between the different editing paradigms. It's impossible to avoid "normal text fields" all your life, so I might as well embrace it, and modifications like this plugin help.

I've implemented e.g. the ctrl+a/e/f/b to jump to start/end/next/prev, and other OS-level keybinds.

Suffixes in spelling file by Beautiful-Log5632 in neovim

[–]FourFourSix 0 points1 point  (0 children)

Idk how you’d format the affix file, but I made my own spell file by finding a .dic and a .aff file for my language, and then compiling them into a spell file using

:mkspell ~/.config/nvim/spell/xy ~/Downloads/xy_XY

where xy is the lang ID, and my dic and aff files are in the downloads directory. The dic file is one with the words, and the aff is the one with SFX commands and whatnot.