langserver icon indicating copy to clipboard operation
langserver copied to clipboard

difference with https://github.com/PMunch/nimlsp ?

Open timotheecour opened this issue 6 years ago • 5 comments

/cc @zah @PMunch when should one use https://github.com/PMunch/nimlsp vs https://github.com/nim-lang/langserver ?

timotheecour avatar Dec 29 '18 04:12 timotheecour

At the moment, there are some architectural differences between the two projects, but we will work towards creating a single implementation in the long run.

nimlsp is much more advanced at the moment, but it doesn't yet follow the suggested design that will be pursued in this project:

https://github.com/nim-lang/langserver/blob/master/docs/design/LangServArchitecture.md

zah avatar Dec 29 '18 14:12 zah

That design matches what I had in my head for a while now. The Nim Language Server should just be a simple application that does two basic things (at first):

  • Passes requests to nimsuggest
  • Manages one or more nimsuggest instances to ensure they...
    • ...can handle requests efficiently
    • ...are not stuck leaking memory and/or overburdening the user's machine (I've often seen nimsuggest stuck at 100% CPU usage)

Further features can include:

  • the ability to send bug reports automatically when nimsuggest crashes or gives unsatisfactory results.
  • other auto completion providers that return results faster or as a fallback if nimsuggest fails (I often see language servers failing to find a symbol that can be easily found accurately with a simple search for "proc ident")

dom96 avatar Dec 29 '18 18:12 dom96

ok so looks like both projects are actively underway, was hoping efforts could be consolidated

Further features can include:

see also https://github.com/PMunch/nimlsp/issues/16 which lists other features in D's version of this, some of which are relevant for Nim

multiple long-running nimsuggest processes (one instance of nimsuggest per project) (from: https://github.com/nim-lang/langserver/blob/master/docs/design/LangServArchitecture.md)

https://github.com/nim-lang/Nim/pull/9757 was trying to simplify that so we could have 1 nimsuggest instance that would work regardless if file was known in advance; it would still require more than 1 in case different compile options are give, though, or if a nimsuggest instance would crash (until these types of bugs are eradicated)

timotheecour avatar Dec 29 '18 20:12 timotheecour

Latest information in 2024?

your-diary avatar Feb 01 '24 13:02 your-diary

Here's the latest information in our readme, which mentions nimlsp in the "Related Projects" section: https://github.com/nim-lang/langserver?tab=readme-ov-file#related-projects Note that I'm unfamiliar whether the information about nimlsp is accurate or not, because I haven't tried using it.

nickysn avatar Feb 06 '24 23:02 nickysn