[BUG] Insane delay after pressing enter
throwaway-squared opened this issue · comments
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
ive seen only one guy describe the same issue
when i press enter to get a new line in insert mode, it takes a good few seconds before nvim catches up and actually draws to the screen, although my input is still read and i can still type whats supposed to be in the next line, it just takes a while to actually show it
this only happens when flutter-tools is running (ive only tested it on the lib/main.dart file)
Expected Behavior
upon pressing enter, a new line should be created without a delay of drawing it to the screen
Steps To Reproduce
- have my configuration (idk if this happens with other configs)
- open a dart file (mainly lib/main.dart in a flutter project)
- type some code
- press enter
should be noted that it seems to appear more often when splitting brackets in this manner]
(| is the cursor):- appBar: AppBar(|)
- press enter
Environment
Markdown
- OS:
Artix Linux
6.5.5-artix1-1
- Flutter version:
Flutter 3.13.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ead455963c (11 days ago) • 2023-09-26 18:28:17 -0700
Engine • revision a794cf2681
Tools • Dart 3.1.3 • DevTools 2.25.0
- Is flutter in $PATH: yes definitely
- neovim:
NVIM v0.9.2
Build type: Release
LuaJIT 2.1.1694285958
nvim config: https://codeberg.org/qube/dot-squared/src/branch/main/.config/nvim
### Anything else?
_No response_
For whatever it's worth, I'm having this issue as well, and only with dartls. Other language servers I'm using (C#, lua, markdown, some others) don't show this issue. I haven't been able to find anything else on the internet about it.
From what i searched, the problem is with dart treesitter when it idents something. When i was searching about this i found two temporary solutions that worked for others:
Removing dart treesitter
Disabling dart treesitter ident
I don't know if this will help you, but it doesn't hurt to try.
This plugin isn't responsible for all things dart/flutter related in neovim, only the language server for the most part and setting it up with extensions. I can't reproduce this issue and the issue itself doesn't contain a minimal reproduction without a bunch of other plugins/logic. I think the links above are the most likely culprit. If someone is able to directly tie this to something specific this plugin is doing please post here and I'll re-open otherwise I don't think this issue is truly here.