I want Sublime 3 D auto import !

Paul Backus snarwin at gmail.com
Mon Jun 1 18:55:03 UTC 2020


On Monday, 1 June 2020 at 16:18:44 UTC, Виталий Фадеев wrote:
> I want Sublime D auto import !
>
> When typing code like this:
>
>
>     class Uno : IStylable
>     {
>         //
>     }
>
>
> I want will be auto added "import IStylable" at begin of file. 
> Like this:
>
>
>     import ui.istylable : IStylable;
>
>     class Uno : IStylable
>     {
>         //
>     }
>
>
> 1. I want for plugin will scan all files in project, and grep 
> for "module <name>".
> 2. Then "module <name>" replaced to "import <name>".
> 3. Then "import <name>" inserted in text. At top. After line 
> "module ..." if it exist, else just at top.
> 4. Check for "module <name>" not exists before insert.

Your best bet for getting IDE-like features like this is probably 
to use serve-d [1] together with a language server client plugin 
for your editor [2].

[1] https://github.com/Pure-D/serve-d
[2] https://github.com/sublimelsp/LSP


More information about the Digitalmars-d-learn mailing list