Coder Social home page Coder Social logo

Comments (4)

damieng avatar damieng commented on July 26, 2024

By default language servers use stdout and stdin to communicate. If your server is using console.log to write out what it gets that will be be sent back to atom-languageclient and could easily cause this error.

If you're using the vscode-languageserver library to manage the connection you can wire up console.log and console.error to instead send back log and error messages over json-rpc which will show in the console.log in Atom by adding two lines after your createConnection, e.g.

const connection = createConnection()
console.log = connection.console.log.bind(connection.console)
console.error = connection.console.error.bind(connection.console)

from atom-languageclient.

 avatar commented on July 26, 2024

I wrote something from scratch which doesn't output anything - at least it's not supposed to, and in all manual tests it never did.

Interestingly, my log shows I got proper complete JSON-RPC requests from Atom though, so I'm not sure what exactly the atom-languageclient error popup is so confused about..

from atom-languageclient.

damieng avatar damieng commented on July 26, 2024

How are you writing your log out?

from atom-languageclient.

 avatar commented on July 26, 2024

This is probably also related to me using stdin/stdout wrong as in #24 - since I switched to TCP ports that strange behavior is gone. Since my stdin/stdout use was quite hackish anyway, I'll assume here as well that this was in the end a bug on my side, and since I use TCP now all works fine.

from atom-languageclient.

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.