PMunch / nimlsp

Language Server Protocol implementation for Nim
MIT License
416 stars 50 forks source link

Multiple users on same system using nimlsp, seemingly impossible? #148

Closed vjorlikowski closed 1 year ago

vjorlikowski commented 1 year ago

Hi there,

So - was experimenting with nimlsp, and am impressed with the work!

However...

I noticed that, on my system, /tmp/nimlsp gets created...and I'm wondering how multiple users are supposed to use nimlsp at the same time, on the same system...

The guilty line here is:

https://github.com/PMunch/nimlsp/blob/17ccf579934709e2b0136b8cdea5bd9e75d344ab/src/nimlsppkg/logger.nim#L4

Perhaps some kind of hashing or mkstemp could be done here, to ensure a unique name for unique instances of nimlsp being run? If doing "unique, per-execution nimlsp directories" - perhaps offer a mechanism to have them deleted after nimlsp exits?

PMunch commented 1 year ago

I recently realized this myself, and created an issue for it: https://github.com/PMunch/nimlsp/issues/147. I like the insight you've shared here, but I'm closing this as a duplicate and progress on this will be tracked in the other issue.