code-d - A plugin for Visual Studio Code
Gerald via Digitalmars-d-ide
digitalmars-d-ide at puremagic.com
Thu Dec 10 19:03:36 PST 2015
On Sunday, 6 December 2015 at 11:53:11 UTC, WebFreak001 wrote:
> First we worked on atomize-d which was the D plugin for atom
> but now I have created a new backend for our D plugins. Its
> called workspace-d (https://github.com/WebFreak001/workspace-d)
> which basically wraps dcd, dfmt and dscanner and uses some
> build/package system (only dub right now) to get informations
> like source paths.
>
> So for testing I wanted to implement it first in atom but the
> API really sucks there so I went with vscode instead because it
> has much better APIs for everything related to an IDE. I think
> it turned out really nice, however it still has a few random
> minor bugs that always fix by reloading the window.
>
> Plugin link: https://github.com/WebFreak001/code-d
>
> Installation:
> Install dcd, dfmt, dscanner, workspace-d
>
> cd ~/.vscode/extensions/
> git clone https://github.com/WebFreak001/code-d.git
> cd code-d
> npm install
> node ./node_modules/vscode/bin/compile
I tried this out and it seems to work quite well with the
exception of not picking up my DUB GtkD dependency for some
reason, this was easy to work around for now by adding the GtkD
source paths directly to dcd.conf. Good work by the OP, hope
development on this continues as I'm finding it a pleasure to use.
Also, for the OP if interested, I created some build and test
tasks with the appropriate problem matching so that VS Code picks
up the errors correctly, hopefully this is useful to anyone else
looking for the same thing.
{
"version": "0.1.0",
// Run the dub command to do a build or test
"command": "dub",
// The command is a shell script
"isShellCommand": true,
// Show the output window only if unrecognized errors occur.
"showOutput": "always",
"tasks" : [
{
"taskName": "build",
"isBuildCommand": true,
"isTestCommand": false,
"args": [],
//Pattern match DMD error messages
"problemMatcher": {
"owner": "d",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp":
"^(.*)\\((\\d+),(\\d+)\\):\\s+(Warning|Error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
},
{
"taskName": "test",
"isBuildCommand": false,
"isTestCommand": true,
"args": [],
//Pattern match DMD error messages
"problemMatcher": {
"owner": "d",
"fileLocation": ["relative", "${workspaceRoot}"],
"pattern": {
"regexp":
"^(.*)\\((\\d+),(\\d+)\\):\\s+(Warning|Error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}
]
}
More information about the Digitalmars-d-ide
mailing list