Skip to content

Commit e070e25

Browse files
committed
Update to latest LSP.
1 parent d4d2438 commit e070e25

File tree

6 files changed

+104
-105
lines changed

6 files changed

+104
-105
lines changed

generator-plugins/python/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def _to_snake_case(name: str) -> str:
106106

107107
def _snake_case_item_name(original: str) -> str:
108108
"""Generate snake case names from LSP definition names.
109+
109110
Example:
110111
* PlainText -> PLAIN_TEXT
111112
* $import -> IMPORT
@@ -123,6 +124,7 @@ def _snake_case_item_name(original: str) -> str:
123124

124125
def _capitalized_item_name(original: str) -> str:
125126
"""Generate capitalized names from LSP definition names.
127+
126128
Example:
127129
* someClass -> SomeClass
128130
* some_class -> SomeClass

generator/lsp.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@
620620
"kind": "reference",
621621
"name": "FileOperationRegistrationOptions"
622622
},
623-
"documentation": "The will create files request is sent from the client to the server before files are actually\ncreated as long as the creation is triggered from within the client.\n\n@since 3.16.0",
623+
"documentation": "The will create files request is sent from the client to the server before files are actually\ncreated as long as the creation is triggered from within the client.\n\nThe request can return a `WorkspaceEdit` which will be applied to workspace before the\nfiles are created. Hence the `WorkspaceEdit` can not manipulate the content of the file\nto be created.\n\n@since 3.16.0",
624624
"since": "3.16.0"
625625
},
626626
{
@@ -1633,7 +1633,7 @@
16331633
"kind": "reference",
16341634
"name": "DocumentFormattingRegistrationOptions"
16351635
},
1636-
"documentation": "A request to to format a whole document."
1636+
"documentation": "A request to format a whole document."
16371637
},
16381638
{
16391639
"method": "textDocument/rangeFormatting",
@@ -1662,7 +1662,7 @@
16621662
"kind": "reference",
16631663
"name": "DocumentRangeFormattingRegistrationOptions"
16641664
},
1665-
"documentation": "A request to to format a range in a document."
1665+
"documentation": "A request to format a range in a document."
16661666
},
16671667
{
16681668
"method": "textDocument/onTypeFormatting",
@@ -3061,7 +3061,7 @@
30613061
"kind": "base",
30623062
"name": "URI"
30633063
},
3064-
"documentation": "The document uri to show."
3064+
"documentation": "The uri to show."
30653065
},
30663066
{
30673067
"name": "external",
@@ -3070,7 +3070,7 @@
30703070
"name": "boolean"
30713071
},
30723072
"optional": true,
3073-
"documentation": "Indicates to show the resource in an external program.\nTo show for example `https://code.visualstudio.com/`\nin the default WEB browser set `external` to `true`."
3073+
"documentation": "Indicates to show the resource in an external program.\nTo show, for example, `https://code.visualstudio.com/`\nin the default WEB browser set `external` to `true`."
30743074
},
30753075
{
30763076
"name": "takeFocus",
@@ -3091,7 +3091,7 @@
30913091
"documentation": "An optional selection range if the document is a text\ndocument. Clients might ignore the property if an\nexternal program is started or the file is not a text\nfile."
30923092
}
30933093
],
3094-
"documentation": "Params to show a document.\n\n@since 3.16.0",
3094+
"documentation": "Params to show a resource in the UI.\n\n@since 3.16.0",
30953095
"since": "3.16.0"
30963096
},
30973097
{
@@ -5682,7 +5682,7 @@
56825682
"name": "target",
56835683
"type": {
56845684
"kind": "base",
5685-
"name": "string"
5685+
"name": "URI"
56865686
},
56875687
"optional": true,
56885688
"documentation": "The uri this link points to. If missing a resolve request is sent later."
@@ -6002,7 +6002,7 @@
60026002
"documentation": "The edits to apply."
60036003
}
60046004
],
6005-
"documentation": "The parameters passed via a apply workspace edit request."
6005+
"documentation": "The parameters passed via an apply workspace edit request."
60066006
},
60076007
{
60086008
"name": "ApplyWorkspaceEditResult",
@@ -7623,7 +7623,7 @@
76237623
"documentation": "Options necessary for the registration."
76247624
}
76257625
],
7626-
"documentation": "General parameters to to register for an notification or to register a provider."
7626+
"documentation": "General parameters to register for a notification or to register a provider."
76277627
},
76287628
{
76297629
"name": "Unregistration",
@@ -13434,7 +13434,7 @@
1343413434
{
1343513435
"name": "UTF8",
1343613436
"value": "utf-8",
13437-
"documentation": "Character offsets count UTF-8 code units."
13437+
"documentation": "Character offsets count UTF-8 code units (e.g. bytes)."
1343813438
},
1343913439
{
1344013440
"name": "UTF16",
@@ -13444,7 +13444,7 @@
1344413444
{
1344513445
"name": "UTF32",
1344613446
"value": "utf-32",
13447-
"documentation": "Character offsets count UTF-32 code units.\n\nImplementation note: these are the same as Unicode code points,\nso this `PositionEncodingKind` may also be used for an\nencoding-agnostic representation of character offsets."
13447+
"documentation": "Character offsets count UTF-32 code units.\n\nImplementation note: these are the same as Unicode codepoints,\nso this `PositionEncodingKind` may also be used for an\nencoding-agnostic representation of character offsets."
1344813448
}
1344913449
],
1345013450
"supportsCustomValues": true,

generator/lsp.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@
621621
},
622622
"StructureLiteral": {
623623
"additionalProperties": false,
624-
"description": "Defines a unnamed structure of an object literal.",
624+
"description": "Defines an unnamed structure of an object literal.",
625625
"properties": {
626626
"deprecated": {
627627
"description": "Whether the literal is deprecated or not. If deprecated the property contains the deprecation message.",

noxfile.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,17 @@ def _format_code(session: nox.Session):
5656

5757
session.run("isort", "--profile", "black", ".")
5858
session.run("black", ".")
59-
session.run("docformatter", "--in-place", "--recursive", ".")
59+
session.run("docformatter", "--in-place", "--recursive", "--black", ".")
6060
session.run("isort", "--profile", "black", ".")
6161
session.run("black", ".")
6262

6363
# this is for the lsprotocol package only
6464
python_package_path = "./packages/python/lsprotocol"
6565
session.run("isort", "--profile", "black", python_package_path)
6666
session.run("black", python_package_path)
67-
session.run("docformatter", "--in-place", "--recursive", python_package_path)
67+
session.run(
68+
"docformatter", "--in-place", "--recursive", "--black", python_package_path
69+
)
6870
# do it again to correct any adjustments done by docformatter
6971
session.run("isort", "--profile", "black", python_package_path)
7072
session.run("black", python_package_path)

0 commit comments

Comments
 (0)