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

Freeze on indenting dot after comma #166

Open
robgssp opened this issue Jun 23, 2022 · 1 comment
Open

Freeze on indenting dot after comma #166

robgssp opened this issue Jun 23, 2022 · 1 comment

Comments

@robgssp
Copy link

robgssp commented Jun 23, 2022

I hit this while reformatting. Minimal repro:

,
  .a

Reindenting the second line in typescript-mode freezes emacs.

Emacs 28.1, typescript-mode 20220617.1901

@josteink
Copy link
Member

Hey there and thanks for the report!

The good news is that I can confirm your easy repro case freezes my Emacs too (until I press CTRL-G). The bad news is typescript.el is kinda "legacy" at this point.

Going forward we're going to be using tree-sitter based-parsing instead of Elisp-based parsing, which is very complicated and involved for grammars like TypeScript.

There was one prototype for that which should be compatible with "any" Emacs-version: typescript-tree-sitter-mode from this very repo (although in a feature-branch).

But going forward native tree-sitter support is going to be added to mainline Emacs, and efforts in writing a major-mode for that has been pioneered by @theothornhill at Sourcehut, although this currently only runs with latest Emacs built from source, branch feature/tree-sitter.

I've tested with both these implementations and none of those have this issue.

As such, I don't think this is going to be fixed in the legacy "Elisp" version.

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

2 participants