question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Autocomplete less/SCSS variables in .vue files for cases with @import

See original GitHub issue
  • I have searched through existing issues

Feature Request

I am forced to use @import in the styles block. It would be nice to have auto-completion for variable names.

<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'; 

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

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:6
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Smekalincommented, Aug 19, 2020

I have the same problem. Even if I write relative path through ‘…/…/’ I cannot use auto-competion for variables. If I write separated ‘.less’ file I can use autocomplete. This problem only in SFC

1reaction
octrefcommented, Aug 26, 2020

As mentioned, you can use the extension for now. I don’t have time to reimplement it for Vetur.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to enable autocomplete / IntelliSence for sass in vue files ...
I'm not sure how Vetur handles CSS/SCSS, but I use Prettier and I manage the intelisense settings in the "extensions" settings group.
Read more >
Support vue.js modules for syntax highlighting : WEB-19082
should first show you myDataVar and foobar in the autocompletion list (as well as the declared methods and computed variables, and the default...
Read more >
How to build an autocomplete field with Vue 3
Create an autocomplete/auto-suggest search field with Vue 3 and the Composition API ... The JSON file is imported and made available to the...
Read more >
How to Import a Sass File into Every Vue Component in an App
What even are Sass variables? If you already know all of this, then you can skip down to the next section for the...
Read more >
Style Guide - Vue.js
Filenames of single-file components should either be always PascalCase or always kebab-case. PascalCase works best with autocompletion in code editors, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found