www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - DLS (D Language Server) v0.20

reply Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
Hello, and merry Christmas! (a bit late, but whatever)

At the end of March of this year, I had made a post [1] about 
this project, aimed at helping with D development on various 
editors (VSCode, Atom, Sublime text, vim...) [2].
In a nutshell, it's a bit like serve-d [3], albeit with fewer 
features, and focused more on being 'plug and play': a single 
binary with no dependencies, can be installed without being 
compiled on most OS's, automatically updates itself and tries to 
adapt to different dmd/ldc installations.

At the end of March it was at v0.1.5, which was primitive, and 
quite terrible in a lot of ways. I've recently released v0.20.1, 
and after 19 minor versions, it is certainly in better shape (or 
less terrible shape, depending on how you see it) than it used to 
be.
If anyone was curious about it at the time, but put off by its 
numerous flaws and lack of features, it should be more usable by 
now.

Some of its most notable changes since then include:
- Binary releases for the update system, replacing the previous 
method of recompiling itself and creating a black hole swallowing 
your RAM
- Tweaks to make it usable on FreeBSD with the Linux 
compatibility module
- Better integration with DFMT, D-Scanner and DCD, leading to new 
features and enhancements such as: linting, finding definitions, 
finding references, symbol renaming, listing module and workspace 
symbols, formatting without replacing the whole document, range 
formatting, local variable highlighting
- Better support for projects that don't use Dub, with detection 
of folders named `source` or `src`, and automatic importing of a 
project's git submodules
- Better detection of drumtime and phobos installation paths
- Fewer crashes

Happy coding!

[1] 
https://forum.dlang.org/post/jytsaamhiglkmeixxihx forum.dlang.org
[2] https://github.com/d-language-server/dls
[3] https://github.com/Pure-D/serve-d
Dec 28 2018
next sibling parent reply David Gileadi <gileadisNOSPM gmail.com> writes:
On 12/28/18 4:14 AM, Laurent Tréguier wrote:
 Hello, and merry Christmas! (a bit late, but whatever)
This is an excellent update--the update Just Works™ with VSCode on my mac, and functions very nicely too. Thanks! I might suggest that you perhaps rename the VSCode extension to remove "VSCode" from the name (as it's redundant) and add "D Language" (because the current name makes it a bit hard to discover).
Dec 28 2018
next sibling parent Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Friday, 28 December 2018 at 18:50:39 UTC, David Gileadi wrote:
 This is an excellent update--the update Just Works™ with VSCode 
 on my mac, and functions very nicely too. Thanks!
You're welcome; it's a relief to hear that, as I don't have a mac to actually test it on macOS!
 I might suggest that you perhaps rename the VSCode extension to 
 remove "VSCode" from the name (as it's redundant) and add "D 
 Language" (because the current name makes it a bit hard to 
 discover).
Yes, I'll probably do that in its next release.
Dec 28 2018
prev sibling parent reply Paolo Invernizzi <paolo.invernizzi gmail.com> writes:
On Friday, 28 December 2018 at 18:50:39 UTC, David Gileadi wrote:
 On 12/28/18 4:14 AM, Laurent Tréguier wrote:
 Hello, and merry Christmas! (a bit late, but whatever)
This is an excellent update--the update Just Works™ with VSCode on my mac, and functions very nicely too. Thanks! I might suggest that you perhaps rename the VSCode extension to remove "VSCode" from the name (as it's redundant) and add "D Language" (because the current name makes it a bit hard to discover).
+1, It's a great piece of software, so thank you. I'm using it on Mac also, when I'm not using vim: works like a charm! --- Paolo
Dec 28 2018
parent IM <3di gm.com> writes:
On Friday, 28 December 2018 at 20:35:44 UTC, Paolo Invernizzi 
wrote:
 On Friday, 28 December 2018 at 18:50:39 UTC, David Gileadi 
 wrote:
 On 12/28/18 4:14 AM, Laurent Tréguier wrote:
 Hello, and merry Christmas! (a bit late, but whatever)
This is an excellent update--the update Just Works™ with VSCode on my mac, and functions very nicely too. Thanks! I might suggest that you perhaps rename the VSCode extension to remove "VSCode" from the name (as it's redundant) and add "D Language" (because the current name makes it a bit hard to discover).
+1, It's a great piece of software, so thank you.
+100, Thank you very much!
 I'm using it  on Mac also, when I'm not using vim: works like a 
 charm!

 --- Paolo
Dec 31
prev sibling next sibling parent reply Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Friday, 28 December 2018 at 11:14:01 UTC, Laurent Tréguier 
wrote:
 Hello, and merry Christmas! (a bit late, but whatever)
 https://forum.dlang.org/post/jytsaamhiglkmeixxihx forum.dlang.org
 [2] https://github.com/d-language-server/dls
 [3] https://github.com/Pure-D/serve-d
Nice! Great work! How does DLS compare to the features of DCD? I'm using DCD through my beloved Emacs. Is there a more powerful Emacs+DLS-solution ready for use?
Dec 28 2018
next sibling parent reply Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Friday, 28 December 2018 at 20:44:30 UTC, Per Nordlöw wrote:
 Nice! Great work!
Thanks!
 How does DLS compare to the features of DCD?
DLS actually uses DCD as a library. There is some custom handling to be able to find multiple declarations for methods with multiple overloads and such (DCD will only send one), and some code to try to find all references to a symbol in a project (which is also used for symbol renaming). However, it doesn't use the latest DCD 0.10 version yet, so standalone DCD is probably still the best regarding autocompletion.
 I'm using DCD through my beloved Emacs. Is there a more 
 powerful Emacs+DLS-solution ready for use?
I don't know. There seems to be 2 language client extensions for Emacs : lsp-mode [1] and eglot [2]. I'm not sure how Emacs' packages are configured since I've never used Emacs; but it looks like lsp-mode would require a small custom package to glue everything together, while eglot, according to its README, can be configured to add more servers manually, with a line like: `(add-to-list 'eglot-server-programs '(foo-mode . ("foo-language-server" "--args")))` I haven't looked into Emacs yet, maybe I'll do that in the coming days. [1] https://github.com/emacs-lsp/lsp-mode [2] https://github.com/joaotavora/eglot
Dec 28 2018
parent Per =?UTF-8?B?Tm9yZGzDtnc=?= <per.nordlow gmail.com> writes:
On Friday, 28 December 2018 at 22:52:40 UTC, Laurent Tréguier 
wrote:
 I haven't looked into Emacs yet, maybe I'll do that in the 
 coming days.


 [1] https://github.com/emacs-lsp/lsp-mode
 [2] https://github.com/joaotavora/eglot
Thanks!
Dec 29 2018
prev sibling parent Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Friday, 28 December 2018 at 20:44:30 UTC, Per Nordlöw wrote:
 I'm using DCD through my beloved Emacs. Is there a more 
 powerful Emacs+DLS-solution ready for use?
I looked into lsp-mode a bit more, and actually, after installing it, its dependencies and d-mode, a few lines of configuration in Emacs' init file are enough apparently: (require 'lsp) (add-hook 'd-mode-hook #'lsp) (lsp-register-client (make-lsp-client :new-connection (lsp-stdio-connection '("~/.dub/packages/.bin/dls-latest/dls")) :major-modes '(d-mode) :server-id 'dls)) After adding this, and installing DLS (`dub fetch dls; dub run dls:bootstrap`), it should be working.
Dec 29 2018
prev sibling next sibling parent Markus <contact markus-lanner.com> writes:
On Friday, 28 December 2018 at 11:14:01 UTC, Laurent Tréguier 
wrote:
 [...]
Wow, just awesome! I really love this language server. It just works!
Dec 30 2018
prev sibling parent reply Soulsbane <paul acheronsoft.com> writes:
On Friday, 28 December 2018 at 11:14:01 UTC, Laurent Tréguier 
wrote:
 Hello, and merry Christmas! (a bit late, but whatever)

 At the end of March of this year, I had made a post [1] about 
 this project, aimed at helping with D development on various 
 editors (VSCode, Atom, Sublime text, vim...) [2].
 In a nutshell, it's a bit like serve-d [3], albeit with fewer 
 features, and focused more on being 'plug and play': a single 
 binary with no dependencies, can be installed without being 
 compiled on most OS's, automatically updates itself and tries 
 to adapt to different dmd/ldc installations.

 [...]
Can dfmt be disabled completely? I think I tried this before way back and it couldn't. I don't really want auto formatting of my code.
Dec 30 2018
parent reply Laurent =?UTF-8?B?VHLDqWd1aWVy?= <laurent.treguier.sink gmail.com> writes:
On Monday, 31 December 2018 at 04:06:30 UTC, Soulsbane wrote:
 Can dfmt be disabled completely? I think I tried this before 
 way back and it couldn't. I don't really want auto formatting 
 of my code.
It can be disabled in the initialization options. You can set `d.init.capabilities.documentFormatting` to `false` in the configuration settings for VSCode and Atom; for other editors it depends on the language client extension that's used.
Dec 31 2018
parent Soulsbane <paul acheronsoft.com> writes:
On Monday, 31 December 2018 at 10:19:58 UTC, Laurent Tréguier 
wrote:
 On Monday, 31 December 2018 at 04:06:30 UTC, Soulsbane wrote:
 Can dfmt be disabled completely? I think I tried this before 
 way back and it couldn't. I don't really want auto formatting 
 of my code.
It can be disabled in the initialization options. You can set `d.init.capabilities.documentFormatting` to `false` in the configuration settings for VSCode and Atom; for other editors it depends on the language client extension that's used.
Cool! Thanks a lot!
Dec 31 2018