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

Feature request: add import intellisense (autocomplete) inside template #823

Closed
soulsam480 opened this issue Dec 27, 2021 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@soulsam480
Copy link

hii @johnsoncodehk, I also posted this request in discord a while ago. Basically what I wanted to request is supporting TS imports intellisense for functiions, constants etc. Currently we get import intellisense (autocomplete) for vue components, it'd be great to have similar kind of autocomplete for functions, constants etc. directly from template. I'm not sure if this is possible to implement or not, but I've seen this in svelte vscode extension https://github.com/sveltejs/language-tools .

Again thanks for your hard work

e.g.

// file.ts
export const hello = 'world'

and in .vue file

<sciript setup>
// if we type hello here it'll give us autocomplete
</script>
<template>
{{hello}}
<!--- typing hello here can give us autocomplete intellisense -->
</template>

I hope you understood what I'm trying to express. thx

@johnsoncodehk
Copy link
Member

One of the differences between vue and svelte is that due to the characteristics of vue template context, vue's template and script are not the same virtual script, so vue cannot simply support code behavior across scripts and templates.

Considering the implementation and maintenance costs, it has been decided not to support it for the time being. Maybe something will change in the future.

@alamhubb
Copy link

One of the differences between vue and svelte is that due to the characteristics of vue template context, vue's template and script are not the same virtual script, so vue cannot simply support code behavior across scripts and templates.

Considering the implementation and maintenance costs, it has been decided not to support it for the time being. Maybe something will change in the future.

Would you like to accept if I want to submit a PR about this feature

@johnsoncodehk
Copy link
Member

After #1686, template and script is same virtual file now, reopen this.

@johnsoncodehk johnsoncodehk reopened this Aug 10, 2022
@johnsoncodehk johnsoncodehk added enhancement New feature or request and removed wontfix This will not be worked on labels Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants