UserNobody14 / tree-sitter-dart

Attempt to make a tree-sitter grammar for dart
MIT License
62 stars 40 forks source link

Delay in commands #48

Open RobertBrunhage opened 1 year ago

RobertBrunhage commented 1 year ago

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 commented 1 year ago

nvim-treesitter/nvim-treesitter#4945

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

Also duplicate of #46

justjew commented 1 year ago

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 commented 1 year ago

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

RyanCarrier commented 1 year ago

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 commented 10 months ago

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'},
        },