Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insane lag when editing Fennel in Markdown code blocks #53

Closed
enderger opened this issue Jul 6, 2021 · 10 comments
Closed

Insane lag when editing Fennel in Markdown code blocks #53

enderger opened this issue Jul 6, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@enderger
Copy link

enderger commented Jul 6, 2021

For some reason, editing Fennel embedded in a Markdown code block produces large amounts of lag.
lag-example
I don't quite know what causes this, but I can say that it gets worse quickly.

@Olical
Copy link
Owner

Olical commented Jul 7, 2021

Hey there, would you be able to elaborate a bit here? I can't reproduce this at all.

Conjure doesn't run or even load in markdown files, so I presume you're using some plugin to embed filetypes within other filetypes (through TreeSitter?) and I guess that's having some weird interaction with Conjure.

I would guess your autocomplete is running, failing and consuming a lot of CPU, but that's a wild guess. Any plugins you're using to do this would be useful for reproduction. Thanks!

@Olical
Copy link
Owner

Olical commented Jul 7, 2021

If you could try turning off Conjure's completion etc (see the :help files) and see if the problem goes away, that'd be really good! And if you're using tree sitter, you can enable the experimental treesitter form extraction code, again, in :help conjure if you have a grep for treesitter.

@Olical
Copy link
Owner

Olical commented Jul 7, 2021

Oh I assumed this was Conjure, if you're only using Aniseed then I don't see how this would make a difference, Aniseed has no interactive components whatsoever, so I doubt it's Aniseed at all in that case.

@Olical Olical added the bug Something isn't working label Jul 7, 2021
@enderger
Copy link
Author

enderger commented Jul 7, 2021

Unfortunately, disabling Aniseed appears to fix the problem, as does switching into Clojure mode. I presume that Aniseed tries to load something more than just syntax highlighting when embedded in Markdown, causing lag on failure.

@Olical
Copy link
Owner

Olical commented Jul 10, 2021

I can't reproduce this at all though, if I have a code block in markdown it's just unhighlighted code, so I presume you have a plugin to enable sub-language support in buffers? That leans on TreeSitter somehow?

I'm afraid I won't be able to reproduce this until I can reproduce the exact setup you're using. I would imagine it's to do with how your language-in-language thing is implemented but I can't be sure.

Maybe disabling omnicompletion support will help?

let g:conjure#completion#omnifunc = v:null

@enderger
Copy link
Author

enderger commented Jul 11, 2021

Ok, forgot I had Polyglot providing Markdown support. If vim-markdown is installed and the following is set, the issue should occur.

(set nvim.g.markdown_fenced_languages ["fennel"])

@Olical
Copy link
Owner

Olical commented Jul 18, 2021

Hmm, huge guess but is this issue related perhaps? preservim/vim-markdown#162 they mention setting let g:vim_markdown_folding_disabled = 1 (presumably at startup before you enter the markdown buffer)

Does that magically fix the issue?

@enderger
Copy link
Author

Unfortunately not.

@Olical
Copy link
Owner

Olical commented Aug 13, 2021

I think this is related to the mentioned Conjure issue, it's really something to do with readline being installed alongside fennel and running the REPL in a headless environment. I'm not sure why, but I've set the recommended TERM=dumb environment variable on the develop branch of Conjure now.

Updating to that should fix your problem since it seems like you were running into the exact same thing. If this is no longer an issue for you due to it being fixed or not using the tooling any more please feel free to close it. Thanks!

@Olical
Copy link
Owner

Olical commented Aug 21, 2021

I'm going to close this assuming that my recent work fixed it and it wasn't to do with markdown, but readline slowing things down for some unknown reason.

Please feel free to reopen if you've updated everything and you're still having this issue. I'll try to reproduce it and get to the bottom of it.

@Olical Olical closed this as completed Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants