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.

Autocompletion isn't working in pug file

See original GitHub issue

I am not getting windiCSS autocompletion when using pug in vscode 🤔

Steps:

  1. Create new project pnpm exec create-vite windi-int --template vanilla-ts
  2. add windi & pug: pnpm add vite-plugin-windicss windicss pug-cli
  3. Install WindiCSS IntelliSense extension
  4. add vscode config:
  5. Add vite config & windi import in main file according to docs: https://windicss.org/integrations/vite.html#install

{ “windicss.enableEmmetCompletion”: true, // Below setting is not working I guess. I don’t know if this is even required or not “windicss.includeLanguages”: { “*.pug”: “html” } }

// vite.config.ts import WindiCSS from ‘vite-plugin-windicss’

export default { plugins: [ WindiCSS(), ], }

// main.ts

import ‘virtual:windi.css’ import ‘./style.css’

With this setup if I type .h in HTML file I am getting autocompletion but in .pug file with .h I am not getting autocompletion 🤔

What I am missing here.

Regards.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
jd-solankicommented, Sep 3, 2021

Hey @alexanderniebuhr It’s working with your latest patterns 😍

For others below is full config as I will remove the repo from my github.

{
    "editor.quickSuggestions": {
        "strings": true
    },
    "windicss.enableEmmetCompletion": true,
    "windicss.includeLanguages": {
        "jade": {
            "type": "html",
            "patterns": [
                "(\\s*class(Name)?\\s*=\\s*{?\\s*[\"'`])[^\"'`]*$",
                "\\.\\S*$"
            ]
        }
    },
}

Thanks for taking the time to look into this.

I really appreciate that. 😊

1reaction
jd-solankicommented, Aug 30, 2021

Hi @alexanderniebuhr

Here’s the repo: https://github.com/jd-0001/windi-autocompletion-issue

and steps are mentioned in readme.

Regards.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pug includes autocomplete · Issue #64 - GitHub
Hey there, thx for your extenstion. I like it. But i cant get it to work with pug/jade template language. In pug writing...
Read more >
Jquery Autocomplete with Jade/Pug - javascript - Stack Overflow
I use inline code as "very basic" things. Im sure that there are no error showing in inspect of browser, the script at...
Read more >
Components are not in the completion in Vue templates on Pug
As of this update, code completion is no longer performed within the template section of a Vue component file when using pug as...
Read more >
Auto Complete Field values not working with New Computer
The autocomplete data is not stored at the SQL level anywhere it is a file on each workstation. This article by the great...
Read more >
Editor Setup - Tailwind CSS
In some cases, you may need to disable native CSS linting/validations if your editor is very strict about the syntax it expects in...
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