Thread overview
Atom, ide-dlang and.. a better doc for beginners ?
Feb 09
ffred
Feb 09
ffred
Feb 09
ffred
Feb 10
ffred
Feb 11
ffred
May 01
ffred
February 09
Hello all,
I'm new to D and looking to set a development environment for it that suits my taste.
I already used VScode when learning Go, but I'm not a big fan of it. so for D I'm trying to use Atom and with ide-dlang it could be fine for me.
I don't mean bad, it's good work and I have to say thank you for that, but the documentation available is not really complete or beginner friendly.

it's working, I can build my first example, but I don't understand how to go further. actually I can build, but how to build & run or at least be able to run after having build.
should I create new settings in the "build" package or install another package in witch I could set commands to run in a terminal (like I did in VScode).

the ide-dlang package's webpage just mentions at the bottom of the page that atom-ide-ui and build packages should also be installed, but doesn't say what need or could be done with them and there's not much info on how to use the whole system.

I searched online, but can't find any page about Dlang with Atom & ide-dlang..

is there someone else here using it who can at least tell me how he/she is using it and if I should use some more packages..?
thanks.
ffred

February 09
well, I found the file "build-provider.js" in the ide-dlang installation directory. it seems that it's the setting for the "build" package and it only contains a 'build' function.
so I probably should look what I can learn about the 'build' package and if I can add more functionality in this file...
February 09
me again, sorry to reply to myself, but in case it could be of any help for another beginner.
I don't know javascript, so I did it simply, but I now have a 'build' and a 'run' working options that I can choose with F7.

here is my modified 'build-provider.js' (don't know how to format code in here, sorry..) :

const path = require('path');
const glob = require('glob');
const util = require('./util');

class DubBuildProvider {
    constructor(cwd) {
        this.cwd = cwd;
    }

    getNiceName() {
        return 'Dub';
    }

    isEligible() {
        return glob.sync(path.join(this.cwd, 'dub.{json,sdl}')).length > 0;
    }

    settings() {
        let args1 = ['build'];
        let args2 = ['run'];
		
        if (util.compiler === 'dmd.exe') {
            args1.push('--arch=x86_mscoff');
	    args2.push('--arch=x86_mscoff');
        }

        return [
	  {
	     name: 'Build',
	     exec: util.dub,
	      cmd: util.dub,
	     args: args1,
	       sh: false,
	      cwd: '{PROJECT_PATH}'
          },
	  {
             name: 'Run',
	     exec: util.dub,
	      cmd: util.dub,
	     args: args2,
	       sh: false,
	      cwd: '{PROJECT_PATH}'
          }		
	];
    }
}

module.exports = DubBuildProvider;
February 10
last comment about that, for other beginners like me..
it was the simplest way right now for me to modify a file from ide-dlang package, but the good way would be to create new settings for the 'build' package (or even create a build provider). I will eventually do that, but I need to learn more how all that works before.
February 11
the package ide-dlang for Atom has been updated by its author.
there's now a 'build', 'run' & 'test' functions included (F7).  :-)
https://atom.io/packages/ide-dlang

April 11
On Tuesday, 11 February 2020 at 12:02:14 UTC, ffred wrote:
> the package ide-dlang for Atom has been updated by its author.
> there's now a 'build', 'run' & 'test' functions included (F7).  :-)
> https://atom.io/packages/ide-dlang

Hello! A more beginner here :)

I am trying to setup Atom. I installed ide-dlang 1.17.0, atom-dlang 1.1.2, d-struct 1.2.3, build 0.70.0, I set the path to dub executable as "C:\ldc\bin\dub.exe", as I am using LDC, I run "dub fetch dls" and "dub run dls:bootstrap" from the command line as instructed at https://code.dlang.org/packages/dls, I set in ide-dlang the path to DLS executable as "C:\Users\admin\AppData\Local\dub\packages\.bin\dls-latest\dls.exe", I copied your build-provider.js file in place of the original one, I even replaced dmd.exe with ldc2.exe where appears in the build-provider.js file but I keep getting "No targets found" when pressing F7 or "No eligible build target No configuration to build this project exists." when pressing F9.

Could you please help me identify the issue and sort it out?

I am on Win10 64.
May 01
On Saturday, 11 April 2020 at 15:18:32 UTC, RegeleIONESCU wrote:
> On Tuesday, 11 February 2020 at 12:02:14 UTC, ffred wrote:
>> the package ide-dlang for Atom has been updated by its author.
>> there's now a 'build', 'run' & 'test' functions included (F7).
>>  :-)
>> https://atom.io/packages/ide-dlang
>
> Hello! A more beginner here :)
>
> I am trying to setup Atom. I installed ide-dlang 1.17.0, atom-dlang 1.1.2, d-struct 1.2.3, build 0.70.0, I set the path to dub executable as "C:\ldc\bin\dub.exe", as I am using LDC, I run "dub fetch dls" and "dub run dls:bootstrap" from the command line as instructed at https://code.dlang.org/packages/dls, I set in ide-dlang the path to DLS executable as "C:\Users\admin\AppData\Local\dub\packages\.bin\dls-latest\dls.exe", I copied your build-provider.js file in place of the original one, I even replaced dmd.exe with ldc2.exe where appears in the build-provider.js file but I keep getting "No targets found" when pressing F7 or "No eligible build target No configuration to build this project exists." when pressing F9.
>
> Could you please help me identify the issue and sort it out?
>
> I am on Win10 64.

Hi, sorry I was away from D for some time now and hadn't been notified of your post.
seems you installed too much similar packages. when using it, I just installed ide-dlang, atom-ide-ui and build and nothing more. then I modified the build-provider file, but as I was saying in my last post, the author of ide-dlang did updated his package, so you shouldn't have to modify this file now..

sorry, don't have time right now to install on this computer to verify how it's working. by the way there's now a 1.17.1 version of ide-dlang. maybe you should clean your setup and try again with just the minimum packages.
also note that the author set it as "unmaintained" now on github. so if it still doesn't work for you and you're not attached to Atom, maybe you could look on the VSCode side. the dlang support seems better on it..