mrmlnc / vscode-less

:electric_plug: Less intellisense for Variables and Mixins in all Less files.
https://goo.gl/9myVWD
MIT License
31 stars 17 forks source link

Feature request: add support for Vue.js single file component #54

Open nicothin opened 4 years ago

nicothin commented 4 years ago

it would be great to get auto-completion of variables in single-file components Vue.js

<template>
  <!-- some code -->
</template>

<script lang="ts">
  // some code
</script>

<style lang="less" scoped>
  @import '@/styles/variables.less'; // File with variables for autocomplete (Including @padding-lg)
  // or @import '../styles/variables.less'; 
  // or <reference path="../styles/variables.less" />

  .selectorr {
    padding: @padding-lg; // It would be great to have autocomplete here when you type @
  }
</style>

The author of the vetur refuses to implement this feature: https://github.com/vuejs/vetur/issues/2178

theoephraim commented 2 years ago

Trying to get similar support in Volar - see https://github.com/johnsoncodehk/volar/issues/783

MaticBabnik commented 1 year ago

Sorry for bumping an old issue, but I have implemented vue support on my fork. It is also up on the marketplace under the id maticbabnik.vscode-less-vue. (link)

I mostly just copied the code from the SCSS extension. I might make a PR, but I need to fix the linter and dependencies first.