Syntax highlights available on file open. #242
-
Feature descriptionRecently migrated off rust tools and the only difference I'm noticing is that the syntax highlighting does not kick in until after rust analyzer completes, where as in rust tools it was immediately available. I only notice this on the first file I open. If the analyzer is running, and I open a different file in the project, I see syntax highlighting, but the initial file will only be highlighted after analyzer completes. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
Hey 👋 rustaceanvim doesn't do syntax highlighting (neither does rust-tools). rust-analyzer does provide semantic tokens that neovim uses for syntax highlighting, but when they become available depends on the startup time of rust-analyzer. rustaceanvim has no influence on that. Are you sure you were using the same environment with both rust-tools and rustaceanvim? Closing and converting to a discussion. |
Beta Was this translation helpful? Give feedback.
-
Hi, I'm getting a similar problem. I noticed that running |
Beta Was this translation helpful? Give feedback.
-
syntaxhighlight.mp4Here is a video of the behavior I am seeing. The syntax highlighting works, you can see it's just delayed until after the analyzer completes. It's even stranger that it works in the preview window, and if I switch from the first file I opened. Feel free to skip to about 40s to skip the analyzer running. |
Beta Was this translation helpful? Give feedback.
Ah, that error message helps a lot 😄
It appears to be due to a bug that was introduced in #93
(very strange that I haven't encountered it myself yet).
It should be fixed with #244.