Repository navigation
Replies: 2 comments 2 replies
|
Maybe your cwd is misconfigured? Check if |
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. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Prettierd | Prettier Not applying Tailwind CSS plugin for class sorting
Description
I'm encountering an issue where
null-ls(usingprettierdfor formatting) does not seem to recognize or apply the Tailwind CSS plugin for class sorting in my project files. Despite having bothprettierandprettier-plugin-tailwindcssinstalled 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-lsand when run directly from a terminal:Neovim (
null-lsinvocation): 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.jsindicates that there are code style issues in the same file and suggests running Prettier to fix them.This difference suggests that when
null-lsinvokes 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.
All reactions