about summary refs log tree commit diff
path: root/editors/code/src/client.ts
AgeCommit message (Collapse)AuthorLines
2023-05-18fix: Force disable augmentsSyntaxTokens capability on VSCodeLukas Wirth-0/+20
2023-04-09fix: Fix project linking popup appearing for modules that can be linked to a ↵Lukas Wirth-1/+5
crate
2023-04-04fix: Fix relative path creation using the wrong path accessorLukas Wirth-5/+9
2023-04-04fix: Fix vscode project linking popup buttons being swappedLukas Wirth-3/+4
2023-03-25Fix lintsLukas Wirth-40/+35
2023-03-16feat: Pop a notification prompting the user to add a Cargo.toml of unlinked ↵Lukas Wirth-10/+64
file to the linkedProjects
2023-03-14fix: don't override `linkedProjects` if no workspace was discovered.David Barsky-1/+6
2023-03-14Address review commentsDavid Barsky-1/+3
2023-03-13Remove `rust-analyzer/addProject` in favor of notifying r-a that ↵David Barsky-1/+1
configuration has changed
2023-03-13Add a workspace config-based approach to reloading discovered projects.David Barsky-3/+5
2023-01-23🧹 lsp_ext.tsLukas Wirth-22/+21
2023-01-23Add a 'open server logs' button to the error notificationLukas Wirth-0/+1
2023-01-10Revert "Use ZWNJ to prevent VSCode from forming ligatures between hints and ↵Lukas Wirth-18/+0
code"
2023-01-09Use experimental capability to enable color codesIan Chamberlain-0/+1
2023-01-09Strip colors before matching preview diagnosticsIan Chamberlain-2/+4
2023-01-09Parse + decorate rendered ANSI cargo outputIan Chamberlain-5/+6
Use ANSI control characters to display text decorations matching the VScode terminal theme, and strip them out when providing text content for rustc diagnostics. This adds the small `anser` library to parse the control codes, and it also supports HTML output so it should be fairly easy to switch to a rendered HTML/webview implementation if desired.
2023-01-03Use ZWNJ to prevent VSCode from forming ligatures between hints and codeLukas Wirth-0/+18
2023-01-03Fix diagnostic codeAlex Veber-2/+12
2022-11-18feat: Allow viewing the full compiler diagnostic in a readonly textviewLukas Wirth-2/+40
2022-10-17Implement stop and start server commandsLukas Wirth-0/+8
2022-10-17Refactor language client handlingLukas Wirth-33/+10
2022-10-16Substitute some VSCode variables in the VSCode clientLukas Wirth-4/+22
2022-08-28Move empty diagnostics workaround back into the serverLukas Wirth-16/+0
2022-08-22Remove auto-config patching from the VSCode clientLukas Wirth-6/+0
2022-08-13Pad empty diagnostic messages in relatedInformation as wellLukas Wirth-0/+7
2022-08-13Move VSCode diagnostics workaroudn into client codeLukas Wirth-0/+9
2022-07-23Revert 03a62c180e6a7300d0d7b8c4d680b749c101bcbbLukas Wirth-4/+0
2022-07-09Bump vscode-languageclientLaurențiu Nicola-0/+4
2022-06-05internal: Keep output channels across restartsLukas Wirth-4/+3
2022-05-18"Show implementations" link display error fixAndrei Listochkin-3/+35
While VSCode [uses it's own implementation for URIs](https://github.com/microsoft/vscode-uri) which notably doesn't have any limits of URI size, the renderer itself relies on Web platform engine, that limits the length of the URLs and bails out when the attribute length of an `href` inside `a` tag is too long. Command URIs have a form of `command:command-name?arguments`, where `arguments` is a percent-encoded array of data we want to pass along to the command function. For "Show References" this is a list of all file URIs with locations of every reference, and it can get quite long. This PR introduces another intermediary `linkToCommand` command. When we render a command link, a reference to a command with all its arguments is stored in a map, and instead a `linkToCommand` link is rendered with the key to that map. For now the map is cleaned up periodically (I've set it to every 10 minutes). In general case we'll probably need to introduce TTLs or flags to denote ephemeral links (like these in hover popups) and persistent links and clean those separately. But for now simply keeping the last few links in the map should be good enough. Likewise, we could add code to remove a target command from the map after the link is clicked, but assuming most links in hover sheets won't be clicked anyway this code won't change the overall memory use much. Closes #9926
2022-05-17prettier runAndrei Listochkin-112/+165
2022-05-13Don't make r-a fail to initialize if updating the config failsLukas Wirth-1/+3
2022-05-11Enable variable substitutions before passing them over to R-A serverAndrei Listochkin-3/+4
2022-05-01auto update old configurations to newer onesLukas Wirth-1/+6
2022-04-08Update for languageclient API changesLaurențiu Nicola-3/+3
2022-01-27Support <code> blocks from Rust docsAndrew Onyshchuk-0/+3
2021-07-30feat: gate custom clint-side commands behind capabilitiesAleksey Kladov-0/+9
Some features of rust-analyzer requires support for custom commands on the client side. Specifically, hover & code lens need this. Stock LSP doesn't have a way for the server to know which client-side commands are available. For that reason, we historically were just sending the commands, not worrying whether the client supports then or not. That's not really great though, so in this PR we add infrastructure for the client to explicitly opt-into custom commands, via `extensions` field of the ClientCapabilities. To preserve backwards compatability, if the client doesn't set the field, we assume that it does support all custom commands. In the future, we'll start treating that case as if the client doesn't support commands. So, if you maintain a rust-analyzer client and implement `rust-analyzer/runSingle` and such, please also advertise this via a capability.
2021-07-27lint: Format the typescript files properlyAlexander Gonzalez-13/+13
2021-07-27refactor: Make handle_hover handle ranges tooAlexander Gonzalez-39/+5
2021-07-27feat: Completed the client side implementation of rust-analyzer/hoverRangeAlexander Gonzalez-11/+57
2021-05-26Create tasks for all workspacesKirill Bulatov-6/+1
2021-05-23Fix ts lint errorsKirill Bulatov-2/+2
2021-05-23Send detached files info to server via init paramsKirill Bulatov-2/+13
2021-05-23Start rust-analyzer server for arbitrary rust filesKirill Bulatov-1/+1
2021-04-06More robust status notificationsAleksey Kladov-1/+1
2021-02-16Remove Semantic Tokens flicker workaroundkjeremy-17/+0
https://github.com/microsoft/vscode-languageserver-node/issues/576 has been closed with the latest vscode-languageclient release.
2021-02-14Start LSP 3.17 supportJeremy Kolb-1/+1
2021-02-07fix errorsSahandevs-1/+1
2021-02-07handle promise catchesSahandevs-1/+1
2021-02-07remove unnecessarySahandevs-1/+1