Comments (8)
Here are the JSON objects that are exchanged between atom-languageclient and my server:
>>
{'params': {'capabilities': {}, 'processId': 1168727, 'rootPath': '/home/jonas/Develop/tethercode-language-server'}, 'method': 'initialize', 'jsonrpc': '2.0', 'id': 0}
<<
{"result":{"capabilities":{"documentSymbolProvider":true,"completionProvider":{"resolveProvider":true,"triggerCharacters":["."]},"definitionProvider":true,"documentFormattingProvider":false,"signatureHelpProvider":{"triggerCharacters":["("]},"textDocumentSync":2,"referencesProvider":true,"documentRangeFormattingProvider":false}},"jsonrpc":"2.0","id":0}
If I'm typing, there are also auto completion requests sent by atom-languageclient - so the connection is definitely still active. However, if I simply don't touch anything, nothing ever happens further and at no point, I'm actually getting any didOpen notifications.
from atom-languageclient.
The onDidOpen is sent in the sync provider - I'm not sure why it's firing for you.
If you're developing a language server from scratch you might be better off starting with a known-good implementation of the client such as VSCode until the atom-languageclient is out of the experimental phase.
from atom-languageclient.
I absolutely don't mind if you don't investigate this for now. I guess I'm piling tickets a bit early into this project - if you want I can also stop filing tickets at this stage and file them later when this project is more in a testing and less in a groundwork development phase. (However, I can also keep filing various issues as I stumble across them if you want, whatever you prefer)
I would guess that in this case it's again related to my language server starting up so slowly. I'm happy to use VS Code for now for further tests, I am simply a huge fan of Atom 😄
from atom-languageclient.
There was a sequence error where onDidOpen would not be sent for files already open - that has now been fixed. Let me know if you see any more issues with the latest code.
from atom-languageclient.
I just updated to the latest version of atom-languageclient to test this (by removing the node_packages
folder inside the .atom/packages/language-tethercode
plugin directory and then running apm install
again in that directory).
Sadly, now I am getting the "Uncaught SyntaxError: Unexpected end of JSON input" error again, despite using TCP sockets which worked fine with git master ~9 days ago. The plugin is unchanged, and the language server works perfectly fine with Visual Studio Code.
Full stack trace:
SyntaxError: Unexpected end of JSON input
at Object.parse (native)
at StreamMessageReader.onData (/home/jonas/.atom/packages/language-tethercode/node_modules/vscode-jsonrpc/lib/messageReader.js:198:29)
at Socket.<anonymous> (/home/jonas/.atom/packages/language-tethercode/node_modules/vscode-jsonrpc/lib/messageReader.js:166:19)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at readableAddChunk (_stream_readable.js:176:18)
at Socket.Readable.push (_stream_readable.js:134:10)
at Pipe.onread (net.js:543:20)
This is the plugin: https://gitlab.com/tethercode/atom-language-plugin
The TCP connection is successfully opened (I can see this in the language server log) but nothing is ever sent, as if atom-languageclient now reverted to stdin/stdout anyway. (which always used to give me that "Uncaught SyntaxError: Unexpected end of JSON input" error before I changed the plugin code to use TCP sockets)
This is the VS Code plugin: https://gitlab.com/tethercode/vscode-plugin
The language server itself is a bit complicated to install at this point.. since I can't compile to binaries yet. (compiler is unfinished)
Edit: for what it's worth, I just tried the latest version of my language server on the other machine where I still have atom-languageclient installed in the old version and there it works fine without that strange error and the language server receives the protocol initialization just fine (but I'm not getting textdocument/didOpen events since that atom-languageclient version is a few commits behind this fix)
from atom-languageclient.
Sorry about that - did a big cleanup of some of the code paths and broke sockets. If you pull again it should now be working.
Instead of deleting node_packages folder you can actually git clone this repo and then npm link .
inside it - that will cause the packages to use your local check-out. Then you can update it as you want by just git pull
in your copy of the repo.
from atom-languageclient.
The latest version indeed seems to work fine now, including file synchronization! ❤️ Thanks!
from atom-languageclient.
Great! :)
from atom-languageclient.
Related Issues (20)
- TypeError: Cannot read property 'isIncomplete' of null
- abc log console
- Hook to server termination HOT 4
- Is this project dead? HOT 3
- Autocomplete handling does not meet spec HOT 1
- Why is activate() without parameter? HOT 1
- replacementPrefix generated by textEdit for autocompletion suggestions is overruled HOT 3
- Client throws error after receiving a diagnostic message HOT 1
- Include Apache Camel Language Server in wiki HOT 1
- Atom ide being deprecated HOT 8
- Succesfully cancelled request still log a (spurious) error HOT 1
- Doesn't install on windows HOT 1
- Better source of languageId HOT 2
- Request to add ide-gopls to the wiki page HOT 1
- slash or 'normalised-path' - warning HOT 1
- Update to LSP Version 3.15 HOT 1
- Hover markdown is not syntax highlighted
- Is this project dead? HOT 2
- Add Erlang to wiki of supported languages
- This repo has officially moved to atom-community HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atom-languageclient.