Thread overview | ||||||
---|---|---|---|---|---|---|
|
September 25, 2019 No extensions in Atom/VS Code provides linting | ||||
---|---|---|---|---|
| ||||
I'm making this thread to share my frustration in setting up Dlang development tools using VS Code in Ubuntu 19.04. I have a small ongoing project using GTK and Rust but Rust's BC had been giving me trouble in borrowing mutable references across the different widgets (for example button click handlers). So I had created a branch and wanted to start rewriting it in D/GtkD before the project gets too complex. What I didn't know: 1. The builtin package for dub is broken: `#apt install dub`, it installs just fine but as soon as I tried initiating a project dub throws a runtime error and throws some demangled symbol name. It looks like a problem in Debian unstable and the known issue hasn't been fixed in a while. This prompted me to install dlang tools from the "install.sh" script. It does a fine job except that it could automate setting up PATH by itself, but no worries it's not a big issue. 2. VS Code extensions don't work: Once I installed dmd and dub from the script file I opened up VS Code, there are (as far as I understand) two mainstream extensions for Dlang: Dlang using DLS and Code-D. Great. When I installed DLS plugin, it said something about "installing DLS"... and that's about it. Formatting works but there's no linting whatsoever. Code-D -- same outcome, no linting. So I opened up issues on both the repos. Why does it have to be so difficult to set up and get started with coding? Not to start a flame-war or something but Rust sets a gold-standard of how tooling should be -- they should just work! All I had to do with Rust, is install the RLS plugin and that's it -- Linting, formatting, highlights -- all just work. |
September 26, 2019 Re: No extensions in Atom/VS Code provides linting | ||||
---|---|---|---|---|
| ||||
Posted in reply to Hossain Adnan | On Wednesday, 25 September 2019 at 00:13:19 UTC, Hossain Adnan wrote: > I'm making this thread to share my frustration in setting up Dlang development tools using VS Code in Ubuntu 19.04. > > I have a small ongoing project using GTK and Rust but Rust's BC had been giving me trouble in borrowing mutable references across the different widgets (for example button click handlers). So I had created a branch and wanted to start rewriting it in D/GtkD before the project gets too complex. What I didn't know: > > 1. The builtin package for dub is broken: > `#apt install dub`, it installs just fine but as soon as I tried initiating a project dub throws a runtime error and throws some demangled symbol name. It looks like a problem in Debian unstable and the known issue hasn't been fixed in a while. > > This prompted me to install dlang tools from the "install.sh" script. It does a fine job except that it could automate setting up PATH by itself, but no worries it's not a big issue. > > 2. VS Code extensions don't work: > Once I installed dmd and dub from the script file I opened up VS Code, there are (as far as I understand) two mainstream extensions for Dlang: Dlang using DLS and Code-D. Great. > > When I installed DLS plugin, it said something about "installing DLS"... and that's about it. Formatting works but there's no linting whatsoever. > > Code-D -- same outcome, no linting. > > So I opened up issues on both the repos. Why does it have to be so difficult to set up and get started with coding? Not to start a flame-war or something but Rust sets a gold-standard of how tooling should be -- they should just work! All I had to do > with Rust, is install the RLS plugin and that's it -- Linting, formatting, highlights -- all just work. I cannot say much for running VS Code on linux. I tested VS Code with DLS on windows and I was really surprised because it worked out of the box including linting, code formatting and code completion. Your issue seems to be OS specific. I stopped using VS code because the way VS Code in general works is for me a blocker. Kind regards Andre |
September 28, 2019 Re: No extensions in Atom/VS Code provides linting | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andre Pany | On Thursday, 26 September 2019 at 16:18:34 UTC, Andre Pany wrote: > On Wednesday, 25 September 2019 at 00:13:19 UTC, Hossain Adnan wrote: >> [...] > > -- they should just work! All I had to do >> [...] > > I cannot say much for running VS Code on linux. I tested VS Code with DLS on windows and I was really surprised because it worked out of the box including linting, code formatting and code completion. > > Your issue seems to be OS specific. I stopped using VS code because the way VS Code in general works is for me a blocker. > > Kind regards > Andre I don't think it's OS specific. I tried using the intellij idea community edition and the DLanguage extension. Linting works fine. However I've been getting this weird error (I reported it) when formatting. I reported it (https://github.com/intellij-dlanguage/intellij-dlanguage/issues/519). Currently IntelliJ is my only hope. But I refuse to believe Dscanner is useless to this extent (https://github.com/d-language-server/vscode-dlang/issues/18#issuecomment-534907556) |
September 29, 2019 Re: No extensions in Atom/VS Code provides linting | ||||
---|---|---|---|---|
| ||||
Posted in reply to Hossain Adnan | On Wednesday, 25 September 2019 at 00:13:19 UTC, Hossain Adnan wrote:
> 2. VS Code extensions don't work:
> Once I installed dmd and dub from the script file I opened up VS Code, there are (as far as I understand) two mainstream extensions for Dlang: Dlang using DLS and Code-D. Great.
>
> When I installed DLS plugin, it said something about "installing DLS"... and that's about it. Formatting works but there's no linting whatsoever.
I suggest you this as a workaround, after having removed any version of dls present in your `~/.dub/packages` directory:
dub fetch dls
dub run dls:bootstrap
That usually worked for me, when I've encountered your issue in the past
|
Copyright © 1999-2021 by the D Language Foundation