Skip to content
This repository has been archived by the owner on Jan 3, 2025. It is now read-only.

Nim extension in Nim #172

Closed
saem opened this issue Aug 17, 2020 · 7 comments
Closed

Nim extension in Nim #172

saem opened this issue Aug 17, 2020 · 7 comments

Comments

@saem
Copy link

saem commented Aug 17, 2020

Wasn't quite sure where else to put it, I'm seeing if I can port the TypeScript code this extension is written in into Nim -- you can follow that branch here.

It's a fun way for me to learn a bit of Nim (read: the code is ugly and a straight port). If I complete it, well that might make community contributions a whole lot easier and allow for leveraging a lot more pure Nim facilities. My intentions are:

  1. finish porting
  2. clean-up the code (make it more Nim like)
  3. maybe add some small quality of life enhancements (track defines and feed that into nimsuggest)

If there is interesting in discussing integration just wondering how, if at all, that might proceed?

@saem
Copy link
Author

saem commented Aug 19, 2020

Just a quick update, I believe I'm about 1/3rd of the way through conversion. That's feelings more than math, I'll check later how many files/features/functions/whatever I have left to convert. But almost through all the nimSuggest items.

@saem
Copy link
Author

saem commented Aug 24, 2020

Finished porring all the providers etc... Now it's into a whole lot of the backend like the indexer. I also need to learn more Nim because I'm still writing typescript/haxe with a different syntax.

Going through this part, looking at nimSuggest integration etc, I think one of the things to do after a bit of house keeping is working to integrate the language server protocol. It should help consolidate efforts and help move the focus of the extension on user experience, UI, and services, while keeping much of the heavy lifting and enabling work in a shared place to help everyone.

@saem
Copy link
Author

saem commented Sep 7, 2020

Quick update, down to one last file, nimMain.ts.

Highlights:

  • Fixed a few bugs along the way -- nimSignature and nimSuggest had one or two each
  • Have to use nim 1.3.5 (devel) in order to use nimsuggest/sexp
  • Ported to and am using nimsuggest/sexp
  • It's not that slow even though I know there are lots of copies everywhere

My current "minimal" todo list:

  • Finish nimMain.ts port
  • Clean-up vscodeApi.nim, remove redundant type and JsObject usage
  • Reduce some of excessive promise abuse and associated casting

@saem
Copy link
Author

saem commented Sep 8, 2020

OK, all the typescript code has been ported over. 🎉

Next up:

  1. clean-up the infrastructure and build part so it's a published extension
  2. catch-up on 5 commits against this repo, only one of those seems to impact the code I ported
  3. make it better

The first point is because I'm presuming folks in this project don't want to rush towards it just yet.

@kraptor
Copy link

kraptor commented Sep 14, 2020

Switched to your version @saem

I'll report any issue I find. Cheers!

@saem
Copy link
Author

saem commented Sep 15, 2020

Thanks, @kraptor.

My version is probably pre-alpha, at best. I just published a test version to learn. Nonetheless, I'm grateful for the support and I'll keep an eye out.

@saem
Copy link
Author

saem commented Sep 26, 2020

Finished porting https://marketplace.visualstudio.com/items?itemName=nimsaem.nimvscode. I created a new repo that's no longer a fork of this one, so it has its own issue tracker. Now comes the fun of refactoring and maybe some other contributors.

Closing this issue for now.

@saem saem closed this as completed Sep 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants