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

Angular pack: no template highlighting #498

Closed
osenvosem opened this issue Aug 4, 2023 · 19 comments
Closed

Angular pack: no template highlighting #498

osenvosem opened this issue Aug 4, 2023 · 19 comments
Labels
good first issue Good for newcomers

Comments

@osenvosem
Copy link

Installed the Angular pack but angular templates is still highlighted as simple html files.

Screenshot 2023-08-04 at 19 00 04

Has anyone it working?

@kmiasko
Copy link

kmiasko commented Aug 6, 2023

It's probably mismatch of ABI between angularjs treesitter and newer neovim.

nvim-treesitter/nvim-treesitter-angular#2

You need to build tree sitter plugin manually from fork posted in that issue.

@osenvosem
Copy link
Author

It's probably mismatch of ABI between angularjs treesitter and newer neovim.

I think in this case I would see the corresponding error in checkhealth. There is no error.

If it is necessary to build something manually, why do I need this pack?) In this case the fork should be part of the pack.

@Uzaaft
Copy link
Member

Uzaaft commented Aug 7, 2023

It's probably mismatch of ABI between angularjs treesitter and newer neovim.

I think in this case I would see the corresponding error in checkhealth. There is no error.

If it is necessary to build something manually, why do I need this pack?) In this case the fork should be part of the pack.

Feel free to create a PR then, if you think this fork should be part of the pack. :)

@Uzaaft Uzaaft added the good first issue Good for newcomers label Aug 8, 2023
@Uzaaft
Copy link
Member

Uzaaft commented Aug 12, 2023

Do any of you guys use https://github.com/joeveiga/ng.nvim ? Experiences?

@Uzaaft
Copy link
Member

Uzaaft commented Aug 12, 2023

It's probably mismatch of ABI between angularjs treesitter and newer neovim.

I think in this case I would see the corresponding error in checkhealth. There is no error.

If it is necessary to build something manually, why do I need this pack?) In this case the fork should be part of the pack.

Re this:
The packs tries to solve the initial setup for new users by providing a starting point and an easy to setup solution. Alas, we can't compensate for the bad state of angular TS stuff.

@Uzaaft
Copy link
Member

Uzaaft commented Aug 29, 2023

Going ahead and closing this due to inactivity.

@Uzaaft Uzaaft closed this as not planned Won't fix, can't repro, duplicate, stale Aug 29, 2023
@osenvosem
Copy link
Author

Re this:
The packs tries to solve the initial setup for new users by providing a starting point and an easy to setup solution. Alas, we can't compensate for the bad state of angular TS stuff.

There is a working fork you could use in this pack nvim-treesitter/nvim-treesitter-angular#3

Going ahead and closing this due to inactivity.

While the problem isn't solved.

@Uzaaft
Copy link
Member

Uzaaft commented Nov 5, 2023

Re this:
The packs tries to solve the initial setup for new users by providing a starting point and an easy to setup solution. Alas, we can't compensate for the bad state of angular TS stuff.

There is a working fork you could use in this pack nvim-treesitter/nvim-treesitter-angular#3

Going ahead and closing this due to inactivity.

While the problem isn't solved.

Due to inactivtiy.
An I'm not sure which fix you're refering to by linking that issue...A link to the comment fixing the issue would be more helpfull.

@osenvosem
Copy link
Author

An I'm not sure which fix you're refering to by linking that issue...A link to the comment fixing the issue would be more helpfull.

use({ "elgiano/nvim-treesitter-angular", branch = "topic/jsx-fix" })

@Uzaaft
Copy link
Member

Uzaaft commented Nov 5, 2023

Please check the code in the pack. :)

@osenvosem
Copy link
Author

Please check the code in the pack. :)

Yep, but it still doesn't work while people in the issue stated that it does for them. Don't know why... 🫤

@Uzaaft
Copy link
Member

Uzaaft commented Nov 5, 2023

Please check the code in the pack. :)

Yep, but it still doesn't work while people in the issue stated that it does for them. Don't know why... 🫤

And people are also saying that it DIDN't fix the issue, so 🤷🏾‍♂️

@osenvosem
Copy link
Author

Please check the code in the pack. :)

Yep, but it still doesn't work while people in the issue stated that it does for them. Don't know why... 🫤

And people are also saying that it DIDN't fix the issue, so 🤷🏾‍♂️

It didn't fixed the issue with inline templates.

Here I found the fork with regenerated parser, it should fix the issue with incorrect ABI version https://github.com/ShooTeX/tree-sitter-angular/tree/main

Screenshot 2023-11-05 at 16 38 29

@Uzaaft
Copy link
Member

Uzaaft commented Nov 5, 2023

We'll have to check to see if there are any other issues with that fork. I'll re-open the issue

@Uzaaft Uzaaft reopened this Nov 5, 2023
@osenvosem
Copy link
Author

We'll have to check to see if there are any other issues with that fork. I'll re-open the issue

Thank you.

@osenvosem
Copy link
Author

@Uzaaft cloned repos and applied fixes to each. Could you please try if it's working?

https://github.com/osenvosem/tree-sitter-angular
https://github.com/osenvosem/nvim-treesitter-angular

@Uzaaft
Copy link
Member

Uzaaft commented Nov 21, 2023

@kmiasko Would you be up to testing @osenvosem fix. I myself don't use angular

@Theaninova
Copy link

Doesn't seem to fix everything for me, the Angular thing says it's working but TypeScript is still broken.

The following errors have been detected: ~
- ERROR typescript(injections): ...ed-0.9.4/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 7470 for language typescript
  typescript(injections) is concatenated from the following files:
  |    [OK]:"/nix/store/7m3zm75rdg8bfk17wvjysrd5s361a5h7-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter/queries/ecma/injections.scm"
  |    [OK]:"/nix/store/7m3zm75rdg8bfk17wvjysrd5s361a5h7-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter/queries/ecma/injections.scm"
  | [ERROR]:"/nix/store/7m3zm75rdg8bfk17wvjysrd5s361a5h7-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter/queries/jsx/injections.scm", failed to load: ...ed-0.9.4/share/nvim/runtime/lua/vim/treesitter/query.lua:259: query: invalid node type at position 26 for language typescript
  |    [OK]:"/nix/store/7m3zm75rdg8bfk17wvjysrd5s361a5h7-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter/queries/javascript/injections.scm"
  |    [OK]:"/nix/store/7m3zm75rdg8bfk17wvjysrd5s361a5h7-vim-pack-dir/pack/myNeovimPackages/start/nvim-treesitter/queries/typescript/injections.scm"

@osenvosem
Copy link
Author

The Angular parser has been merged into the nvim-treesitter.

nvim-treesitter/nvim-treesitter@1e74c34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants