Skip to content
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

Working in single project however does not work on a mono repo #64

Open
theTechGoose opened this issue Sep 27, 2022 · 3 comments
Open
Labels
help wanted Extra attention is needed

Comments

@theTechGoose
Copy link

Describe the bug
This works if you install @angular/language-service in the project however in a mono repo the language service is not working.

To Reproduce
Steps to reproduce the behavior:
start a monrepo with your favorite flavor. Mine is nx
Create an angular project in the mono repo
try to go to definition or auto complete a custom component in html. it does not work

Expected behavior
For coc to auto complete events and input properties

Screenshots
image

Desktop (please complete the following information):

  • OS: MacOS Montery 12.4

Log:

@NgrNxk
Copy link

NgrNxk commented Oct 28, 2022

Could that be due to the fact, that nx doesn't have an angular.json, but instead uses a workspace.json and many project.jsons?

@NgrNxk
Copy link

NgrNxk commented Oct 28, 2022

Yeah, this seems to be the issue, changing coc-angular's project.json to

  "activationEvents": [
    "workspaceContains:angular.json",
    "workspaceContains:workspace.json",
    "workspaceContains:node_modules/@angular/core/core.d.ts"
  ],

seems to work. But, the workspace.json is not a sign for angular, just for nx (which could contain only non-angular projects). It would be better to use the @angular/core matcher; however, this matcher does not work. I didn't understand everything in coc.nvim's code, but I think the whole "node_modules" can't be checked.

@EJIqpEP
Copy link

EJIqpEP commented Jan 21, 2024

@NgrNxk thanks that helped me a lot. Any way to configure it from the project itself without need to fork coc-angular?

@iamcco iamcco added the help wanted Extra attention is needed label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants