Giter VIP home page Giter VIP logo

Comments (7)

yaegassy avatar yaegassy commented on June 3, 2024 1

I used your repository in my environment and tried it. It worked fine with your regex in my environment.

coc-tailwind3-purescript-headwind.mp4

from coc-tailwindcss3.

yaegassy avatar yaegassy commented on June 3, 2024

I have never used purescript so I don't know. headwind feature was ported from heybourn/headwind. https://github.com/heybourn/headwind

You may want to debug the regex checks with this. https://github.com/heybourn/headwind#debugging-custom-regex

from coc-tailwindcss3.

andys8 avatar andys8 commented on June 3, 2024

I'm not sure if I configure tailwindCSS.headwind.classRegex properly or if it's not working.

Let's say I want to test it by configuring html wrongly. It should not work for standard html syntax. But the change has no affect.

  "tailwindCSS.enable": true,
  "tailwindCSS.headwind.classRegex": {
    "html": "\\bwrong\\s*=\\s*[\\\"\\']([_a-zA-Z0-9\\s\\-\\:\\/]+)[\\\"\\']"
  },

Is configuring tailwindCSS.headwind.classRegex working for you?

from coc-tailwindcss3.

yaegassy avatar yaegassy commented on June 3, 2024

I checked the no matching setting in html. The setting itself is reflected correctly because it is not sorted.

DEMO (mp4):

  1. I'm trying the default settings first.
    • underline text-3xl font-bold -> text-3xl font-bold underline
  2. I am trying with a non matching setting in html.
    • underline text-3xl font-bold -> underline text-3xl font-bold
coc-tailwindcss3-headwind-class-regex.mp4

from coc-tailwindcss3.

andys8 avatar andys8 commented on June 3, 2024

Thanks a lot for looking into it and providing the screencast. I'm not sure how to progress from here.

I don't want to waste your time, but if you feel the urge, you can try out to modidy className in this example project. I assume since the extension is regex based, no PureScript knowledge or setup is necessary.

But at this point I assume it's more likely that the issue would be related to setup or configuration on my end. So don't feel bother about this issue and free to close it.

from coc-tailwindcss3.

yaegassy avatar yaegassy commented on June 3, 2024

Added headwind regex logs feature. #10

Here is a demo in your repository.

coc-tailwindcss3-andys8-repo-headwind-log.mp4

This issue is closed as it works fine in my environment. 🙇

from coc-tailwindcss3.

andys8 avatar andys8 commented on June 3, 2024

Hey, thanks to your help I got it sorted out.

First I was wondering why you're testing with sorting classes (tailwindCSS.headwind.sortTailwindClasses) while I was hoping for linting errors for duplicates. With that I figured that headwind is supposed to be sorting.

Then I tried also configuring tailwindCSS.experimental.classRegex and change tailwindCSS.includeLanguages which I saw in your screencast. Not sure why I do have to set it to a value like javascriptreact (because it's not correct) but a value seems to be necessary.

Configuring all of these will then work nicely.

  "tailwindCSS.enable": true,
  "tailwindCSS.experimental.classRegex": [
    "\\bclassName\\s*:\\s*\\\"([_a-zA-Z0-9\\s\\-\\:\\/]+)\\\""
  ],
  "tailwindCSS.headwind.classRegex": {
    "purescript": "\\bclassName\\s*:\\s*\\\"([_a-zA-Z0-9\\s\\-\\:\\/]+)\\\""
  },
  "tailwindCSS.includeLanguages": {
    "purescript": "javascriptreact"
  }

Changing tailwindCSS.experimental.classRegex is not specific to a language. So I don't think the tailwind language server or coc-tailwindcss3 can be changed to work out of the box for PureScript. But with that configuration it's possible to have a working setup. Thank you, again :)

from coc-tailwindcss3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.