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

Multiple Project Support #140

Open
sriharshachilakapati opened this issue Jan 31, 2019 · 2 comments
Open

Multiple Project Support #140

sriharshachilakapati opened this issue Jan 31, 2019 · 2 comments

Comments

@sriharshachilakapati
Copy link

I have two projects running at the same time, one is a runtime dependent on the other. The backend server is written in 0.12 while the frontend is still on 0.11 because of some dependencies I'm using.

So I have two VIM instances open for each project. I'm managing the purs executable to use by using NVM to have two node installations with different purescript package installed in them.

Now when I open Project 1, and load the modules using :Pload!.

Then in the next instance I'm running Project 2, the imports, autocomplete are showing me the modules from the Project 1, though there is no compile time dependency between them. Another issue comes when I go to lookup the functions.

If both projects have a function with same name, such as appFlow in my case, calling :Pgoto appFlow in Project 2 is opening a new buffer having the file from Project 1 opened at the same symbol.

I tried searching the documentation on how to change the port of the PSC IDE server based on the project location, but couldn't find any solution to this.

I think we need to launch a new PURS IDE server if the working directory of the VIM instance is different. Can you tell me how to solve this issue?

@handbagstevens
Copy link

This is a workaround:

  1. In your root dir: purs ide server -p 12345 src/**/*.purs
  2. In vim: :let g:psc_ide_server_port = 12345

Should be able to repeat this for each project directory (replacing 12345 with a new unused port number) :)

@sriharshachilakapati
Copy link
Author

@handbagstevens Thanks for the response! I have long switched to using the PureScript language server though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants