iamcco / coc-flutter

flutter support for (Neo)vim
472 stars 38 forks source link

Provider not found for current buffer, your language server doesn't support it #157

Closed akvus closed 2 years ago

akvus commented 2 years ago

Describe the bug

I have my vim config set up and I use it on both macos and windows/WSL2-ubuntu. On macos coc-flutter works just fine, however with nvim installed on windows (with powershell) and on ubuntu through WSL2 I keep getting the following issues:

2022-05-29T14:57:34.725 ERROR (pid:4624) [node-client] - Error on notification "jumpDefinition": definition provider not found for current buffer, your language server doesn't support it. Error
    at BM.echoError (C:\Users\conta\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:35:1869)
    at BM.<anonymous> (C:\Users\conta\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:301:19122)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
2022-05-29T14:57:34.726 ERROR (pid:4624) [attach] - Error: definition provider not found for current buffer, your language server doesn't support it.
    at Dx.checkProvier (C:\Users\conta\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:301:5836)
    at VD.request (C:\Users\conta\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:287:2737)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async VD.gotoDefinition (C:\Users\conta\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:287:4147)
    at async xx.cocAction (C:\Users\conta\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:301:17514)
    at async BM.<anonymous> (C:\Users\conta\AppData\Local\nvim-data\plugged\coc.nvim\build\index.js:301:19085)

Here is my vim config: https://github.com/akvus/akv-vim-config

To Reproduce Steps to reproduce the behavior:

  1. Try out my vim config on windows/ubuntu with WSL2

Expected behavior jumpDefinition etc. should work

Desktop (please complete the following information):

Output channel:

  1. Set "flutter.trace.server": "verbose"
  2. Restart coc using :CocRestart
  3. Reproduce the issue
  4. :CocCommand workspace.showOutput open output list and select flutter
[sdk]: No local fvm sdk
[fs]: executing command asdf which flutter
[sdk]: which flutter command => /home/akvus/.asdf/installs/flutter/3.0.1/bin/flutter
[sdk]: /home/akvus/.asdf/installs/flutter/3.0.1/version => 3.0.1
[sdk]: searchPaths: ~/snap/flutter/common/flutter
[sdk]: flutter command path => /home/akvus/.asdf/installs/flutter/3.0.1/bin/flutter
[sdk]: dart sdk home => /home/akvus/.asdf/installs/flutter/3.0.1/bin/cache/dart-sdk
[sdk]: analyzer path => /home/akvus/.asdf/installs/flutter/3.0.1/bin/cache/dart-sdk/bin/snapshots/analysis_server.dart.snapshot
[sdk]: dart command path => /home/akvus/.asdf/installs/flutter/3.0.1/bin/cache/dart-sdk/bin/dart
[fs]: executing command /home/akvus/.asdf/installs/flutter/3.0.1/bin/cache/dart-sdk/bin/dart --version
[sdk]: dart version: v2.17.1
[lsp-server]: rightVersion true
[lsp-server]: analysis server ready!
[lsp-closing-labels]: register closing labels
[daemon]: got message: {
  "event": "daemon.connected",
  "params": {
    "version": "0.6.1",
    "pid": 22456
  }
}
[daemon]: got message: {
  "event": "daemon.logMessage",
  "params": {
    "level": "status",
    "message": "Starting device daemon..."
  }
}
[daemon]: got message: {
  "id": 1
}
[daemon]: Message without event
[daemon]: got message: {
  "event": "device.added",
  "params": {
    "id": "linux",
    "name": "Linux",
    "platform": "linux-x64",
    "emulator": false,
    "category": "desktop",
    "platformType": "linux",
    "ephemeral": false,
    "emulatorId": null,
    "sdk": "Ubuntu 20.04 LTS 5.10.60.1-microsoft-standard-WSL2",
    "capabilities": {
      "hotReload": true,
      "hotRestart": true,
      "screenshot": false,
      "fastStart": false,
      "flutterExit": true,
      "hardwareRendering": true,
      "startPaused": true
    }
  }
}
[daemon]: New device: Linux

Config Here is my vim config: https://github.com/akvus/akv-vim-config

akvus commented 2 years ago

What eventually worked was reinstalling nvim.