Comments (7)
JSONRPC spec says:
id
An identifier established by the Client that MUST contain a String, Number, or NULL value if included. If it is not included it is assumed to be a notification. The value SHOULD normally not be Null [1] and Numbers SHOULD NOT contain fractional parts [2]
It doesn't say "MUST NOT" but still.
from lsp.
They are specified as JSON, and JSON does not have the concept of integers, only numbers
In JSON, there is no difference between 1 and 1.0.
The entire protocol is in JSON. What is there to argue here?
I'm not going to debate with you guys anymore on this bug as it seems like you guys are not open to admitting fault in your software nor fixing it
from lsp.
It's not only with the id
of the response, it's also that a value of 1.0 for textDocumentSync.change
is not recognized.
from lsp.
The LSP spec says https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentSyncKind
The LSP spec doesn't have fractional parts for textDocumentSyncKind
from lsp.
The LSP spec says nothing about fractional parts, the messaging is in JSON, and by the JSON spec, 1.0
is the same as 1
.
Also, the LSP spec defines integers as JavaScript to be number
Do what you like though
from lsp.
The place you've linked defines integer
, uinteger
and decimal
explicitly. All are mapped to number
, I guess due to it being based on typescript typing system but that doesn't mean that decimal values are allowed in place of integer
and uinteger
. And for sure not in place of enum values which might technically be numbers under the hood in typescript case but spec doesn't specify that.
from lsp.
The LSP specification can impose additional restrictions on top of JSON specification and as far I understand this is what is happening here. You can ask at LSP specification repo if you think otherwise.
from lsp.
Related Issues (20)
- goto definition cursor position is one char behind HOT 6
- Crash when removing a folder from sublime HOT 7
- setting for 'diagnostics' hover popup HOT 2
- Containerized development workflow HOT 3
- Keep server running without a related source file open? HOT 6
- Latest version breaks on startup HOT 2
- [clangd] Duplicated references HOT 6
- Find references not working across the project but only on opened files HOT 8
- Sublime Text Becomes unresponsive when hovered on variable containing large data (Variable Storing embeded font data) HOT 16
- `KeyError` in LSP plugin when trying to open Preferences HOT 3
- Goto Definition throws HOT 4
- Deprecate ST3 support for LSP-* packages HOT 1
- Feature: Only format when project configured for formatting HOT 8
- Disabling/Uninstalling the package resets Sublime Text's color scheme HOT 4
- Progress for migrating to python 3.8 HOT 7
- Option to disable code lens reference counter to reduce screen clutter HOT 2
- Plugin does not reflect `lsp_code_actions_on_save` settings HOT 3
- Can't disable code lens in settings HOT 4
- Formatting code show in hover popups HOT 2
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 lsp.