-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Dartls is Extremely Slow when inserting a new line #2802
Comments
The reason why I commented |
Can't debug your config for you. This repo is just a set of configs, not a support channel. |
I fixed it by removing TreeSitter is the problem, not the dart lsp |
Oh, thank you. It is working well right now. |
Specifically, it appears to be the indentation behaviour of the treesitter. You can check this by disabling indent for the current buffer with |
I fixed this issue by adding the follow line to my Treesitter setup: |
Nice! |
Description
Hello.
I have not been using Nvim-lspconfig because I used the Mason, especially Mason-Lspconfig, as a LSP configuration tool. Of course, Mason provides nice UIs and many features for handling the language server protocols that are manipulated by Nvim-Lspconfig. (It it is not true, let me know)
However, Mason started not providing
Dartls
lsp for some reason. So, I started using Nvim-lspconfig directly to setup the environment for Dart, not through Mason. This is the lua file for configuring Mason. And this part is where I set theDartls
directly.How I installed Dart
I want to share how I installed Dart because this might have been the problem.
export PATH=/opt/homebrew/bin:$PATH
to~/.zshrc
and~/.bashrc
because I had this problem.brew tap dart-lang/dart
brew install dart
The below log is what I could see when I run
brew info dart
.Dart Version -
dart --version
Like I mentioned, Mason provides countless features for handling the lsps that are manipulated by Nvim-Lspconfig. That is also the reason why I do not know where this problem happens. I thought I had this problem because my computer has problems that I do not know, so I reseted(like, factory reset) my computer but the problem remains.
Neovim version
NVIM v0.9.1
Build type: Release
LuaJIT 2.1.0-beta3
Nvim-lspconfig version
93c6826
Operating system and version
macOS Ventura 13.5.1
Affected language servers
dartls
Steps to reproduce
something.dart
. The file should be in the folder that haspubspec.yaml
.Enter
Actual behavior
Every time I insert a new line in any types of Dart file, it takes a few seconds without doing anything(maybe it is calculating or something...?).
Expected behavior
What I expect it to do is to NOT take a few seconds every time I insert a new line obviously. Think what happen when you code in TypeScript, does it freeze when you type enter? No. However, it does for some reason.
Minimal config
LSP log
https://gist.github.com/cattynip/20b938c15e2c20625fadada5837d0202
The text was updated successfully, but these errors were encountered: