neoclide / coc.nvim

Nodejs extension host for vim & neovim, load extensions like VSCode and host language servers.
Other
24.15k stars 953 forks source link

organizeImport stopped working for months #5035

Closed GopherJ closed 3 weeks ago

GopherJ commented 3 weeks ago

Result from CocInfo

## versions

vim version: NVIM v0.11.0-dev
node version: v18.20.2
coc.nvim version: 0.0.82-c3ae5c3b 2024-05-23 20:39:40 +0800
coc.nvim directory: /home/cj/.vim/plugged/coc.nvim
term: tmux
platform: linux

## Log of coc.nvim

2024-06-10T23:50:46.397 WARN (pid:3566621) [attach] - Plugin not ready on request "documentSymbols" []
2024-06-10T23:50:46.403 ERROR (pid:3566621) [extensions-index] - Error on load package.json of coc-flutter [Error: ENOENT: no such file or directory, open '/home/cj/.config/coc/extensions/node_modules/coc-flutter/package.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/cj/.config/coc/extensions/node_modules/coc-flutter/package.json'
}
2024-06-10T23:50:46.404 ERROR (pid:3566621) [extensions-index] - Error on load package.json of coc-java [Error: ENOENT: no such file or directory, open '/home/cj/.config/coc/extensions/node_modules/coc-java/package.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/cj/.config/coc/extensions/node_modules/coc-java/package.json'
}
2024-06-10T23:50:46.404 ERROR (pid:3566621) [extensions-index] - Error on load package.json of coc-jest [Error: ENOENT: no such file or directory, open '/home/cj/.config/coc/extensions/node_modules/coc-jest/package.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/cj/.config/coc/extensions/node_modules/coc-jest/package.json'
}
2024-06-10T23:50:46.404 ERROR (pid:3566621) [extensions-index] - Error on load package.json of coc-kotlin [Error: ENOENT: no such file or directory, open '/home/cj/.config/coc/extensions/node_modules/coc-kotlin/package.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/cj/.config/coc/extensions/node_modules/coc-kotlin/package.json'
}
2024-06-10T23:50:46.405 ERROR (pid:3566621) [extensions-index] - Error on load package.json of coc-tasks [Error: ENOENT: no such file or directory, open '/home/cj/.config/coc/extensions/node_modules/coc-tasks/package.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/cj/.config/coc/extensions/node_modules/coc-tasks/package.json'
}
2024-06-10T23:50:46.406 ERROR (pid:3566621) [extensions-index] - Error on load package.json of coc-translator [Error: ENOENT: no such file or directory, open '/home/cj/.config/coc/extensions/node_modules/coc-translator/package.json'] {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/home/cj/.config/coc/extensions/node_modules/coc-translator/package.json'
}
2024-06-10T23:50:46.499 INFO (pid:3566621) [extension:coc-git] - Looking for git in: git
2024-06-10T23:50:46.508 WARN (pid:3566621) [workspace] - Extension "coc-lists" registered synchronized autocmd "VimLeavePre", which could be slow.
2024-06-10T23:50:46.529 INFO (pid:3566621) [extension:coc-tabnine] - Using tabnine from /home/cj/.config/coc/extensions/coc-tabnine-data/binaries/4.165.0/x86_64-unknown-linux-musl/TabNine
2024-06-10T23:50:46.616 INFO (pid:3566621) [plugin] - coc.nvim initialized with node: v18.20.2 after 263
2024-06-10T23:50:46.618 INFO (pid:3566621) [services] - LanguageClient go state change: stopped => starting
2024-06-10T23:50:46.632 INFO (pid:3566621) [language-client-index] - Language server "languageserver.go" started with 3566757
2024-06-10T23:50:46.651 INFO (pid:3566621) [services] - LanguageClient go state change: starting => running
2024-06-10T23:50:46.654 INFO (pid:3566621) [services] - service languageserver.go started
2024-06-10T23:50:46.775 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:47.075 INFO (pid:3566621) [attach] - receive notification: highlight []
2024-06-10T23:50:48.321 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:48.672 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:48.673 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:48.721 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 8 ]
2024-06-10T23:50:48.972 INFO (pid:3566621) [attach] - receive notification: highlight []
2024-06-10T23:50:51.486 INFO (pid:3566621) [attach] - receive notification: format []
2024-06-10T23:50:51.494 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:51.516 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 8 ]
2024-06-10T23:50:51.795 INFO (pid:3566621) [attach] - receive notification: highlight []
2024-06-10T23:50:52.146 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:52.445 INFO (pid:3566621) [attach] - receive notification: highlight []
2024-06-10T23:50:52.481 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:52.781 INFO (pid:3566621) [attach] - receive notification: highlight []
2024-06-10T23:50:53.138 INFO (pid:3566621) [attach] - Request action: documentSymbols []
2024-06-10T23:50:53.154 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 8 ]
2024-06-10T23:50:54.885 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:55.105 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:55.110 ERROR (pid:3566621) [provider-manager] - Provider error on provideSelectionRanges: _ResponseError: start: pos 0 is not in range [10754:10790] of file /home/cj/Downloads/test-go/main.go
    at handleResponse (/home/cj/.vim/plugged/coc.nvim/build/index.js:20190:40)
    at handleMessage (/home/cj/.vim/plugged/coc.nvim/build/index.js:20000:11)
    at processMessageQueue (/home/cj/.vim/plugged/coc.nvim/build/index.js:20015:13)
    at Immediate.<anonymous> (/home/cj/.vim/plugged/coc.nvim/build/index.js:19991:11)
    at process.processImmediate (node:internal/timers:476:21) {
  code: 0,
  data: undefined
}
2024-06-10T23:50:55.208 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:56.027 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:56.199 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:56.201 ERROR (pid:3566621) [provider-manager] - Provider error on provideSelectionRanges: _ResponseError: start: pos 0 is not in range [13982:14021] of file /home/cj/Downloads/test-go/main.go
    at handleResponse (/home/cj/.vim/plugged/coc.nvim/build/index.js:20190:40)
    at handleMessage (/home/cj/.vim/plugged/coc.nvim/build/index.js:20000:11)
    at processMessageQueue (/home/cj/.vim/plugged/coc.nvim/build/index.js:20015:13)
    at Immediate.<anonymous> (/home/cj/.vim/plugged/coc.nvim/build/index.js:19991:11)
    at process.processImmediate (node:internal/timers:476:21) {
  code: 0,
  data: undefined
}
2024-06-10T23:50:57.910 INFO (pid:3566621) [attach] - Request action: doKeymap [ 'i-PGJzPg==' ]
2024-06-10T23:50:57.916 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:58.205 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:58.209 ERROR (pid:3566621) [provider-manager] - Provider error on provideSelectionRanges: _ResponseError: start: pos 0 is not in range [20450:20489] of file /home/cj/Downloads/test-go/main.go
    at handleResponse (/home/cj/.vim/plugged/coc.nvim/build/index.js:20190:40)
    at handleMessage (/home/cj/.vim/plugged/coc.nvim/build/index.js:20000:11)
    at processMessageQueue (/home/cj/.vim/plugged/coc.nvim/build/index.js:20015:13)
    at Immediate.<anonymous> (/home/cj/.vim/plugged/coc.nvim/build/index.js:19991:11)
    at process.processImmediate (node:internal/timers:476:21) {
  code: 0,
  data: undefined
}
2024-06-10T23:50:59.524 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:59.884 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:59.885 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:50:59.932 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 8 ]
2024-06-10T23:51:00.091 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:00.193 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:00.533 INFO (pid:3566621) [attach] - receive notification: doAutocmd [
  3,
  {
    regcontents: [ '  fmt.Println(2)' ],
    visual: false,
    inclusive: false,
    regname: '',
    operator: 'd',
    regtype: 'V'
  },
  1,
  1000
]
2024-06-10T23:51:00.535 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:00.596 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 8 ]
2024-06-10T23:51:00.655 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:00.956 INFO (pid:3566621) [attach] - receive notification: highlight []
2024-06-10T23:51:01.669 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:02.273 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:02.274 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:02.476 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 8 ]
2024-06-10T23:51:02.575 INFO (pid:3566621) [attach] - receive notification: highlight []
2024-06-10T23:51:03.843 INFO (pid:3566621) [attach] - receive notification: runCommand [ 'editor.action.organizeImport' ]
2024-06-10T23:51:05.402 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:05.604 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 8 ]
2024-06-10T23:51:05.702 INFO (pid:3566621) [attach] - receive notification: highlight []
2024-06-10T23:51:10.672 INFO (pid:3566621) [attach] - receive notification: installExtensions [ 'coc-go' ]
2024-06-10T23:51:10.692 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 4, 3 ]
2024-06-10T23:51:10.715 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:10.794 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:10.894 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:10.994 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:11.099 INFO (pid:3566621) [extension-installer] - Fetched info of coc-go {
  'dist.tarball': 'https://registry.npmmirror.com/coc-go/-/coc-go-1.3.33.tgz',
  'engines.coc': '^0.0.82',
  version: '1.3.33',
  name: 'coc-go'
}
2024-06-10T23:51:11.102 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:11.182 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:11.197 INFO (pid:3566621) [attach] - Request action: documentSymbols []
2024-06-10T23:51:11.458 INFO (pid:3566621) [model-download] - Download completed: URL {
  href: 'https://registry.npmmirror.com/coc-go/-/coc-go-1.3.33.tgz',
  origin: 'https://registry.npmmirror.com',
  protocol: 'https:',
  username: '',
  password: '',
  host: 'registry.npmmirror.com',
  hostname: 'registry.npmmirror.com',
  port: '',
  pathname: '/coc-go/-/coc-go-1.3.33.tgz',
  search: '',
  searchParams: URLSearchParams {},
  hash: ''
}
2024-06-10T23:51:11.458 INFO (pid:3566621) [model-download] - Downloaded https://registry.npmmirror.com/coc-go/-/coc-go-1.3.33.tgz => /home/cj/.config/coc/extensions/node_modules/coc-go-c7b54694-799c-4ac8-80e8-5c0ce53c189d
2024-06-10T23:51:11.468 INFO (pid:3566621) [attach] - receive notification: highlight []
2024-06-10T23:51:15.635 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:15.936 INFO (pid:3566621) [attach] - receive notification: highlight []
2024-06-10T23:51:16.399 INFO (pid:3566621) [services] - LanguageClient gopls state change: stopped => starting
2024-06-10T23:51:16.468 INFO (pid:3566621) [services] - LanguageClient gopls state change: starting => running
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.add_dependency already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.add_import already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.apply_fix already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.check_upgrades already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.edit_go_directive already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.fetch_vulncheck_result already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.gc_details already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.generate already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.go_get_package already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.list_imports already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.list_known_packages already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.mem_stats already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.regenerate_cgo already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.remove_dependency already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.reset_go_mod_diagnostics already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.run_go_work_command already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.run_govulncheck already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.run_tests already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.start_debugging already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.start_profile already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.stop_profile already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.test already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.tidy already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.toggle_gc_details already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.update_go_sum already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.upgrade_dependency already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.vendor already registered
2024-06-10T23:51:16.468 WARN (pid:3566621) [commands] - Command gopls.workspace_stats already registered
2024-06-10T23:51:16.469 INFO (pid:3566621) [services] - service go started
2024-06-10T23:51:16.847 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 8 ]
2024-06-10T23:51:17.393 INFO (pid:3566621) [attach] - receive notification: runCommand [ 'explorer', '--preset', 'default' ]
2024-06-10T23:51:17.463 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 4, 4 ]
2024-06-10T23:51:17.467 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:17.482 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:17.782 INFO (pid:3566621) [attach] - receive notification: highlight []
2024-06-10T23:51:17.988 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:18.289 INFO (pid:3566621) [attach] - receive notification: highlight []
2024-06-10T23:51:18.781 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:51:19.081 INFO (pid:3566621) [attach] - receive notification: highlight []
2024-06-10T23:52:10.441 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 5, 3 ]
2024-06-10T23:52:10.486 INFO (pid:3566621) [attach] - receive notification: doAutocmd [ 1 ]
2024-06-10T23:52:10.488 INFO (pid:3566621) [attach] - Request action: documentSymbols []
2024-06-10T23:52:10.770 INFO (pid:3566621) [attach] - receive notification: highlight []

Describe the bug

I haven't used this features for months because it seems broken for months OR I misconfigured something, this feature stopped working for:

Reproduce the bug

https://github.com/GopherJ/dotfiles/blob/cb8ac4fc333890a779bbb7223a9f2b4e85c3357f/coc/.vimrc#L602

func main() {
fmt.Println(1) // try to import fmt
}

Screenshots (optional)

If applicable, add screenshots to help explain your problem.

GopherJ commented 3 weeks ago

the error message that I got is:

[coc.nvim] Organize import action not found
fannheyward commented 3 weeks ago

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.

GopherJ commented 3 weeks ago

@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 = $args, cwd = \"${workspaceFolder}\", stopOnEntry = false, terminal = \"integrated\" }" } } }, "server": { "path": null, "extraEnv": null }, "restartServerOnConfigChange": false, "trace": { "server": "verbose" }, "updates": { "prompt": false, "checkOnStartup": true, "channel": "stable" }, "assist": { "emitMustUse": false, "expressionFillDefault": "todo" }, "cachePriming": { "enable": true, "numThreads": 0 }, "cargo": { "allTargets": true, "autoreload": true, "buildScripts": { "enable": false, "invocationLocation": "workspace", "invocationStrategy": "per_workspace", "overrideCommand": null, "rebuildOnSave": true, "useRustcWrapper": true }, "cfgs": { "debug_assertions": null, "miri": null }, "extraArgs": [], "extraEnv": {}, "features": [], "noDefaultFeatures": false, "sysroot": "discover", "sysrootQueryMetadata": false, "sysrootSrc": null, "target": null, "targetDir": null }, "checkOnSave": true, "check": { "allTargets": true, "command": "check", "extraArgs": [], "extraEnv": {}, "features": null, "ignore": [], "invocationLocation": "workspace", "invocationStrategy": "per_workspace", "noDefaultFeatures": null, "overrideCommand": null, "targets": null, "workspace": true }, "completion": { "autoimport": { "enable": false }, "autoself": { "enable": true }, "callable": { "snippets": "fill_arguments" }, "fullFunctionSignatures": { "enable": false }, "limit": null, "postfix": { "enable": false }, "privateEditable": { "enable": false }, "snippets": { "custom": { "Arc::new": { "postfix": "arc", "body": "Arc::new(${receiver})", "requires": "std::sync::Arc", "description": "Put the expression into an `Arc`", "scope": "expr" }, "Rc::new": { "postfix": "rc", "body": "Rc::new(${receiver})", "requires": "std::rc::Rc", "description": "Put the expression into an `Rc`", "scope": "expr" }, "Box::pin": { "postfix": "pinbox", "body": "Box::pin(${receiver})", "requires": "std::boxed::Box", "description": "Put the expression into a pinned `Box`", "scope": "expr" }, "Ok": { "postfix": "ok", "body": "Ok(${receiver})", "description": "Wrap the expression in a `Result::Ok`", "scope": "expr" }, "Err": { "postfix": "err", "body": "Err(${receiver})", "description": "Wrap the expression in a `Result::Err`", "scope": "expr" }, "Some": { "postfix": "some", "body": "Some(${receiver})", "description": "Wrap the expression in an `Option::Some`", "scope": "expr" } } }, "termSearch": { "enable": false } }, "diagnostics": { "disabled": [ "inactive-code", "unlinked-file", "type-mismatch" ], "enable": true, "experimental": { "enable": false }, "remapPrefix": {}, "styleLints": { "enable": false }, "warningsAsHint": [], "warningsAsInfo": [] }, "files": { "excludeDirs": [], "watcher": "client" }, "highlightRelated": { "breakPoints": { "enable": true }, "closureCaptures": { "enable": true }, "exitPoints": { "enable": true }, "references": { "enable": true }, "yieldPoints": { "enable": true } }, "hover": { "documentation": { "enable": true, "keywords": { "enable": true } }, "links": { "enable": true }, "memoryLayout": { "alignment": "hexadecimal", "enable": true, "niches": false, "offset": "hexadecimal", "size": "both" }, "show": { "enumVariants": 5, "fields": 5, "traitAssocItems": null } }, "imports": { "granularity": { "enforce": false, "group": "crate" }, "group": { "enable": true }, "merge": { "glob": true }, "preferNoStd": false, "preferPrelude": false, "prefix": "crate" }, "inlayHints": { "bindingModeHints": { "enable": false }, "chainingHints": { "enable": false }, "closingBraceHints": { "enable": false, "minLines": 25 }, "closureCaptureHints": { "enable": false }, "closureReturnTypeHints": { "enable": "never" }, "closureStyle": "impl_fn", "discriminantHints": { "enable": "never" }, "expressionAdjustmentHints": { "enable": "never", "hideOutsideUnsafe": false, "mode": "prefix" }, "implicitDrops": { "enable": false }, "lifetimeElisionHints": { "enable": "never", "useParameterNames": false }, "maxLength": 25, "parameterHints": { "enable": false }, "rangeExclusiveHints": { "enable": false }, "reborrowHints": { "enable": "never" }, "renderColons": true, "typeHints": { "enable": false, "hideClosureInitialization": false, "hideNamedConstructor": false } }, "interpret": { "tests": false }, "joinLines": { "joinAssignments": true, "joinElseIf": true, "removeTrailingComma": true, "unwrapTrivialBlock": true }, "lens": { "debug": { "enable": true }, "enable": false, "forceCustomCommands": true, "implementations": { "enable": false }, "location": "above_name", "references": { "adt": { "enable": false }, "enumVariant": { "enable": false }, "method": { "enable": false }, "trait": { "enable": false } }, "run": { "enable": false } }, "linkedProjects": [], "lru": { "capacity": null, "query": { "capacities": {} } }, "notifications": { "cargoTomlNotFound": false, "unindexedProject": false }, "numThreads": null, "procMacro": { "attributes": { "enable": false }, "enable": false, "ignored": {}, "server": null }, "references": { "excludeImports": false, "excludeTests": false }, "runnables": { "command": null, "extraArgs": [], "extraTestBinaryArgs": [ "--show-output" ] }, "rustc": { "source": null }, "rustfmt": { "extraArgs": [], "overrideCommand": null, "rangeFormatting": { "enable": true } }, "semanticHighlighting": { "doc": { "comment": { "inject": { "enable": true } } }, "nonStandardTokens": true, "operator": { "enable": true, "specialization": { "enable": false } }, "punctuation": { "enable": false, "separate": { "macro": { "bang": false } }, "specialization": { "enable": false } }, "strings": { "enable": true } }, "signatureInfo": { "detail": "full", "documentation": { "enable": true } }, "typing": { "autoClosingAngleBrackets": { "enable": false } }, "workspace": { "symbol": { "search": { "kind": "only_types", "limit": 128, "scope": "workspace" } } } }, "trace": "verbose", "workspaceFolders": [ { "uri": "file:///home/cj/Downloads/test-rs", "name": "test-rs" } ], "locale": "en_US", "clientInfo": { "name": "coc.nvim", "version": "0.0.82" } } [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: [] ```
fannheyward commented 3 weeks ago

Your logs didn't contain the organizeImports codeAction request, make sure you've triggered it correctly.

GopherJ commented 3 weeks ago

@fannheyward as I said I triggered it but somehow nothing sent to the server and nothing happened

fannheyward commented 3 weeks ago

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.

GopherJ commented 3 weeks ago

thanks that makes it more clear, gopls didn't work on my side, do you use coc-go or gopls directly?

GopherJ commented 3 weeks ago

Lol I just didn't a different test and gopls worked! so maybe it just didn't work in simple main.go case

GopherJ commented 3 weeks ago

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

GopherJ commented 3 weeks ago

ok rust-analyzer still didn't implement it