[FEATURE]: ty lsp rather than pyright
Feature hasn't been suggested before.
- [x] I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
The ty lsp is starting to get a lot better and is so much faster than pyright which can allow us to run the lsp much more liberally for large code bases. It would be great if there was an option to select if we want to use pyright or ty!
Yeah I was thinking about this.
I haven't touched python much is ty out of beta yet? Would it be a sane default yet? The speed is something that'd be rlly good
It is quite stable and mostly on par with pyright in terms of correctness, but it is technically still in alpha (although very close to beta). I think pyright should probably be the default for a few more weeks/months, but it would be nice to allow people to switch to ty since it is basically ready for production
if u (or anyone else) is up to id accept a pr w an opencode experimental flag for lsp ty and then it should disable pyright, ty should only run if the flag is set
flag.ts, lsp.ts relevant files i think its called lsp.ts or its lsp/server.ts
it can be added as custom lsp in settings, although I can't see the the point, as ruff is the way to go for llm interaction imho
@rekram1-node Taking a look at this, ways to install the lsp is either with brew, or like pip, to go with pip we have to make a venv and call the binary from there. Which of these approach you think is best?
@OpeOginni prolly best to not auto install it, should use it if it exists instead
@rekram1-node thanks, Let me know what you think