lsp-mode isn't sending up-to-date diagnostics
- Dominant language
- Emacs Lisp
- Stars
- 22.7k
- Forks
- 3.1k
- Avg merge
- 10h 46m
- Merged PRs (30d)
- 4
Description
### I confirm that...
- [X] I have searched the [issue tracker](https://github.com/doomemacs/doomemacs/issues), [documentation](https://docs.doomemacs.org), [FAQ](https://docs.doomemacs.org/-/faq), [Discourse](https://discourse.doomemacs.org), and [Google](https://google.com), in case this issue has already been reported/resolved.
- [X] I have read "[How to Debug Issues](https://doomemacs.org/d/how2debug)", and will use it to provide as much information about this issue as possible.
- [X] The issue can be reproduced on the **latest** available commit of Doom.
- [X] The issue can be reproduced on a stable release of Emacs, such as 27, 28, or 29. *(Unstable versions end in .50, .60, or .9x)*
### Expected behavior
Upon updating a file, I'd expect flycheck to display up-to-date list of errors.
It seems that lsp-mode (specifically ts-ls) is not sending correct diagnostics upon changing.
Only after restarting lsp via running `lsp-restart-workspace` it updates as expected.
Example (Type is completely wrong, no LSP error)

After running `lsp-restart-workspace`

Similar thing happens when I fix an error:
1. I have a correctly displayed error
2. I fix the code
3. I still get a flycheck error message for old code
Not sure if this is related to lsp-mode or my emacs installation.
I've tried emacs 29, 28 and multiple doom re-installations. I'm running on mac sonoma, with an M2 chip. Emacs-mac but have had the same behaviour with emacs-plus
### Current behavior
explained above
### Steps to reproduce
1. Install emacs with native comp on mac sonoma M2
2. Open TS project, a file with an error
3. fix code but still see error for outdated code
### System Information
https://pastebin.com/YU3z6RUr
Contributor guide
Assessment
This issue has not been assessed yet.