Giter Club home page Giter Club logo

Comments (4)

castwide avatar castwide commented on May 23, 2024

Solargraph usually works on untitled files as long as it knows the language mode, e.g., if you set it to Ruby with the Change Language Mode command. There's at least one edge case where it can fail: starting an untitled file before any other Ruby file has been opened, i.e., before the Solargraph extension has been activated. That can cause the Solargraph server to hit an error when it tries to map the file. I should be able to adjust the server to handle that scenario. (It might already be a non-issue in the version that uses the language server protocol.)

from vscode-solargraph.

garyking avatar garyking commented on May 23, 2024

Yes, I played around with SolarGraph a bit earlier, and here's what I recall:

Open a new VSC window. Open a new file (don't save it). Set language to Ruby (of course, I always did this when testing SolarGraph). IntelliSense doesn't work here.

However if I open a saved Ruby file first, then open a new document, then IntelliSense works fine there. Although for some reason, it still sometimes fails to work here.

This isn't an edge case in my opinion. I definitely frequently open a new window in VSC, then open a new document and hack away at some Ruby code.

Any rough ETA on the language server protocol version, if you don't mind?

from vscode-solargraph.

castwide avatar castwide commented on May 23, 2024

Thanks for the information. I'll work on this bug for an upcoming release.

I hope to release the LSP version by the end of this month, or possibly the first week of April.

from vscode-solargraph.

castwide avatar castwide commented on May 23, 2024

There appears to be a limitation (or a bug) in either VSCode or the language client that prevents them from updating the language server when you change an unsaved file's language mode. I'll keep looking for a workaround.

from vscode-solargraph.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.