-
-
Notifications
You must be signed in to change notification settings - Fork 959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LSP 3.16.0 #2756
LSP 3.16.0 #2756
Conversation
81e5ef6
to
551e4d9
Compare
0171ba9
to
889f911
Compare
The tests are failed because |
889f911
to
78600a6
Compare
I've reverted |
7648463
to
d9e7321
Compare
This comment has been minimized.
This comment has been minimized.
c80fa1f
to
43c8c2b
Compare
|
56f9cb5
to
ec99b6c
Compare
@@ -61,7 +61,7 @@ | |||
"@types/marked": "^1.2.1", | |||
"@types/minimatch": "^3.0.3", | |||
"@types/mkdirp": "^1.0.1", | |||
"@types/node": "^10.12.0", | |||
"@types/node": "12.12.12", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should support node 10.12.0, avoid upgrade types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
node 10 is EOL in April 2021, maybe we can start from node 12? https://nodejs.org/en/about/releases/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There're two reason I bump it to node 12:
- errors from
tsc -p tsconfig.json
shows thatNamespace '"fs"' has no exported member 'Dir'
from fs-extra. cp.SpawnOptionsWithoutStdio
in 06e4b6c, thecreateMessageTransports
changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
node 10 is EOL in April 2021, maybe we can start from node 12? https://nodejs.org/en/about/releases/
Ok, we need update check for node version as well
https://github.com/neoclide/coc.nvim/blob/feat/lsp-316/plugin/coc.vim#L422
https://github.com/neoclide/coc.nvim/blob/feat/lsp-316/esbuild.js#L45
https://github.com/neoclide/coc.nvim/blob/feat/lsp-316/autoload/health/coc.vim#L27
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Limit to 12.12, is the minor version ok? (the minor 12 just jumped into my mind without any search/tests...
private _legend: SemanticTokensLegend | ||
|
||
public register(selector: DocumentSelector, provider: DocumentSemanticTokensProvider, legend: SemanticTokensLegend): Disposable { | ||
this._legend = legend |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems different document could have different legend, can be added to item.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The legend is came from LS in initialize
request, it's not document related. Did I misunderstand something?
coc requests with all tokenTypes
and tokenModifiers
, LS responses supported legend, so I don't think it's document related.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've check the doc, it is language server related, so different language server could have different SemanticTokensLegend
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be property of DocumentSemanticTokensProvider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SemanticTokensManager
has legend
property, is this what you expect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also DocumentRangeSemanticTokensProvider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DocumentRangeSemanticTokensProvider
missed a lot, will update it ASAP.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is 004ab14 ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/neoclide/coc.nvim/blob/feat/lsp-316/src/languages.ts#L433 need be replaced with a function that accept document, which return legend
from matched provider when possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Model |
91c1114 fix(diagnostic): avoid change range of diagnostics cad8c6b fix(workspace): fix range of getSelectedRange with line mode 18f81ab chore(picker): use await to avoid test fail 3efce54 fix(diagnostic): no more emptyRange check (#3147) 837941f fix float window position control to consider multigrid ui (#3150) 046505c test(ci): use node12 acd723d fix(completion): avoid unnecessary redraw for floating window (#3151) 10cfe59 docs: inconsistent suggest.triggerCompletionWait value (#3152) dafed9d fix: remove polyfill of Promise.prototyp.finally (#3153) 493ea2e fix(diagnostic): check diagnostic next to eol character 31e76d4 refactor(handler): fetch codelens for all buffers on CursorHold e47e472 fix(diagnostic): adjust diagnostic range which pass last line ba9c5c8 chore(yarn): upgrade esbuild.js 9b60af3 chore(bin): remove unnecessary check.js 179ca72 fix: typos found by github.com/crate-ci/typos (#3146) 70a7903 LSP 3.16.0 (#2756) 8cb6bdc fix(float): should give foldcolumn a default value (#3140) 171ff2b chore(bin): remove unnecessary check.js 1377f3b fix: yarn.lock (#3136)
the Call Hierarchy doesn't support filter |
Major features in LSP 3.16:
Moniker support, not needed in cocWhat's have done:
vscode-languageserver-protocol
,vscode-languageserver-types
to 3.16.0RegistrationType
microsoft/vscode-languageserver-node@bb85e80addclient.end
, microsoft/vscode-languageserver-node@44ab977, but breakssrc/__tests__/client/features.test.ts
completionItem.insertTextModeSupport
src/__tests__/client/features.test.ts
call CocAction('incomingCalls')
and:call CocAction('outgoingCalls')
work, use list UI for now, a better tree view UI is needed Support call hierarchies #1649resolveCodeAction
support, tests passedWindowMiddleware
andShowDocumentRequest
supportSemanticTokensFeature
:call CocAction('semanticHighlight')
LinkedEditingRanges
API readyfileOperations
is working, tests passed!willRename
event is added inworkspace.renameCurrentFile
, tested with rust-analyzer and it works!Steps to test semanticTokens highlights (nvim 0.5 is needed):
CocSem_{tokenType}
in vimrc, for examplehi! link CocSem_semicolon Variable
:call CocActionAsync('showSemanticHighlightInfo')
Thanks to @statiolake's codes and tests, the semanticTokens highlights are working for full document, still needs improvement on delta update
Next: