Comments (13)
It's because coc.nvim will add workspace change when go to the sdk directory, and there's no .dart_tool
info of that package. I will fix it do not send workspace change when go to sdk directory.
from coc-flutter.
@iamcco thanks for the quick response.
This seems to fix the cases when looking at code in the sdk.
However, other libraries still show the same behaviour.
from coc-flutter.
Use "flutter.workspaceFolder.ignore": []
options.
from coc-flutter.
Can you give me an example of how to use it for a package in the .pub_cache
folder.
Already tried a lot of possibilities but non work.
Also, the option gives a warning that it expects type string
instead of string[]
from coc-flutter.
"flutter.workspaceFolder.ignore": ["~/xxx/xxx"]
path start with ~/xxx/xxx
will not change workspace folder.
from coc-flutter.
Also you can improve it if you have any good idea.
from coc-flutter.
If I understand correctly then the default should actually work for me since the default ignored path ends up being .../flutter
since the flutter binary is at .../flutter/bin/flutter
and the pubcache folder which holds all dependencies is at .../flutter/.pub_cache`
However, its still not finding those dependencies so I'm not sure that changing workspace folder is what is causing this issue although at least now files in the sdk don't have errors all over
Don't have any ideas looking at the code how to fix it atm.
from coc-flutter.
Dart LSP use project .dart_tool
packages info to resolve dependence, so if your lib package do not run flutter packages get
it will not have the dependence info. so if goto lib file and coc.nvim change workspace to lib directory it can't resolve dependence. if your lib is in flutter sdk directory, it should not have the problem. i don't know what happend.
debug at https://github.com/iamcco/coc-flutter/blob/master/src/server/lsp/index.ts#L97
from coc-flutter.
Running pub get in the package's directory indeed resolves this.
Would there be any way we could automatically do this?
It is also still interesting that the vscode extensions does not need to do this even when running it using the LSP
from coc-flutter.
I don't have the issue, you can debug with above response.
from coc-flutter.
Encountered exactly the same problem. And SDK directory still show errors.
from coc-flutter.
Encountered exactly the same problem. And SDK directory still show errors.
from coc-flutter.
Running pub get in the package's directory indeed resolves this. Would there be any way we could automatically do this?
It is also still interesting that the vscode extensions does not need to do this even when running it using the LSP
I open a new issue, then I found the discuss here.
Would you teach me how to solve this problem? Wish your help, thanks.
Now I make a link to .dart_tool
, but there are many 3rd libs. So I think it is not a good method.
from coc-flutter.
Related Issues (20)
- Feature Request - Ability to run "flutter devices --show-web-server-device" HOT 3
- Support multiple devices HOT 4
- closingLabels not working on Vim 9 HOT 1
- Go to test HOT 1
- [bug] go to file HOT 1
- Question: Changing the inlay hints HOT 1
- Language server not supported error on Flutter master HOT 3
- how to inspect the widgets? HOT 2
- dart error not shown in quickfox window HOT 1
- How to configure it ? HOT 1
- Parenthesis and literal elipsis are auto-completed in addition to a method name. HOT 15
- Lsp not working HOT 5
- 保存文件的时候,没有再次触发语法检查 HOT 3
- Proper Support for Closing Labels via Coc Inlay Hints
- Filter out `EGL_emulation`
- Sorting imports HOT 1
- How can type/parameter hints be removed from the end of the lines? HOT 3
- coc-flutter stopped working after changing Flutter version to 3.10.5 HOT 2
- `import` completion prints the path prefix twice
- expect color highlighting but there is no such a feature in my neovim
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coc-flutter.