microsoft/language-server-protocol

Better document

Open

#1,887 建立於 2024年1月20日

在 GitHub 查看
 (4 留言) (1 反應) (0 負責人)HTML (12,810 star) (956 fork)batch import
clarificationhelp wanted

描述

It's hard to guess what an ability does, the specification is vague. I hope there is a screen recording/diff image (before-after) or something for each ability else to make it easier to understand.

Here are some questions I've met.

To provide type-aware code highlights, which one should I implement? Document Highlight or Document Color? No, it's Semantic Tokens.

What's the benefit of implementing Document Highlights? It looks like my editor (VSCode) already provides highlight when I selecting a text. The answer is (afaik), we can do scope analysis.

import { a } from 'mod'
function f(a) {
    a // highlights "a" in line 2 but not line 1 or line 5
}
a // highlights "a" in line 1 but not line 2 or line 3

Should I implement Document Link? What's the typical use case of it? What's the difference between Goto Definition?

What does Selection Range do? Is it related to the editor's "expand selection range" functionality?

What's the difference between Inline Value and Inlay Hint?

What is Monikers? Should I implement it? What can it do?

What's the difference between Signature Help and Hover?

I have experience with HTML and JSX so I know what Linked Editing Range can do. This can be unclear for other implementors that if they should implement this.

貢獻者指南