Closed dprophete closed 2 years ago
Hi, I'm having a similar issue. I've been away from Flutter for around 4 months. Now I tried to work again on a project and also noticed I barely have any of the benefits of coc-flutter. I don't get analyzer indications, nor go to definition, nor auto-import or even completion from classes in the imports I already imported. I still get too the flutter
service working and using CocCommand
or CocList
involving flutter all work, and also other "intellisense" completion work too (like methods in classes).
Another example of a basic feature not working is pressing K
to get info on a symbol, I get:
Error on request (doHover): Vim(return):Error invoking 'doHover' on channel 4 (coc):
hover provider not found for current buffer, your language server doesn't support it.
To see if the issue is some weird interaction between some modules, I even started a new vimrc
with just this:
call plug#begin(stdpath('data') . '/vim-plug-test-flutter')"
Plug 'dart-lang/dart-vim-plugin' " Dart programming language
Plug 'neoclide/coc.nvim', {'branch': 'release'} " CoC intellisense engine
call plug#end()
And then ran CocInstall coc-flutter
using vim -u tmp-vimrc
and then edited my flutter dart files. Still I'm getting this very reduced experience. coc is working perfectly fine with all other languages I use (python, rust, shell, JSON, etc.).
Any ideas on what could be going wrong and how to fix it is extremely appreciated, as this is making developing for flutter very old-school :)
$ flutter doctor -v
[✓] Flutter (Channel stable, 2.5.1, on Debian GNU/Linux 11 (bullseye) 5.10.0-8-amd64, locale en_IE.UTF-8)
• Flutter version 2.5.1 at /home/luca/software/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ffb2ecea52 (2 days ago), 2021-09-17 15:26:33 -0400
• Engine revision b3af521a05
• Dart version 2.14.2
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /home/luca/Android/Sdk
• Platform android-30, build-tools 30.0.2
• Java binary at: /home/luca/software/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• CHROME_EXECUTABLE = chromium
[✓] Linux toolchain - develop for Linux desktop
• Debian clang version 11.0.1-2
• cmake version 3.18.4
• ninja version 1.10.1
• pkg-config version 0.29.2
[✓] Android Studio (version 4.1)
• Android Studio at /home/luca/software/android-studio
• Flutter plugin version 53.1.1
• Dart plugin version 201.9317
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (2 available)
• Linux (desktop) • linux • linux-x64 • Debian GNU/Linux 11 (bullseye) 5.10.0-8-amd64
• Chrome (web) • chrome • web-javascript • Chromium 90.0.4430.212 built on Debian 11.0, running on Debian 11.0
• No issues found!
$ vim --version
NVIM v0.4.4
Build type: Release
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -g -O2 -fdebug-prefix-map=/build/neovim-eK2ojg/neovim-0.4.4=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=1 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=1 -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/build/neovim-eK2ojg/neovim-0.4.4/build/config -I/build/neovim-eK2ojg/neovim-0.4.4/src -I/usr/include -I/usr/include/lua5.1 -I/build/neovim-eK2ojg/neovim-0.4.4/build/src/nvim/auto -I/build/neovim-eK2ojg/neovim-0.4.4/build/include
Compiled by team+vim@tracker.debian.org
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
Just released v1.9.6 which should fix these issues
Very nice @Kavantix . Happy to report that it does indeed fix the issue. Thx.
Me too, thanks!
One question, since we are here and I don't know of a better place to ask. As part of my coming back to Flutter after a while being away, I updated to use the new flutter lints rules. I noticed I don't get the errors/warnings/info I get via flutter analyze
inside vim with coc-flutter. Is this normal/expected? Is there a way to enable getting analyze issues as info/warn/errors in vim? I couldn't find any obvious options in this project's readme.
@llucax : seems to work fine for me:
Thanks for checking out. It's working for me now too, I'm not sure what happened, maybe a misconfiguration while I was trying to figure out why it didn't work before the update. But all good now 🎉
Hi guys,
Not sure if it's related to upgrading to the latest flutter + dart, but coc-flutter now always reports:
[coc.nvim]: Error on "jumpDefinition": definition provider not found for current buffer, your language server doesn't support it.
when I try to jump to definition or get the references.Note that coc itself seems to work properly (coc goto definition works with elm files for instance)
And note that the other parts of
coc-flutter
do work properly (I can run:CocList FlutterEmulators
, etc...)Everything worked fine until about a week ago. Again, not sure if it's a change in coc, in coc-flutter, or it's related to moving to the latest flutter. Here is the output of
flutter --version
:Here are the coc extensions I have installed (result of
CocUpdate
):Also, here is the output of
CocList services
The dart lsp server seems to be running properly:
I am using the latest version of coc with
Regarding vim+dart, I tried with and without
vim-lsc
andvim-lsc-dart
. That didn't solve the problem.I am at a loss... Because of this I had to go back to using intellij for flutter development :-<
Hope somebody can get me out of my misery here :-) Thx guys.