helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
32.93k stars 2.43k forks source link

dartls new line freezes editor #8714

Open itamarsch opened 10 months ago

itamarsch commented 10 months ago

Summary

When I press o (or create a new line in any other way) in a dart file the editor freezes for 3-4 seconds and then creates the new line

After the first new line other new lines work just fine but once I open the editor again it reoccurs

Screen recording of the issue

Reproduction Steps

New installation of flutter (3.13.9) New installation of helix (23.10)

Open a dart file in a project of mine

press o

Helix log

log.txt

Platform

Linux

Terminal Emulator

gnome terminal (happened on kitty to)

Installation Method

dnf

Helix Version

23.10

ryosoul commented 10 months ago

I have the same problem on MacOS.

pascalkuthe commented 10 months ago

Open a dart file in a project of mine

With a specific file where this occurs this is not reproducible. Please provide a setup we can test ourselves.

itamarsch commented 10 months ago

Open a dart file in a project of mine

With a specific file where this occurs this is not reproducible. Please provide a setup we can test ourselves.

It didn't matter which file, it even happened on a new project (flutter create)

gabydd commented 10 months ago

this seems to be a problem with the tree-sitter grammar/indent queries, you don't need to have dartls installed all you need is a dart file with:

{
}

and to have the proper runtime setup, then when you open it, on the initial o or a<enter> it will take a couple seconds to actually make the newline

itamarsch commented 10 months ago

https://github.com/nvim-treesitter/nvim-treesitter/issues/4945

itamarsch commented 10 months ago

This issue is unrelated to helix and from the looks of things is trying to be fixed

ryosoul commented 10 months ago

Look's there a work around by disabling the indent on the lsp server. https://github.com/NvChad/NvChad/issues/2237#issuecomment-1653019941

Any one know how can we do that on helix config?

pascalkuthe commented 10 months ago

This has nothing to do with the LSP Server. Indentstion is handled by treesitter.

It's not possible to manually disable them for a single language. You could delete the dart query files I supposed but this needs to be fixed in TS

itamarsch commented 7 months ago

Is there an update on a way to fix this in helix?