Skip to content
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

Delay in commands #48

Open
RobertBrunhage opened this issue Jun 14, 2023 · 5 comments
Open

Delay in commands #48

RobertBrunhage opened this issue Jun 14, 2023 · 5 comments

Comments

@RobertBrunhage
Copy link

When pressing o or O it's now taking up to a second or two to execute the command and after doing it a couple of times it's instant.

I tried uninstalling treesitter dart and it was now instant. How should I go about debugging it so I can get you some better logs?

@lucario387
Copy link

lucario387 commented Jun 14, 2023

nvim-treesitter/nvim-treesitter#4945

This is a duplicate of the above issue, and yes it's being investigated

Also duplicate of #46

@justjew
Copy link

justjew commented Aug 3, 2023

I am having this problem too

dart 3.0.6
neovim 0.9.1

No errors in healthcheck

nvim-treesitter: require("nvim-treesitter.health").check()

Installation ~
- OK `tree-sitter` found 0.20.8 (parser generator, only needed for :TSInstallFromGrammar)
- OK `node` found v16.16.0 (only needed for :TSInstallFromGrammar)
- OK `git` executable found.
- OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
  Version: Apple clang version 14.0.3 (clang-1403.0.22.14.1)
- OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

OS Info:
{
  machine = "arm64",
  release = "22.3.0",
  sysname = "Darwin",
  version = "Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000"
} ~

Parser/Features         H L F I J
  - c                   ✓ ✓ ✓ ✓ ✓
  - cpp                 ✓ ✓ ✓ ✓ ✓
  - dart                ✓ ✓ ✓ ✓ ✓
  - go                  ✓ ✓ ✓ ✓ ✓
  - lua                 ✓ ✓ ✓ ✓ ✓
  - python              ✓ ✓ ✓ ✓ ✓
  - query               ✓ ✓ ✓ ✓ ✓
  - rust                ✓ ✓ ✓ ✓ ✓
  - vim                 ✓ ✓ ✓ . ✓
  - vimdoc              ✓ . . . ✓

  Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
         +) multiple parsers found, only one will be used
         x) errors found in the query, try to run :TSUpdate {lang} ~

@Odas0R
Copy link

Odas0R commented Aug 11, 2023

Same problem here. Did some dotfiles cleanup recently, updated the config, and unusable on dart :(

@RyanCarrier
Copy link

Have a check if removing/disabling selecting of text objects in your config.
That's what was slowing mine down on file open primarily, could be the same here.

@Dieal
Copy link

Dieal commented Jan 6, 2024

I think I fixed my lag problems.

As mentioned by @RyanCarrier, to improve startup times you could remove textobjects from your configuration (it worked for me). As for the delay when typing 'o' and 'O', you can remove indentation in require('nvim-treesitter.configs').setup for dart files, as follows:

        indent = {
          enable = true,
          disable = {'dart'},
        },

bardusco added a commit to bardusco/kickstart.nvim that referenced this issue Jan 29, 2024
…o delays

This commit updates the treesitter setup in `treesitter-setup.lua` to address
performance issues when editing Dart files. A significant delay was observed
when creating new lines in Dart files, as reported in multiple issues [1][2][3].
To mitigate this, the indent and textobjects configurations for Dart have been
disabled. This should prevent the editor from hanging and improve the overall
user experience when working with Dart code.

The commit also includes a small change where 'rust' was removed from the list
of languages in `ensure_installed` to match the project's current requirements.
The line was refactored for consistency.

References:
- [1] UserNobody14/tree-sitter-dart#48
- [2] UserNobody14/tree-sitter-dart#46
- [3] nvim-treesitter/nvim-treesitter#4945
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants