Closed stfnx closed 1 year ago
You could try overriding selector
(https://github.com/sublimelsp/LSP-tailwindcss/blob/master/LSP-tailwindcss.sublime-settings#L29) to include text.jinja
.
Thanks for the hint. Now LSP-tailwindcss is running when opening the files, but completions don't work.
I won't have time to dig deeper today but you could try using the default location for the tailwind configuration file as I'm not sure if we support that setting from tailwind server (it might be that we are outdated or that it's only supported by VSCode extension).
I duplicated my tailwind config to the project's root directory and changed the paths inside it accordingly. No change, sadly.
On top of all above could also try setting:
"settings": {
"tailwindCSS.includeLanguages": {
"jinja": "html"
}
}
but that's, again, untested.
Still no completions showing up.
Steps to enable in Jinja files:
text.jinja
to selector in LSP-tailwindcss.sublime-settings: (this step will not be necessary once #48 is merged)
"selector": "source.jsx | source.js.react | source.js | source.tsx | source.ts | source.css | source.scss | source.less | text.html.vue | text.html.svelte | text.html.basic | text.html.twig | text.blade | embedding.php | text.html.rails | text.jinja"
Preferences: LSP Language ID Mapping Overrides
and paste the following: (this step will not be necessary once https://github.com/sublimelsp/LSP/pull/2099 is merged)
// SublimeText base scope -> LSP Language ID overrides
{
"text.jinja": "html"
}
![image](https://user-images.githubusercontent.com/22029477/198125393-5ebe8e0b-1d74-476e-b165-a379f6539397.png)
@stfnx the fix is merged in LSP-tailwindcss and LSP. Just give PackageControl 1 to 3h to pick up the new LSP 4070-1.20.0 release.
Now all you need to have is the https://packagecontrol.io/packages/Jinja2 syntax.
I will close this issue, but feel free to reopen it if you stumble upon any problem.
Hello, I have the following configuration and am wondering if it is possible to configure this plugin to work with my environment:
tailwind/tailwindcss_v3.1.8.exe
(No NodeJS installed)tailwind/config.js
.html
files using theJinja
syntax from the Jinja2 sublime plugin.I've set
tailwindCSS.experimental.configFile
totailwind/config.js
, as described here. But since this settings wasn't included in the plugin's default settings, I'm not sure if this will work. When I open my Tailwind config I can see that LSP-tailwindcss is running at least...When I now edit a
.html
file using theJinja
syntax, I can't see that LSP-tailwindcss is running. And I won't get completions for Tailwind class names.I assume that I have to configure this with
tailwindCSS.includeLanguages
andselector
plugin settings, but I heve no idea, what exactly to do.Would be super cool if someone could get me starting on this one! Appreciate that Tailwind IntelliSense is available for Sublime!