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

Support for vue template files #4

Open
KelpyCode opened this issue Dec 19, 2022 · 5 comments
Open

Support for vue template files #4

KelpyCode opened this issue Dec 19, 2022 · 5 comments

Comments

@KelpyCode
Copy link

I'm really looking forward for using this tool for our work codebase.
Unfortunately, as of now it doesn't seem to support Vue files.

https://vuejs.org/guide/scaling-up/sfc.html

They're usually set up like this:

<template>
  <SomeStuff />
</template>

<script lang="ts" setup>
// ^ If lang isn't provided, it defaults to JS
// Setup property is optional

const abc = ref(0)

function xyz() {
  return 1
}

</script>

Thank you and good job!

@jayu
Copy link
Contributor

jayu commented Dec 19, 2022

Thanks mate! I didn't work with Vue tbh, but it's such a big ecosystem that I think it's worth supporting in future!

I've planned to support other parsers/languages, sounds like Vue might be the first one :D

But at first I would like to add support for ESLint parser, and to achieve that I have to do some refactoring first.

I have a question regarding your preference, should CodeQue support only searching in the script part of the file, or in the template and style parts as well ?

@KelpyCode
Copy link
Author

For me personally, I mostly need to search only the script part, but it would definitely be a great feature to also be able to search the template aswell. I don't see too much need in searching for CSS via AST methods though

@jayu
Copy link
Contributor

jayu commented Dec 20, 2022

Thanks! Actually I've checked and styles are not parsed to AST, so it would not work well anyway

But script and template are definetly doable

@sschneider-ihre-pvs
Copy link

@johnsoncodehk could be interested :D

@sschneider-ihre-pvs
Copy link

Thanks! Actually I've checked and styles are not parsed to AST, so it would not work well anyway

But script and template are definetly doable

Well, if you manage to support Tree-Sitter integration of new languages would be a breeze, I guess

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

3 participants