Replies: 2 comments 2 replies
-
Maybe your cwd is misconfigured? Check if |
Beta Was this translation helpful? Give feedback.
1 reply
-
I've tried everything to make this work (prettier, prettierd, local/global install, various prettier setup locations/files) and realized that whenever I use a plugin in prettier config file, null-ls times out and can't use prettier at all. I can have the "plugins" entry in prettier config but needs to be empty for it to work. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Prettierd | Prettier Not applying Tailwind CSS plugin for class sorting
Description
I'm encountering an issue where
null-ls
(usingprettierd
for formatting) does not seem to recognize or apply the Tailwind CSS plugin for class sorting in my project files. Despite having bothprettier
andprettier-plugin-tailwindcss
installed in my project'snode_modules
, class sorting does not occur upon formatting HTML, JavaScript, or other relevant files that utilize Tailwind CSS classes.Detailed Observations
I've noticed a discrepancy in how Prettier behaves when invoked from within Neovim through
null-ls
and when run directly from a terminal:Neovim (
null-ls
invocation): Running the command:!npx prettier --check %
in Neovim reports that all matched files use Prettier code style, implying no need for reformatting.Terminal (Direct invocation): However, running Prettier directly in a terminal with
npx prettier --check file_name.js
indicates that there are code style issues in the same file and suggests running Prettier to fix them.This difference suggests that when
null-ls
invokes Prettier (orprettierd
), it might not be using the same context, configuration, or environment as when Prettier is run directly from a terminal.Dev
If anyone knows how to set it up properly, please let me know. I've looked over both lsp-config and none-ls documentation to try and make it work with no sucesss.
Beta Was this translation helpful? Give feedback.
All reactions