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

SmartSelect doesn't work in html section of Vue SFC #92936

Closed
qgates opened this issue Mar 18, 2020 · 7 comments
Closed

SmartSelect doesn't work in html section of Vue SFC #92936

qgates opened this issue Mar 18, 2020 · 7 comments
Assignees
Labels
*caused-by-extension Issue identified to be caused by an extension

Comments

@qgates
Copy link

qgates commented Mar 18, 2020

  • VSCode Version: 1.43
  • OS Version: Win10 / Linux Mint 19.3

Steps to Reproduce:

  1. Create a Vue SFC .vue file of the following format:
<template>
  <div>
    <p>Some Text</p>
  </div>
</template>

<script lang="ts">
  import Vue, { VueConstructor } from 'vue'

  export default Vue.extend({
    props: {},
    data() { return {
    }},

    mounted() {},
    created() {},
    methods: {},

    computed: {},
    watch: {},
    components: {},
  })
</script>

<style>
</style>
  1. Place cursor anywhere inside the HTML <template> section and attempt to use SmartSelect expand/grow feature to select the

    or outer

  2. Doing so selects the whole file instead of expanding the selection to HTML

Other notes:

  • SmartSelect does work as expected in the <script> section.
  • Pasting the <template> section into a blank file set to language mode HTML, SmartSelect works as expected.

Does this issue occur when all extensions are disabled?: Yes

@octref
Copy link
Contributor

octref commented Mar 20, 2020

vuejs/vetur#1350

@octref octref closed this as completed Mar 20, 2020
@octref octref added the *caused-by-extension Issue identified to be caused by an extension label Mar 20, 2020
@qgates
Copy link
Author

qgates commented Mar 20, 2020

This is not extension related. Running vs code with extensions disabled I see the same issue. The problem relates to the inbuilt smartselect functionality. Please reopen - thanks.

@octref
Copy link
Contributor

octref commented Mar 20, 2020

This functionality can only be implemented by extensions, not by core.

@qgates
Copy link
Author

qgates commented Mar 20, 2020

I don't understand. Smartselect works in all languages with no extensions installed. It only goofs up in the html section of vue sfc's?

@octref
Copy link
Contributor

octref commented Mar 20, 2020

VS Code includes support for HTML/CSS/JS but not Vue files.

@qgates
Copy link
Author

qgates commented Mar 20, 2020

A vue file is just a collection of html, script and css. Admittedly, the html is a templating language (with directives, @attributes etc) but does conform to standards for markup. In any case, smartselect fails even when the html is just plain html. If I paste exactly the same into a file with another extension, it works. So this seems to be an issue with code.

@github-actions github-actions bot locked and limited conversation to collaborators May 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*caused-by-extension Issue identified to be caused by an extension
Projects
None yet
Development

No branches or pull requests

3 participants
@octref @qgates and others