[BUG] Syntax highlighting not working immediately
paulkre opened this issue · comments
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
When opening the first Dart file after starting Neovim, the code is not highlighted correctly. After making any change to the code (like inserting a new line) the syntax highlighting updates and works correctly.
This is how the code looks on first startup:
And this is how the code looks after any change:
Expected Behavior
The colors of the syntax highlighting should be correct immediately.
Steps To Reproduce
- Create a new project with
flutter create my_app
- Open
main.dart
Environment
- OS: macOS 14.0
- Flutter version: 3.13.9
- Is flutter in $PATH: yes
- neovim version: 0.9.2
Anything else?
No response
This plugin has no relationship to syntax highlighting. It doesn't add any. This is all handled by either neovim's syntax functionality or semantic highlighting from the lsp but neither of these things are configured or handled here
Do you by chance know a function to make neovim rerender the buffer after the LSP has been initialized? Then I could maybe call it in on_attach
.
You can use vim.cmd(':e')
otherwise check reddit as I believe doing this will definitely have been discussed there