Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Enhanced the syntax support (WIP) #1

Closed
wants to merge 74 commits into from

Conversation

zealot128
Copy link

Recently, I've switched to treesitter with Neovim, but found out, that Pug support is not included, yet. Then I found for repo which is a good start!

I added the following syntax that i use regularly:

  • inner pipe content:
div
  | bar
  • inline js:
div(:foo='inlineJsHere()' v-if='AndHere()')
  | inline js: {{ 1 + 1 === 2 }}
  • wrapped tags:
div.bar: div.foo: div.blub Finally content here

@zealot128 zealot128 changed the title Enhanced the syntax support Enhanced the syntax support (WIP) Jul 11, 2021
- Multi line pipe blocks support
- wrapped tags: div: div Foo
- inline JS (non Multiline)
- Added vue-attributes
- refac rules
@zealot128 zealot128 force-pushed the master branch 2 times, most recently from 034d4d1 to 166eb2e Compare July 13, 2021 13:08
bindings/*, parser.c must be checked in, too, otherwise GH Actions cannot build
@zealot128
Copy link
Author

Added:

  • Github action for test
  • much more syntax, see corpus

@RianFuro
Copy link
Owner

Hey, thanks for sharing!

I'll gladly take your contribution, however I'd like to note that I'm not actively maintaining the code; I really just made this as a one-off to play around with neovims treesitter integration.

One thing that damped my motivation was how the vue-parser at the time handled the html-markups; I ended up using the html parser for vue files and used injections instead. May I ask how you went about that? Or does the vue parser now better accomodate different languages?

Also, I see you've replaced the package-lock with a yarn-lockfile - any reason for that besides preference?

@zealot128
Copy link
Author

@RianFuro

I also forked the Vue-treesitter and submitted a PR which changes the content of the template block to "raw text" if there is any kind of attribute. Unfortunately, no response from the maintainer yet.
ikatyang/tree-sitter-vue#13

I am currently running that fork of vue-treesitter + my fork/pr + a fork from my of nvim with the pug config without any problems and happily coding vue + pug files :)

If the vue-treesitter would be merged, that would open up the merge for the nvim-treesitter config and it could finally land in mainline nvim-treesitter...

Regarding package-lock, no specific reasoning, I usually use yarn(1) all the time. I could change it, but if you don't intend to maintain the package anyhow, I could also keep my fork.

mclaughlinconnor and others added 29 commits December 22, 2022 11:12
Docs: reword readme to be more inclusive of non-angular developers
Further enhanced the syntax support
@RianFuro RianFuro closed this Jan 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants