psc-ide-vim
psc-ide-vim copied to clipboard
Startup on random port, use `.psc-ide-port`
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.
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
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.
Yes, that's a good point.
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.
Great, then it's battle tested :)
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?
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.
Hm, but I'm not adding anything, I just write some code.