Skip to content

Commit

Permalink
readme: add TailwindCSS config example
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Nov 9, 2023
1 parent 671d9fc commit 313aa78
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,22 @@ class ButtonComponent < ViewComponent::Base
end
```

### Using with TailwindCSS LSP

To make completions (and other LSP features) work with our DSL, try the following configuration:

```json
"tailwindCSS.includeLanguages": {
"erb": "html",
"ruby": "html"
},
"tailwindCSS.experimental.classRegex": [
"%w\\[([^\\]]*)\\]"
]
```

**NOTE:** It will only work with `%w[ ... ]` word arrays, but you can adjust it to your needs.

## Organizing assets (JS, CSS)

**NOTE**: This section assumes the usage of Vite or Webpack. See [this discussion](https://github.com/palkan/view_component-contrib/discussions/14) for other options.
Expand Down

0 comments on commit 313aa78

Please sign in to comment.