-
-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typescript pack formatting is broken #974
Comments
Do you have any custom logic locally? |
This has been raised earlier @MrMic. Not sure what's causing this, but I can't reproduce locally. All LSP's are up to date. Basic template + typescript pack. |
What do you mean with "broken" @MrMic. Broken as in non-functional, or broken as in wrong formatting? |
No custom logic. When I save JS file I got this notification error: |
Moreover when I install prettier in my project Dev Dependencies: |
This is a significant issue. I am having the same problem, formatting completely broken in JS/TS. |
I Wonder if this is due to prettierd |
I think so. |
@vadimshvetsov Feel free to help us in fixing this. |
I removed the tailwindcss pack and reproduced the issue, so it looks like the problem is somewhere in the typescript pack. It looks like wrong formatting is produced by prettierd, and the weird thing is that the first opened and saved file will be formatted correctly. |
We've already established that. |
I checked the two latest commits to the typescript pack, and those didn't break anything |
I saw the update of prettier a couple of days ago (10 or 15 days) and it was |
I've rollbacked to my previous lock file and updated just astrocommunity to 8.5 and can't see any issue with formatting. I'll update packages one by one and will find which one causes the issue. |
I've updated |
To those who are blocked by this issue, you can change either the version in "AstroNvim": { "branch": "main", "commit": "0f875f4a7f1963d6c61eb564cadb8e556e406dd5" }, After opening nvim, just run Or directly set This issue appeared right after the commit that came with AstroNvim 4.5.1: |
Wait. That shouldn't, if I'm thinking correctly, affect the prettier stuff |
Prettier should override that anyways since it has its own prefered logic for tabs/spaces. |
I've updated all my packages back to the latest and just put Checked with latest |
I guess prettier ignores |
I think this just exposes an underlying issue with the prettier/prettierd and neovim. |
Issue is upstream: |
Issue is resolved for me with a basic template + typescript pack. nothing else init. |
I think this issue is proof that we should move away from typescript-tools.nvim to vtsls lsp instead. |
This should be fixed now that we have moved to |
Make sure to update your dependencies @MrMic . It's working fine for me now |
What do you mean by "dependencies"? All my packages are up-to-date. |
Also open Mason and make sure to uninstall tsserver |
I did it again. And it has been installed again but I still have the same issue... |
Well you shouldn't see tsserver at all in the latest update 😅 so it shouldn't be working at all haha . Can you share an example project that's throwing the error and steps to replicate. |
I see it when I open my project... BTW: When I work with VS Code on it I have no issue at all! |
It would definitely be strange if you got a null-ls error message in vs code 😂 |
@MrMic delete your plugins and try again. |
I.e the lazy cache folder |
Where is it located? (on linux) |
I've send you it before 😐 rm -rf ~/.cache/nvim
rm -rf ~/.local/share/nvim
rm -rf ~/.local/state/nvim Also: List time you had a bug in a plugin, you "...deleted and reinstalled the plugin, and this solved my issue... weird." Whatever that meant, try that as well. |
@MrMic I don't have any issues formatting that project, also it correctly only attaches |
Done. But I still have this issue... |
|
I get a 404, that might be private |
Yes indeed. Should be public now for some time... |
Ok, I found the error. Investigating now. |
Seems to be a reccuring thing with your config @MrMic 😂 |
Ok @MrMic , AstroNvim v4.7.7 should resolve the specific error message you are getting, but there are still a lot of issues with your configuration. I will make a PR with a few fixes I found immediately, but I haven't really gone through it with a fine tooth comb |
Ok, I opened a PR on your config. Hopefully it all makes sense. God speed! |
Checklist
Neovim version (nvim -v)
0.10.0
Operating system/version
Linux Ubuntu 22.04
Terminal/GUI
kitty
Describe the bug
For a couple of days, the formatting with Javascript is broken.
I think it is an issue with prettier and/or eslint. Everything
is working with VS Code and Helix...
I saw few days ago that prettier was updated/upgraded and this
broke the formatting. Everything was OK before.
Steps to Reproduce
When I save a file, formatting failed
Expected behavior
formatting
Screenshots
see above
Additional Context
No response
The text was updated successfully, but these errors were encountered: