FrigoEU / psc-ide-vim

Vim plugin for psc-ide
96 stars 36 forks source link

Startup on random port, use `.psc-ide-port` #68

Open natefaubion opened 7 years ago

natefaubion commented 7 years ago

Other psc-ide plugins startup on a random port, and tag the port in a .psc-ide-port file. A global config means you can only have one instance running at a time.

coot commented 7 years ago

I've been thinking about it for a while, and we are really missing that feature. For the moment I have an autocommand which changes the port number:

    au BufRead $HOME/repos/gravicus/ospreyui/** let psc_ide_server_port = 4343
paluh commented 7 years ago

You can have local .vimrc in project directory with let g:psc_ide_server_port = PORT_NUMBER which I'm using extensively. I think that random port can be used, but only when psc_ide_server_port is not defined.

coot commented 7 years ago

Yes, that's a good point.

kika commented 7 years ago

Oh, my, I'm an idiot. I have this working since December 2016 (on a fork at https://github.com/kika/psc-ide-vim) and I never submitted a PR. I'll merge the upstream and submit.

coot commented 7 years ago

Great, then it's battle tested :)

kika commented 6 years ago

I've merged my changes but can't get through testing phase yet. I'm seeing a strange bug, which seems to be not related to port selection. Sometimes (typically when I hit TAB to get the completion) vim rescans the imports and suddenly reformats all my import lists. I've made a few 2-line changes to my sources which caused 20+ line commits, because of the changed import lists (they just got rearranged, nothing changes semantically). Any ideas?

coot commented 6 years ago

That's not a bug, that's a feature of purs ide. It formats imports when one is adding ones and we run it in CompleDone autocommand to import the identifier. You can turn it off though.

kika commented 6 years ago

Hm, but I'm not adding anything, I just write some code.