Closed hai-ttb19 closed 3 years ago
@hai-ttb19 could you also share your coc config
@hai-ttb19 could you also share your coc config
Please test https://github.com/iamcco/coc-flutter/pull/102/files
same error
@hai-ttb19 could you also share your coc config
here is it
{
"cursors.previousKey":"<S-Tab>",
"coc.preferences.formatOnSaveFiletypes":[
"dart",
"python",
"cpp"
],
"flutter.lsp.debug": true,
"flutter.sdk.path":"E:/flutter_windows_2.0.0-stable/flutter/bin",
"python.pythonPath": "D:/python/python.exe",
"python.analysis.diagnosticPublishDelay": 500,
"python.autoComplete.extraPaths": [
"${env:SPARK_HOME}\\python",
"${env:SPARK_HOME}\\python\\pyspark"
]
}
Your flutter sdk path is wrong it should not include the bin
part
Try using the following and then opening the list:
"flutter.sdk.searchPaths": ["E:/flutter_windows_2.0.0-stableA/flutter"]"
It's error
I think it is :
"flutter.sdk.searchPaths": ["E:/flutter_windows_2.0.0-stableA/flutter"],
but it still not working
Your flutter sdk path is wrong it should not include the
bin
part Try using the following and then opening the list:"flutter.sdk.searchPaths: ["E:/flutter_windows_2.0.0-stableA/flutter"]"
Your flutter sdk path is wrong it should not include the
bin
part Try using the following and then opening the list:"flutter.sdk.searchPaths: ["E:/flutter_windows_2.0.0-stableA/flutter"]"
Did you restart coc :CocRestart
after changing the config?
Did you restart coc
:CocRestart
after changing the config?
yes sir
A wait your using linux style instead of windows style for the path.
try using: "E:\\flutter_windows_2.0.0-stableA\\flutter"
as search path. (double slash to escape them)
A wait your using linux style instead of windows style for the path. try using:
"E:\\flutter_windows_2.0.0-stableA\\flutter"
as search path. (double slash to escape them)
it still not work Few day ago, it still work well without any config before I update cocnvim and all extensions (I don't remember the previous version) to the latest version
Strange, Could you share the output like suggested in the template:
- Set
"flutter.trace.server": "verbose"
- Reproduce the issue
:CocCommand workspace.showOutput
open output list and selectflutter
(but make sure to do a :CocRestart
after changing to verbose)
And also share the directory structure of both E:/flutter_windows_2.0.0-stableA
and E:/flutter_windows_2.0.0-stableA/flutter
Strange, Could you share the output like suggested in the template:
- Set
"flutter.trace.server": "verbose"
- Reproduce the issue
:CocCommand workspace.showOutput
open output list and selectflutter
(but make sure to do a
:CocRestart
after changing to verbose)And also share the directory structure of both
E:/flutter_windows_2.0.0-stableA
andE:/flutter_windows_2.0.0-stableA/flutter
Oh, it work !!!
"flutter.sdk.searchPaths": ["E:\\flutter_windows_2.0.0-stableA\\flutter"],
It should have "\flutter"
In my opinion, you should change Readme.md into required "flutter.sdk.searchPaths", without it, lsp will not find the sdk, it is very difference than the previous version that I don't need config anything
Thank you !!!
Nice that it works, but if your install worked without config before it should still do that. So could you give me the output you get when not having any config for the sdk
Nice that it works, but if your install worked without config before it should still do that. So could you give me the output you get when not having any config for the sdk
The coc-nvim.log give the old error
Here is the flutter output (I rename the folder "flutter_windows_2.0.0-stableA" to "flutter_windows_2.0.0-stable" , those path bellow is true)
[dev-command]: register dev command
[sdk]: No local fvm sdk
[sdk]: which flutter command => E:\flutter_windows_2.0.0-stable\flutter\bin\flutter.BAT
[sdk]: searchPaths: ~/snap/flutter/common/flutter,~/fvm/versions
[sdk]: which dart command => E:\flutter_windows_2.0.0-stable\flutter\bin\dart.BAT
[sdk]: dart command path => E:\flutter_windows_2.0.0-stable\flutter\bin\dart.BAT
[sdk]: dart sdk home => E:\flutter_windows_2.0.0-stable\flutter
[sdk]: analyzer path => E:\flutter_windows_2.0.0-stable\flutter\bin\snapshots\analysis_server.dart.snapshot
[sdk]: dart command path => E:\flutter_windows_2.0.0-stable\flutter\bin\dart.bat
[sdk]: Dart SDK not found!
[sdk]: {
"dartHome": "E:\\flutter_windows_2.0.0-stable\\flutter",
"analyzerSnapshotPath": "E:\\flutter_windows_2.0.0-stable\\flutter\\bin\\snapshots\\analysis_server.dart.snapshot"
}
[lsp-server]: flutter SDK not found!
[server]: bufName C:\Users\Admin\Desktop\flutter\test_app\lib\main.dart
[server]: bufName C:\Users\Admin\AppData\Local\nvim\coc-settings.json
Very interesting especially since (as you can see in the log) it does actually have paths to the snapshot and such.
I'll have to do some debugging on windows for this, but could you already validate for me that the paths actually exist (so the \bin\snapshots\analysis_server.dart.snapshot
for instance
Very interesting especially since (as you can see in the log) it does actually have paths to the snapshot and such. I'll have to do some debugging on windows for this, but could you already validate for me that the paths actually exist (so the
\bin\snapshots\analysis_server.dart.snapshot
for instance
That path doesn't exist
I find this path, maybe it is:
E:\flutter_windows_2.0.0-stable\flutter\bin\cache\dart-sdk\bin\snapshots
there is a file "analysis_server.dart.snapshot" in this path
Ah I see what happens,
It's because the which flutter
ends with \bin\flutter.bat
instead of \bin\flutter
which it does on mac
Ah I see what happens, It's because the
which flutter
ends with\bin\flutter.bat
instead of\bin\flutter
which it does on mac
Congratulations, I think this is the problem of "coc-flutter-tools" too !
Could you check if my the fix works :)
Could you check if my the fix works :)
Yeah ! It's working without any configs now ! :100:
[dev-command]: register dev command
[sdk]: No local fvm sdk
[sdk]: which flutter command => E:\flutter_windows_2.0.0-stable\flutter\bin\flutter.BAT
[fs]: executing command cat E:\flutter_windows_2.0.0-stable\flutter\version
[sdk]: searchPaths: ~/snap/flutter/common/flutter,~/fvm/versions
[sdk]: flutter command path => E:\flutter_windows_2.0.0-stable\flutter\bin\flutter.bat
[sdk]: dart sdk home => E:\flutter_windows_2.0.0-stable\flutter\bin\cache\dart-sdk
[sdk]: analyzer path => E:\flutter_windows_2.0.0-stable\flutter\bin\cache\dart-sdk\bin\snapshots\analysis_server.dart.snapshot
[sdk]: dart command path => E:\flutter_windows_2.0.0-stable\flutter\bin\cache\dart-sdk\bin\dart.exe
[fs]: executing command E:\flutter_windows_2.0.0-stable\flutter\bin\cache\dart-sdk\bin\dart.exe --version
[sdk]: dart version: v2.12.0
[lsp-server]: rightVersion true
[lsp-server]: analysis server ready!
[lsp-closing-labels]: register closing labels
I installed coc-flutter through latest coc.nvim version LSP server did'nt run when I open the flutter project "flutter.lsp.restart" give the message "analyzer LSP server is not running" and Here is the cocnvim log file: And the flutter-lsp output is empty
My cocnvim info:
I installed flutter and set path to flutter:
Both flutter 1.23 and flutter 2.0 give the same issues Even I set the "flutter.sdk.path" and "flutter.sdk.searchPaths" but "CocList FlutterSDKs" give empty list. I see that this issues was fix before but I don't know why it appear now ?