Commit graph

33 commits

Author SHA1 Message Date
Alexey Yerin
f3faf4b993 LSP: Handle shutdown commands
This fixes the issue with terminal-based editor Helix which asks
language servers to shut down when trying to close the editor. Since
blueprint-compiler's server implementation didn't handle this request,
Helix ended up waiting for a response until timing out after a few
seconds and forcefully terminating the language server process.

Besides fixing Helix, this patch should also make user-initiated server
restarts more robust.
2025-01-03 22:49:36 +03:00
Luoyayu
778a979714 lsp: Fix format of JSON-RPC content part ending with \r\n 2024-12-10 01:27:28 +00:00
Szepesi Tibor
6bae860326
lsp: Fix semantic token positions 2024-06-20 13:38:12 +02:00
James Westman
1c8d7daea2 lsp: Fix deprecation warnings 2024-04-06 14:33:20 -05:00
James Westman
6a078ee075 Add warning for unused imports 2024-04-06 14:33:20 -05:00
James Westman
6522421251 Fix formatting 2024-02-01 19:38:19 -06:00
gregorni
e5cde71fc1 Tiny formatter improvements 2023-12-19 02:29:09 +00:00
Sonny Piers
3c424d03a4 lsp: Fix bad argument for compile 2023-11-03 23:14:42 +01:00
JCWasmx86
ceb70271fd lsp: Fix classname 2023-11-03 15:26:08 +00:00
Gregor Niehl
4fa64cdf33 Add a formatter 2023-11-03 06:49:22 -05:00
Urtsi Santsi
cf136ab09f Add notice that the file is generated
Fixes #123
2023-09-17 02:25:39 +03:00
z00000000z
bcac788456 completions: property_completer improvements 2023-08-23 16:21:37 +00:00
James Westman
3bcc9f4cbd Use the new Range class in more places 2023-07-25 20:01:41 -05:00
James Westman
62f74178f7 lsp: Implement "go to definition" 2023-07-25 18:40:05 -05:00
James Westman
e087aeb44f lsp: Add document outline 2023-07-25 17:59:52 -05:00
James Westman
950b141d26 lsp: Mark deprecation warnings
Some editors use different styling (e.g. strikethrough) for deprecation
warnings.
2023-07-23 18:17:48 -05:00
gregorni
3730e2e726 Add isort to CI and run on files 2023-07-09 14:26:37 +00:00
AkshayWarrier
f526cfa4d9 lsp: Decompile empty XML docs to empty strings 2023-06-14 00:29:04 +00:00
seshotake
9c567fe039 lsp: Make SemanticTokenServerCapabilities match the LSP spec
SemanticTokenSeverCapabilities doesn't deserealize because legend requires a tokenModifiers array, which not provided.
See: https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#semanticTokensLegend
2023-06-05 05:15:51 +03:00
Sonny Piers
6f4806bfb3 lsp: Add compile an decompile commands 2023-03-19 22:14:42 +00:00
James Westman
0b7dbaf90d
Add some type hints 2023-01-12 15:49:19 -06:00
James Westman
b6ee649458
Simplify error & warning handling 2023-01-12 15:49:19 -06:00
Sonny Piers
f7aa7d0be2 lsp: Support change events with no range
range is optional

https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocumentContentChangeEvent
2022-12-25 18:09:57 +01:00
James Westman
8fee46ec68
Format using black 2022-12-19 11:52:59 -06:00
James Westman
b915c227f8
Fix type declaration 2022-11-26 17:10:53 -06:00
James Westman
b3783b9c6a
lsp: Log to stderr rather than a file 2022-10-15 11:26:18 -05:00
Sonny Piers
50db59f2d2 lsp: Report error hints 2022-07-25 00:52:05 +02:00
James Westman
aca8dd794b
lsp: Set diagnostic relatedInformation 2022-06-08 23:08:15 -05:00
James Westman
65691dfac6
Include version number in lsp and cli
Fixes #61.
2022-06-08 22:25:22 -05:00
James Westman
6576e02837
lsp: Report warnings correctly
Previously all diagnostics had the "error" severity, now warnings are
correctly reported as such
2022-03-15 23:06:45 -05:00
James Westman
9873a2072b Add warning for sync-create 2022-02-09 15:39:02 -06:00
James Westman
d23c06b8fd
lsp: Fix text encoding issue
Content-Length is the number of bytes in the message, but the JSONRPC
code was interpreting it as a number of characters (when both reading and
writing), which caused it to fail on multibyte UTF-8 characters.
2021-12-06 11:46:33 -06:00
James Westman
544d152fb6
Rename to blueprint-compiler
This isn't an official GTK project so better to avoid using "GTK" in the
name.
2021-12-01 15:35:58 -06:00
Renamed from gtkblueprinttool/lsp.py (Browse further)