Comments (10)
the error message that I got is:
[coc.nvim] Organize import action not found
from coc.nvim.
Can't reproduce, the editor.action.organizeImport
command works as expected.
Enable the verbose
trace logs, search organizeImports
request and response to check the logs from the server.
from coc.nvim.
@fannheyward I turned on verbose and when I trigger
command! -nargs=0 OR :call CocActionAsync('runCommand', 'editor.action.organizeImport')
there doesn't seem to be any trace related to organizeimports
here the whole log
Details
``` [Trace - 22:35:26.976] Sending request 'initialize - (0)'. Params: { "processId": 200016, "rootPath": "/home/cj/Downloads/test-rs", "rootUri": "file:///home/cj/Downloads/test-rs", "capabilities": { "workspace": { "applyEdit": true, "workspaceEdit": { "documentChanges": true, "resourceOperations": [ "create", "rename", "delete" ], "failureHandling": "undo", "normalizesLineEndings": true, "changeAnnotationSupport": { "groupsOnLabel": false } }, "didChangeConfiguration": { "dynamicRegistration": true }, "didChangeWatchedFiles": { "dynamicRegistration": true, "relativePatternSupport": true }, "codeLens": { "refreshSupport": true }, "executeCommand": { "dynamicRegistration": true }, "configuration": true, "fileOperations": { "dynamicRegistration": true, "didCreate": true, "didRename": true, "didDelete": true, "willCreate": true, "willRename": true, "willDelete": true }, "semanticTokens": { "refreshSupport": true }, "inlayHint": { "refreshSupport": true }, "inlineValue": { "refreshSupport": true }, "diagnostics": { "refreshSupport": true }, "symbol": { "dynamicRegistration": true, "symbolKind": { "valueSet": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 ] }, "tagSupport": { "valueSet": [ 1 ] }, "resolveSupport": { "properties": [ "location.range" ] } }, "workspaceFolders": true }, "textDocument": { "publishDiagnostics": { "relatedInformation": true, "versionSupport": true, "tagSupport": { "valueSet": [ 1, 2 ] }, "codeDescriptionSupport": true, "dataSupport": true }, "synchronization": { "dynamicRegistration": true, "willSave": true, "willSaveWaitUntil": true, "didSave": true }, "completion": { "dynamicRegistration": true, "contextSupport": true, "completionItem": { "snippetSupport": true, "commitCharactersSupport": true, "documentationFormat": [ "markdown", "plaintext" ], "deprecatedSupport": true, "preselectSupport": true, "insertReplaceSupport": true, "tagSupport": { "valueSet": [ 1 ] }, "resolveSupport": { "properties": [ "documentation", "detail", "additionalTextEdits" ] }, "labelDetailsSupport": true, "insertTextModeSupport": { "valueSet": [ 1, 2 ] } }, "completionItemKind": { "valueSet": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 ] }, "insertTextMode": 2, "completionList": { "itemDefaults": [ "commitCharacters", "editRange", "insertTextFormat", "insertTextMode" ] } }, "hover": { "dynamicRegistration": true, "contentFormat": [ "markdown", "plaintext" ] }, "signatureHelp": { "dynamicRegistration": true, "contextSupport": true, "signatureInformation": { "documentationFormat": [ "markdown", "plaintext" ], "activeParameterSupport": true, "parameterInformation": { "labelOffsetSupport": true } } }, "references": { "dynamicRegistration": true }, "definition": { "dynamicRegistration": true, "linkSupport": true }, "documentHighlight": { "dynamicRegistration": true }, "documentSymbol": { "dynamicRegistration": true, "symbolKind": { "valueSet": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26 ] }, "hierarchicalDocumentSymbolSupport": true, "tagSupport": { "valueSet": [ 1 ] }, "labelSupport": true }, "codeAction": { "dynamicRegistration": true, "isPreferredSupport": true, "disabledSupport": true, "dataSupport": true, "honorsChangeAnnotations": false, "resolveSupport": { "properties": [ "edit" ] }, "codeActionLiteralSupport": { "codeActionKind": { "valueSet": [ "", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports" ] } } }, "codeLens": { "dynamicRegistration": true }, "formatting": { "dynamicRegistration": true }, "rangeFormatting": { "dynamicRegistration": true }, "onTypeFormatting": { "dynamicRegistration": true }, "rename": { "dynamicRegistration": true, "prepareSupport": true, "honorsChangeAnnotations": true, "prepareSupportDefaultBehavior": 1 }, "documentLink": { "dynamicRegistration": true, "tooltipSupport": true }, "typeDefinition": { "dynamicRegistration": true, "linkSupport": true }, "implementation": { "dynamicRegistration": true, "linkSupport": true }, "declaration": { "dynamicRegistration": true, "linkSupport": true }, "colorProvider": { "dynamicRegistration": true }, "foldingRange": { "dynamicRegistration": true, "rangeLimit": 5000, "lineFoldingOnly": true, "foldingRangeKind": { "valueSet": [ "comment", "imports", "region" ] }, "foldingRange": { "collapsedText": false } }, "selectionRange": { "dynamicRegistration": true }, "callHierarchy": { "dynamicRegistration": true }, "linkedEditingRange": { "dynamicRegistration": true }, "semanticTokens": { "dynamicRegistration": true, "tokenTypes": [ "namespace", "type", "class", "enum", "interface", "struct", "typeParameter", "parameter", "variable", "property", "enumMember", "event", "function", "method", "macro", "keyword", "modifier", "comment", "string", "number", "regexp", "decorator", "operator" ], "tokenModifiers": [ "declaration", "definition", "readonly", "static", "deprecated", "abstract", "async", "modification", "documentation", "defaultLibrary" ], "formats": [ "relative" ], "requests": { "range": true, "full": { "delta": true } }, "multilineTokenSupport": false, "overlappingTokenSupport": false, "serverCancelSupport": true, "augmentsSyntaxTokens": true }, "inlayHint": { "dynamicRegistration": true, "resolveSupport": { "properties": [ "tooltip", "textEdits", "label.tooltip", "label.location", "label.command" ] } }, "inlineValue": { "dynamicRegistration": true }, "diagnostic": { "dynamicRegistration": true, "relatedDocumentSupport": true }, "typeHierarchy": { "dynamicRegistration": true } }, "window": { "showMessage": { "messageActionItem": { "additionalPropertiesSupport": true } }, "showDocument": { "support": true } }, "general": { "regularExpressions": { "engine": "ECMAScript", "version": "ES2020" }, "markdown": { "parser": "marked", "version": "7.0.5" }, "positionEncodings": [ "utf-16" ], "staleRequestSupport": { "cancel": true, "retryOnContentModified": [ "textDocument/inlayHint", "textDocument/semanticTokens/full", "textDocument/semanticTokens/range", "textDocument/semanticTokens/full/delta" ] } }, "experimental": { "snippetTextEdit": true, "serverStatusNotification": true, "commands": { "commands": [ "rust-analyzer.runSingle", "rust-analyzer.debugSingle", "rust-analyzer.showReferences", "rust-analyzer.gotoLocation", "editor.action.triggerParameterHints" ] } } }, "initializationOptions": { "enable": true, "disableProgressNotifications": true, "terminal": { "startinsert": false }, "debug": { "runtime": "nvim-dap", "vimspector": { "configuration": { "name": "rust - launch" } }, "nvimdap": { "configuration": { "template": "{ name = \"Debug (with args)\", type = \"codelldb\", request = \"launch\", program = $exe, args =[Trace - 22:35:26.981] Received response 'initialize - (0)' in 5ms.
Result: {
"capabilities": {
"positionEncoding": "utf-16",
"textDocumentSync": {
"openClose": true,
"change": 2,
"save": {}
},
"selectionRangeProvider": true,
"hoverProvider": true,
"completionProvider": {
"resolveProvider": true,
"triggerCharacters": [
":",
".",
"'",
"("
],
"completionItem": {
"labelDetailsSupport": true
}
},
"signatureHelpProvider": {
"triggerCharacters": [
"(",
",",
"<"
]
},
"definitionProvider": true,
"typeDefinitionProvider": true,
"implementationProvider": true,
"referencesProvider": true,
"documentHighlightProvider": true,
"documentSymbolProvider": true,
"workspaceSymbolProvider": true,
"codeActionProvider": {
"codeActionKinds": [
"",
"quickfix",
"refactor",
"refactor.extract",
"refactor.inline",
"refactor.rewrite"
],
"resolveProvider": true
},
"codeLensProvider": {
"resolveProvider": true
},
"documentFormattingProvider": true,
"documentRangeFormattingProvider": true,
"documentOnTypeFormattingProvider": {
"firstTriggerCharacter": "=",
"moreTriggerCharacter": [
".",
">",
"{",
"(",
"<"
]
},
"renameProvider": {
"prepareProvider": true
},
"foldingRangeProvider": true,
"declarationProvider": true,
"workspace": {
"workspaceFolders": {
"supported": true,
"changeNotifications": true
},
"fileOperations": {
"willRename": {
"filters": [
{
"scheme": "file",
"pattern": {
"glob": "/*.rs",
"matches": "file"
}
},
{
"scheme": "file",
"pattern": {
"glob": "",
"matches": "folder"
}
}
]
}
}
},
"callHierarchyProvider": true,
"semanticTokensProvider": {
"legend": {
"tokenTypes": [
"comment",
"decorator",
"enumMember",
"enum",
"function",
"interface",
"keyword",
"macro",
"method",
"namespace",
"number",
"operator",
"parameter",
"property",
"string",
"struct",
"typeParameter",
"variable",
"angle",
"arithmetic",
"attributeBracket",
"attribute",
"bitwise",
"boolean",
"brace",
"bracket",
"builtinAttribute",
"builtinType",
"character",
"colon",
"comma",
"comparison",
"constParameter",
"const",
"deriveHelper",
"derive",
"dot",
"escapeSequence",
"formatSpecifier",
"generic",
"invalidEscapeSequence",
"label",
"lifetime",
"logical",
"macroBang",
"parenthesis",
"procMacro",
"punctuation",
"selfKeyword",
"selfTypeKeyword",
"semicolon",
"static",
"toolModule",
"typeAlias",
"union",
"unresolvedReference"
],
"tokenModifiers": [
"async",
"documentation",
"declaration",
"static",
"defaultLibrary",
"associated",
"attribute",
"callable",
"constant",
"consuming",
"controlFlow",
"crateRoot",
"injected",
"intraDocLink",
"library",
"macro",
"mutable",
"procMacro",
"public",
"reference",
"trait",
"unsafe"
]
},
"range": true,
"full": {
"delta": true
}
},
"inlayHintProvider": {
"resolveProvider": true
},
"experimental": {
"externalDocs": true,
"hoverRange": true,
"joinLines": true,
"matchingBrace": true,
"moveItem": true,
"onEnter": true,
"openCargoToml": true,
"parentModule": true,
"runnables": {
"kinds": [
"cargo"
]
},
"ssr": true,
"workspaceSymbolScopeKindFiltering": true
}
},
"serverInfo": {
"name": "rust-analyzer",
"version": "0.3.1995-standalone"
}
}
[Trace - 22:35:26.981] Sending notification 'initialized'.
Params: {}
[Trace - 22:35:26.999] Sending notification 'textDocument/didOpen'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs",
"languageId": "rust",
"version": 1,
"text": "fn main() {\n fs\n println!("Hello, world!");\n}\n"
}
}
[Trace - 22:35:27.014] Received notification 'experimental/serverStatus'.
Params: {
"health": "ok",
"quiescent": false,
"message": null
}
[Trace - 22:35:27.014] Received request 'client/registerCapability - (0)'.
Params: {
"registrations": [
{
"id": "textDocument/didSave",
"method": "textDocument/didSave",
"registerOptions": {
"includeText": false,
"documentSelector": [
{
"pattern": "/*.rs"
},
{
"pattern": "/Cargo.toml"
},
{
"pattern": "/Cargo.lock"
},
{
"pattern": "/rust-analyzer.toml"
}
]
}
}
]
}
[Trace - 22:35:27.014] Sending response 'client/registerCapability - (0)'. Processing request took 0ms
No result returned.
[Trace - 22:35:27.089] Received request 'client/registerCapability - (1)'.
Params: {
"registrations": [
{
"id": "workspace/didChangeWatchedFiles",
"method": "workspace/didChangeWatchedFiles",
"registerOptions": {
"watchers": [
{
"globPattern": {
"baseUri": "file:///home/cj/Downloads/test-rs",
"pattern": "/*.rs"
}
},
{
"globPattern": {
"baseUri": "file:///home/cj/Downloads/test-rs",
"pattern": "/Cargo.{lock,toml}"
}
},
{
"globPattern": {
"baseUri": "file:///home/cj/Downloads/test-rs",
"pattern": "**/rust-analyzer.toml"
}
},
{
"globPattern": "/home/cj/.config/rust-analyzer/rust-analyzer.toml"
},
{
"globPattern": "/home/cj/Downloads/test-rs/rust-analyzer.toml"
},
{
"globPattern": "/home/cj/Downloads/test-rs/Cargo.toml"
}
]
}
}
]
}
[Trace - 22:35:27.090] Sending response 'client/registerCapability - (1)'. Processing request took 1ms
No result returned.
[Trace - 22:35:27.167] Received request 'workspace/semanticTokens/refresh - (2)'.
[Trace - 22:35:27.167] Sending response 'workspace/semanticTokens/refresh - (2)'. Processing request took 0ms
No result returned.
[Trace - 22:35:27.167] Received request 'workspace/codeLens/refresh - (3)'.
[Trace - 22:35:27.167] Sending response 'workspace/codeLens/refresh - (3)'. Processing request took 0ms
No result returned.
[Trace - 22:35:27.167] Received request 'workspace/inlayHint/refresh - (4)'.
[Trace - 22:35:27.167] Sending response 'workspace/inlayHint/refresh - (4)'. Processing request took 0ms
No result returned.
[Trace - 22:35:27.185] Received notification 'textDocument/publishDiagnostics'.
Params: {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs",
"diagnostics": [
{
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 6
}
},
"severity": 1,
"code": "syntax-error",
"codeDescription": {
"href": "https://doc.rust-lang.org/stable/error_codes/syntax-error.html"
},
"source": "rust-analyzer",
"message": "Syntax Error: expected SEMICOLON"
}
],
"version": 1
}
[Trace - 22:35:27.235] Received notification 'textDocument/publishDiagnostics'.
Params: {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs",
"diagnostics": [
{
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 6
}
},
"severity": 1,
"code": "syntax-error",
"codeDescription": {
"href": "https://doc.rust-lang.org/stable/error_codes/syntax-error.html"
},
"source": "rust-analyzer",
"message": "Syntax Error: expected SEMICOLON"
},
{
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 6
}
},
"severity": 1,
"source": "rustc",
"message": "expected ;
, found println
",
"relatedInformation": [
{
"location": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs",
"range": {
"start": {
"line": 2,
"character": 4
},
"end": {
"line": 2,
"character": 11
}
}
},
"message": "unexpected token"
},
{
"location": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs",
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 6
}
}
},
"message": "add ;
here: ;
"
}
],
"data": {
"rendered": "error: expected ;
, found println
\n --> src/main.rs:2:7\n |\n2 | fs\n | ^ help: add ;
here\n3 | println!("Hello, world!");\n | ------- unexpected token\n\n"
}
},
{
"range": {
"start": {
"line": 2,
"character": 4
},
"end": {
"line": 2,
"character": 11
}
},
"severity": 4,
"source": "rustc",
"message": "unexpected token",
"relatedInformation": [
{
"location": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs",
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 6
}
}
},
"message": "original diagnostic"
}
]
},
{
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 6
}
},
"severity": 4,
"source": "rustc",
"message": "add ;
here: ;
",
"relatedInformation": [
{
"location": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs",
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 6
}
}
},
"message": "original diagnostic"
}
]
}
],
"version": 1
}
[Trace - 22:35:27.243] Received request 'workspace/semanticTokens/refresh - (5)'.
[Trace - 22:35:27.243] Sending response 'workspace/semanticTokens/refresh - (5)'. Processing request took 0ms
No result returned.
[Trace - 22:35:27.243] Received request 'workspace/codeLens/refresh - (6)'.
[Trace - 22:35:27.243] Sending response 'workspace/codeLens/refresh - (6)'. Processing request took 0ms
No result returned.
[Trace - 22:35:27.243] Received request 'workspace/inlayHint/refresh - (7)'.
[Trace - 22:35:27.243] Sending response 'workspace/inlayHint/refresh - (7)'. Processing request took 0ms
No result returned.
[Trace - 22:35:27.263] Received notification 'experimental/serverStatus'.
Params: {
"health": "ok",
"quiescent": true,
"message": null
}
[Trace - 22:35:27.310] Received notification 'textDocument/publishDiagnostics'.
Params: {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs",
"diagnostics": [
{
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 6
}
},
"severity": 1,
"code": "syntax-error",
"codeDescription": {
"href": "https://doc.rust-lang.org/stable/error_codes/syntax-error.html"
},
"source": "rust-analyzer",
"message": "Syntax Error: expected SEMICOLON"
},
{
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 6
}
},
"severity": 1,
"source": "rustc",
"message": "expected ;
, found println
",
"relatedInformation": [
{
"location": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs",
"range": {
"start": {
"line": 2,
"character": 4
},
"end": {
"line": 2,
"character": 11
}
}
},
"message": "unexpected token"
},
{
"location": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs",
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 6
}
}
},
"message": "add ;
here: ;
"
}
],
"data": {
"rendered": "error: expected ;
, found println
\n --> src/main.rs:2:7\n |\n2 | fs\n | ^ help: add ;
here\n3 | println!("Hello, world!");\n | ------- unexpected token\n\n"
}
},
{
"range": {
"start": {
"line": 2,
"character": 4
},
"end": {
"line": 2,
"character": 11
}
},
"severity": 4,
"source": "rustc",
"message": "unexpected token",
"relatedInformation": [
{
"location": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs",
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 6
}
}
},
"message": "original diagnostic"
}
]
},
{
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 6
}
},
"severity": 4,
"source": "rustc",
"message": "add ;
here: ;
",
"relatedInformation": [
{
"location": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs",
"range": {
"start": {
"line": 1,
"character": 6
},
"end": {
"line": 1,
"character": 6
}
}
},
"message": "original diagnostic"
}
]
}
],
"version": 1
}
[Trace - 22:35:27.394] Sending request 'textDocument/inlayHint - (1)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 4,
"character": 0
}
}
}
[Trace - 22:35:27.426] Sending request 'textDocument/documentSymbol - (2)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:35:27.426] Sending request 'textDocument/codeLens - (3)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:35:27.426] Received response 'textDocument/documentSymbol - (2)' in 0ms.
Result: [
{
"name": "main",
"detail": "fn()",
"kind": 12,
"tags": [],
"deprecated": false,
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 3,
"character": 1
}
},
"selectionRange": {
"start": {
"line": 0,
"character": 3
},
"end": {
"line": 0,
"character": 7
}
}
}
]
[Trace - 22:35:27.426] Received response 'textDocument/codeLens - (3)' in 0ms.
Result: []
[Trace - 22:35:27.444] Sending request 'textDocument/codeLens - (4)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:35:27.444] Received response 'textDocument/codeLens - (4)' in 0ms.
Result: []
[Trace - 22:35:27.777] Sending notification '$/cancelRequest'.
Params: {
"id": 1
}
[Trace - 22:35:27.778] Sending request 'textDocument/inlayHint - (5)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 4,
"character": 0
}
}
}
[Trace - 22:35:27.778] Received response 'textDocument/inlayHint - (1)' in 384ms. Request failed: canceled by client (-32800).
[Error - 22:35:27.778] Sending request textDocument/inlayHint failed.
Message: canceled by client
Code: -32800
[Trace - 22:35:27.987] Sending notification '$/cancelRequest'.
Params: {
"id": 5
}
[Trace - 22:35:27.987] Sending request 'textDocument/inlayHint - (6)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"range": {
"start": {
"line": 0,
"character": 0
},
"end": {
"line": 4,
"character": 0
}
}
}
[Trace - 22:35:27.987] Received response 'textDocument/inlayHint - (5)' in 209ms. Request failed: canceled by client (-32800).
[Error - 22:35:27.987] Sending request textDocument/inlayHint failed.
Message: canceled by client
Code: -32800
[Trace - 22:35:28.137] Sending request 'textDocument/codeLens - (7)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:35:28.137] Sending request 'textDocument/documentHighlight - (8)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"position": {
"line": 1,
"character": 5
}
}
[Trace - 22:35:28.138] Received response 'textDocument/codeLens - (7)' in 1ms.
Result: []
[Trace - 22:35:28.437] Sending notification '$/cancelRequest'.
Params: {
"id": 8
}
[Trace - 22:35:28.438] Received response 'textDocument/documentHighlight - (8)' in 301ms. Request failed: canceled by client (-32800).
[Error - 22:35:28.438] Sending request textDocument/documentHighlight failed.
Message: canceled by client
Code: -32800
[Trace - 22:35:28.567] Received response 'textDocument/inlayHint - (6)' in 580ms.
Result: []
[Trace - 22:35:32.460] Sending request 'textDocument/codeLens - (9)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:35:32.460] Sending request 'textDocument/documentHighlight - (10)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"position": {
"line": 1,
"character": 5
}
}
[Trace - 22:35:32.461] Received response 'textDocument/codeLens - (9)' in 1ms.
Result: []
[Trace - 22:35:32.461] Received response 'textDocument/documentHighlight - (10)' in 1ms.
No result returned.
[Trace - 22:35:51.381] Sending request 'textDocument/codeLens - (11)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:35:51.382] Sending request 'textDocument/documentHighlight - (12)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"position": {
"line": 1,
"character": 5
}
}
[Trace - 22:35:51.383] Received response 'textDocument/codeLens - (11)' in 2ms.
Result: []
[Trace - 22:35:51.383] Received response 'textDocument/documentHighlight - (12)' in 1ms.
No result returned.
[Trace - 22:35:59.348] Sending request 'textDocument/codeLens - (13)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:35:59.349] Sending request 'textDocument/documentHighlight - (14)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"position": {
"line": 1,
"character": 5
}
}
[Trace - 22:35:59.350] Received response 'textDocument/codeLens - (13)' in 1ms.
Result: []
[Trace - 22:35:59.351] Received response 'textDocument/documentHighlight - (14)' in 2ms.
No result returned.
[Trace - 22:36:06.904] Sending request 'textDocument/codeLens - (15)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:36:06.904] Sending request 'textDocument/documentHighlight - (16)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"position": {
"line": 1,
"character": 5
}
}
[Trace - 22:36:06.905] Received response 'textDocument/codeLens - (15)' in 1ms.
Result: []
[Trace - 22:36:06.906] Received response 'textDocument/documentHighlight - (16)' in 2ms.
No result returned.
[Trace - 22:36:09.840] Sending request 'textDocument/codeLens - (17)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:36:09.841] Sending request 'textDocument/documentHighlight - (18)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"position": {
"line": 0,
"character": 5
}
}
[Trace - 22:36:09.842] Received response 'textDocument/codeLens - (17)' in 1ms.
Result: []
[Trace - 22:36:09.842] Received response 'textDocument/documentHighlight - (18)' in 1ms.
Result: [
{
"range": {
"start": {
"line": 0,
"character": 3
},
"end": {
"line": 0,
"character": 7
}
}
}
]
[Trace - 22:36:10.235] Sending request 'textDocument/codeLens - (19)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:36:10.237] Sending request 'textDocument/documentHighlight - (20)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"position": {
"line": 1,
"character": 5
}
}
[Trace - 22:36:10.238] Received response 'textDocument/codeLens - (19)' in 2ms.
Result: []
[Trace - 22:36:10.238] Received response 'textDocument/documentHighlight - (20)' in 1ms.
No result returned.
[Trace - 22:36:13.242] Sending request 'textDocument/codeLens - (21)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:36:13.242] Sending request 'textDocument/documentHighlight - (22)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"position": {
"line": 1,
"character": 5
}
}
[Trace - 22:36:13.244] Received response 'textDocument/codeLens - (21)' in 2ms.
Result: []
[Trace - 22:36:13.244] Received response 'textDocument/documentHighlight - (22)' in 1ms.
No result returned.
[Trace - 22:36:22.572] Sending request 'textDocument/codeLens - (23)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:36:22.573] Sending request 'textDocument/documentHighlight - (24)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"position": {
"line": 1,
"character": 5
}
}
[Trace - 22:36:22.574] Received response 'textDocument/codeLens - (23)' in 2ms.
Result: []
[Trace - 22:36:22.575] Received response 'textDocument/documentHighlight - (24)' in 2ms.
No result returned.
[Trace - 22:36:41.371] Sending request 'textDocument/codeLens - (25)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:36:41.372] Sending request 'textDocument/documentHighlight - (26)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"position": {
"line": 1,
"character": 5
}
}
[Trace - 22:36:41.372] Received response 'textDocument/codeLens - (25)' in 1ms.
Result: []
[Trace - 22:36:41.373] Received response 'textDocument/documentHighlight - (26)' in 1ms.
No result returned.
[Trace - 22:36:50.199] Sending request 'textDocument/codeLens - (27)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:36:50.199] Sending request 'textDocument/documentHighlight - (28)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"position": {
"line": 1,
"character": 5
}
}
[Trace - 22:36:50.200] Received response 'textDocument/codeLens - (27)' in 1ms.
Result: []
[Trace - 22:36:50.201] Received response 'textDocument/documentHighlight - (28)' in 1ms.
No result returned.
[Trace - 22:36:52.704] Sending request 'textDocument/codeLens - (29)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:36:52.704] Sending request 'textDocument/documentHighlight - (30)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"position": {
"line": 2,
"character": 5
}
}
[Trace - 22:36:52.706] Received response 'textDocument/codeLens - (29)' in 2ms.
Result: []
[Trace - 22:36:52.707] Received response 'textDocument/documentHighlight - (30)' in 3ms.
Result: [
{
"range": {
"start": {
"line": 2,
"character": 4
},
"end": {
"line": 2,
"character": 11
}
}
}
]
[Trace - 22:36:56.934] Sending request 'textDocument/codeLens - (31)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:36:56.935] Sending request 'textDocument/documentHighlight - (32)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
},
"position": {
"line": 2,
"character": 5
}
}
[Trace - 22:36:56.936] Received response 'textDocument/codeLens - (31)' in 1ms.
Result: []
[Trace - 22:36:56.937] Received response 'textDocument/documentHighlight - (32)' in 2ms.
Result: [
{
"range": {
"start": {
"line": 2,
"character": 4
},
"end": {
"line": 2,
"character": 11
}
}
}
]
[Trace - 22:36:57.718] Sending request 'textDocument/codeLens - (33)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:36:57.720] Received response 'textDocument/codeLens - (33)' in 1ms.
Result: []
[Trace - 22:37:24.790] Sending request 'textDocument/codeLens - (34)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:37:24.791] Received response 'textDocument/codeLens - (34)' in 1ms.
Result: []
[Trace - 22:38:03.295] Sending request 'textDocument/codeLens - (35)'.
Params: {
"textDocument": {
"uri": "file:///home/cj/Downloads/test-rs/src/main.rs"
}
}
[Trace - 22:38:03.296] Received response 'textDocument/codeLens - (35)' in 1ms.
Result: []
</details>
from coc.nvim.
Your logs didn't contain the organizeImports
codeAction request, make sure you've triggered it correctly.
from coc.nvim.
@fannheyward as I said I triggered it but somehow nothing sent to the server and nothing happened
from coc.nvim.
After you trigger editor.action.organizeImport
command, coc.nvim will request codeActions from language server, with source.organizeImports
kind to find organizedImport codeAction.
The rust-analyzer didn't provide source.organizeImports
support, you can search codeActionProvider
in the trace logs and rust-analyzer didn't provide source.organizeImports
kind , coc.nvim couldn't find any codeAction, didn't send request and notify you with Organize import action not found
.
You can also test gopls
and you will find gopls provided source.organizeImports
kind codeAction.
from coc.nvim.
thanks that makes it more clear, gopls didn't work on my side, do you use coc-go or gopls directly?
from coc.nvim.
Lol I just didn't a different test and gopls worked! so maybe it just didn't work in simple main.go case
from coc.nvim.
ok it will work if I add:
package main
so I think it's rust-analyzer which caused confusion, I had memories its organize import works before, I'll double check
from coc.nvim.
ok rust-analyzer still didn't implement it
from coc.nvim.
Related Issues (20)
- Failed open exsit file with list in vim HOT 5
- The text above get seleted automatically HOT 2
- The documentation has incorrect installation instructions for NeoBundle HOT 1
- How to remove the highlights when using go references HOT 3
- LinkedEditing not work in vim HOT 1
- help: completion of variables from dotenv files in shell scripts HOT 9
- <CR> can not confirm in vimwiki and folding codes failed HOT 4
- coc.nvim takes up two shortcut keys that I prefer to use. HOT 1
- Error on notification "codeAction": code action without data HOT 4
- Asynchronous Completion for `isIncomplete` Items in coc.nvim
- FEAT: Disable all formatting and linting except for what is output by the `languageservers` in coc-settings.json HOT 2
- 执行`rust-analyzer.reload`后报错 HOT 1
- Incorrect cwd when call vim with '-c cd xxx'
- Cannot confirm autocomplete from non-LSP sources HOT 3
- Using Arduino Language Server
- How to Combine coc-snippets and coc.nvim Configurations to Achieve Desired Tab Key Behavior HOT 1
- Make `:CocUpdate` can use tab
- Change timeout value of CocTagFunc HOT 2
- Programmatical cancel/abort of cursors/range session through editor.action.cancelRanges
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coc.nvim.