Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Internal Language Server #317

Closed
Closed

Description

@wingrunr21

Implement an internal language server based on the toolkit Microsoft provides in vscode-languageserver-node

The underlying parsing will be done via tree-sitter-ruby vs the traditional regex approach

Target feature set:

Note:

I am proposing dropping support for ruby -wc, debride, and ruby-lint. Open to suggestions otherwise.

Activity

  1. added this to the milestone on Apr 4, 2018
  2. gurgeous commented on Apr 5, 2018

    @gurgeous
    Contributor

    Neat. Any idea how we can plug in tree-sitter since it's written in C? Managing our Ruby dependencies is already pretty challenging...

    I fully support ejecting things like ruby -wc, and whatever else we can realistically jettison.

  3. gurgeous commented on Apr 8, 2018

    @gurgeous
    Contributor

    More questions - should we hold off on PRs? What is your timeframe for the proof of concept? Maybe we should release master before we start in on the next batch... I'd be happy to contribute, but I'm unsure how to proceed.

  4. wingrunr21 commented on Apr 8, 2018

    @wingrunr21
    CollaboratorAuthor

    If it has to do with the language server, not sure how you'd PR something that doesn't exist. You could PR against the debugger features. Like I said in that tracking issue, it is independent of the language server work and needs love.

    My timeframe is when I have time. Sorry to be blunt but this is definitely a "free time" thing for me. I have the proof of concept done but there are a few more minor details to work through until it's ready for a PR.

    There's not really a "we" to release master. @rebornix is the only one who can do that. I think there needs to be a release cut anyway.

  5. gurgeous commented on Apr 8, 2018

    @gurgeous
    Contributor

    Oh, no worries. I'm just trying to ascertain if we should submit more PRs for language-related features (formatting, linting, highlighting). If the language server is under active development then we probably don't want to muck with things. Sounds like you are making great progress, no rush.

    @rebornix - can we cut a new release? We're getting a fair number of incoming issues for things that are already fixed.

  6. wingrunr21 commented on Apr 8, 2018

    @wingrunr21
    CollaboratorAuthor

    The existing code is going to live alongside the new stuff for the immediate future so I think PRs against the existing codebase is fine

  7. gurgeous commented on Apr 10, 2018

    @gurgeous
    Contributor

    @wingrunr21 I'd be happy to start on the linting work. Specifically:

    1. Add a linting test. Just one would be a great start.
    2. Comment existing code
    3. Convert js to ts and fix tslint errors, run prettier
    4. Remove support for ruby -wc, debride, and ruby-lint
    5. Investigate/fix/document linting issues like rubocop issues don't disappear after fixing #238, Rubocop/Linting problems aren't removed for closed files #262, Wrong line gets underlined #307, Only lint on save #308
  8. rebornix commented on Apr 10, 2018

    @rebornix
    Member

    @wingrunr21 I attempted to grant you privilege to publish this Ruby extension but unluckily it seems not possible as it's under my account. The package publishing part is easy as it only requires one command vsce publish, but it takes a bit of time to generate a proper release note / changelog, verify the bits (I did manual sanity testing before release). When you think the code ready for a new release, you can add a new tag and I'll do a publish.

  9. wingrunr21 commented on Apr 11, 2018

    @wingrunr21
    CollaboratorAuthor

    @gurgeous sure, but if you could write it such that I can integrate it into the language server later that'd be great. So, if you can take a document or a subset of that document as input to the linting code it should work both for the current use case and the new one.

  10. gurgeous commented on Apr 11, 2018

    @gurgeous
    Contributor

    I'll give it a shot!

  11. wingrunr21 commented on Apr 23, 2018

    @wingrunr21
    CollaboratorAuthor

    Balanced pairs is implemented. Reviewing the semantic code folding spec that hit in VSCode 1.21 and doing that implementation.

  12. wingrunr21 commented on May 29, 2018

    @wingrunr21
    CollaboratorAuthor

    Hoping to find time to come back to this this weekend. Work is super duper crazy right now and it is taking all my energy.

  13. scaryguy commented on Jul 4, 2018

    @scaryguy

    Any updates on this? It sucks to not have auto-formatting :\

  14. wingrunr21 commented on Jul 4, 2018

    @wingrunr21
    CollaboratorAuthor

    You mean other than #366?

  15. wingrunr21 commented on Aug 7, 2018

    @wingrunr21
    CollaboratorAuthor

    Proof of concept language server was released this morning in v0.20.0!

    Let me know if people have issues running it. Getting native binaries into a VSCode extension turned out to be tricky.

    You will need VSCode >= 1.25.0 in order to run this version!

  16. wingrunr21 commented on Aug 7, 2018

    @wingrunr21
    CollaboratorAuthor

    Also make sure you take a look at the README section about it

  17. wingrunr21 commented on Aug 7, 2018

    @wingrunr21
    CollaboratorAuthor

    Thanks everyone for their patience on this! I've been trying to put time into this every morning before work as I know this extension is an important part of everyone's workflow. I'm aiming to have this extension in a really good spot by RubyConf this year!

    Next up on my list (in order):

    v0.21.0

    • Multi-root workspace support
    • Linting and formatting

    v0.22.0

    • Introduction of an analyzer that allows me to query the various constructs in the AST. This will make features like same-file Intellisense and additional highlight/code folding support considerably easier

    Later this week I am also going to create a more detailed roadmap for various release milestones. I'd like to close this ticket after I do that so that end users can get additional detail on progress.

    Thanks!

  18. natsumi commented on Aug 7, 2018

    @natsumi

    @wingrunr21 great job! been waiting a long time for this and I'm happy to see it start to take shape.

    I noticed a small issue with the balanced pairs. It only seems to highlight if I click on one of the pairs versus moving the cursor manually over one of the pairs.

    It would be nice if it worked with normal cursor navigation also.

  19. wingrunr21 commented on Aug 7, 2018

    @wingrunr21
    CollaboratorAuthor

    @narinari hmm, yep you're right. I'll research that. Possible it is something with VSCode not sending a highlight request when the cursor moves.

  20. Rush commented on Oct 3, 2018

    @Rush

    Sorry if this was already mentioned. You could compile tree-sitter to WebAssembly (or ASM.js) and therefore work around the native module limitations.

  21. wingrunr21 commented on Oct 3, 2018

    @wingrunr21
    CollaboratorAuthor

    There are numerous reasons I don’t want to do that. Besides, tree sitter is already being shipped in the latest version

  22. rebornix commented on Oct 3, 2018

    @rebornix
    Member

    Speaking of the native module thing, we can upgrade tree-sitter-ruby from NAN to NAPI and then we won't be bite when Electron updates. I can take a look at this issue when upgrading other libraries Code uses from NAN to NAPI.

  23. wingrunr21 commented on Feb 19, 2019

    @wingrunr21
    CollaboratorAuthor

    #405 has been merged with support for most of the original issues here:

  24. connorshea commented on Mar 6, 2019

    @connorshea
    Contributor

    FYI the README still links to this issue

  25. wingrunr21 commented on Mar 6, 2019

    @wingrunr21
    CollaboratorAuthor

    Ya, haven't gotten to updating documentation yet

  26. guledali commented on Jun 13, 2019

    @guledali

    @wingrunr21 Can the new language server use the microsoft language server protocol for better integration with vscode(icons for function and classes)

    solargraph-function-icon
    solargraph-model-icon

  27. wingrunr21 commented on Jun 13, 2019

    @wingrunr21
    CollaboratorAuthor

    It does

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions