mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
36d877be4a
VScode will typically send a `textDocument/semanticTokens/full` request followed by `textDocument/semanticTokens/range`, and occassionally request semantic tokens even when we know nothing has changed. Semantic tokens also get refreshed on each change. Computing semantic tokens is relatively heavy in TSC, so we should avoid it as much as possible. Caches the semantic tokens for open documents, to avoid making TSC do unnecessary work. Results in a noticeable improvement in local benchmarking before: ``` Starting Deno benchmark -> Start benchmarking lsp - Simple Startup/Shutdown (10 runs, mean: 383ms) - Big Document/Several Edits (5 runs, mean: 1079ms) - Find/Replace (10 runs, mean: 59ms) - Code Lens (10 runs, mean: 440ms) - deco-cx/apps Multiple Edits + Navigation (5 runs, mean: 9921ms) <- End benchmarking lsp ``` after: ``` Starting Deno benchmark -> Start benchmarking lsp - Simple Startup/Shutdown (10 runs, mean: 395ms) - Big Document/Several Edits (5 runs, mean: 1024ms) - Find/Replace (10 runs, mean: 56ms) - Code Lens (10 runs, mean: 438ms) - deco-cx/apps Multiple Edits + Navigation (5 runs, mean: 8927ms) <- End benchmarking lsp ``` |
||
---|---|---|
.. | ||
testing | ||
analysis.rs | ||
cache.rs | ||
capabilities.rs | ||
client.rs | ||
code_lens.rs | ||
completions.rs | ||
config.rs | ||
diagnostics.rs | ||
documents.rs | ||
jsr.rs | ||
language_server.rs | ||
logging.rs | ||
lsp_custom.rs | ||
mod.rs | ||
npm.rs | ||
parent_process_checker.rs | ||
path_to_regex.rs | ||
performance.rs | ||
README.md | ||
refactor.rs | ||
registries.rs | ||
repl.rs | ||
resolver.rs | ||
search.rs | ||
semantic_tokens.rs | ||
text.rs | ||
tsc.rs | ||
urls.rs |
Deno Language Server
The Deno Language Server provides a server implementation of the
Language Server Protocol
which is specifically tailored to provide a Deno view of code. It is
integrated into the command line and can be started via the lsp
sub-command.
This documentation has been moved to the Deno manual.