rust-lang / rust-lang/rust-analyzer

Custom logging implementation could use VS Code's LSP APIs

Open
#13,682 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-enhancement
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

Not really an issue, but just a refactoring suggestion.

I noticed that this repo has a custom logging implementation, but VS Code has a basically identical functionality already implemented here. There's no need to create extra output channels, since VS Code automatically creates one using the client's name.

An example where these LSP client methods are used can be found in the vscode-eslint extension. The output looks as follows:
image

If this sounds like a reasonable suggestion, I would gladly work on the refactoring :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with editors/code/src/util.ts, especially the custom logging implementation linked in the issue. Compare it with the VS Code Language Server client logging methods and the vscode-eslint client example. Done means the existing logging behavior is refactored to use the relevant LSP client APIs without unnecessary extra output channels.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.