-
-
Notifications
You must be signed in to change notification settings - Fork 953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto import with Dart LSP #1457
Comments
Should be problem of your language server, you can checkout output https://github.com/neoclide/coc.nvim/wiki/Debug-language-server#using-output-channel |
@wwwdata did you find a solution for this? |
@Kavantix my workaround still is to close the open buffer of the file that I want to auto-import and then run the import again. So far it seems to be still broken in the latest releases of flutter/dart. |
Looks like you have to save the file or use |
no, it's not only for "new" files. Even if I just open vim, Coc starts and I have 2 open files. One where I want to add an import from the second file, it will sometimes not work properly. It really only depends on closing the open buffer of the second file, in order for it to show up as an auto-import suggestion in the first file. |
Exactly, opening two files disables the possibility to import from each other until I delete the buffer. Is there already an open ticket at the dart analysis server @wwwdata? |
i'm using vim inside tmux and indeed, each new file created won't be shown in the auto import, i have to exit vim to make the import available, this is quite annoying :( |
Send your bug to repo of language server, we can't do anything. |
@wwwdata Not sure if it's your situation but I had the same issue and I solved this removing After I removed this line autocompletion works fine |
Hm, thanks for the tip but it still does not work. When I create a new file with a new widget. It is still not recognized... Only when I close that file can I import the new widget automatically in another one... |
Result from CocInfo
Describe the bug
When using dart (flutter) with either directly configuring the LSP in CocConfig or with the coc-flutter plugin, I sometimes do not get completions to import classes from other files. The behavior is like the following:
Reproduce the bug
:bdelete
The text was updated successfully, but these errors were encountered: