Re: I want Sublime 3 D auto import !
On Thursday, 4 June 2020 at 04:48:22 UTC, bauss wrote: On Wednesday, 3 June 2020 at 11:54:57 UTC, Виталий Фадеев wrote: On Tuesday, 2 June 2020 at 20:08:09 UTC, bauss wrote: What happens if you have the same symbol in multiple modules? Ex. two libraries that implement symbols with same name. Is there a way to be selective? I want it too! :) Updated: - implemented simple way to be selective !
Re: I want Sublime 3 D auto import !
On Wednesday, 3 June 2020 at 11:54:57 UTC, Виталий Фадеев wrote: On Tuesday, 2 June 2020 at 20:08:09 UTC, bauss wrote: What happens if you have the same symbol in multiple modules? Ex. two libraries that implement symbols with same name. First module will inserted. Is there a way to be selective? I want it too! :) And what about keyboard shortcut? A specially for you ! Sublime 3 / Preferences / Key bindings: [ { "keys": ["alt+a"], "command": "dlang_auto_import" }, ] Thanks, that's great!
Re: I want Sublime 3 D auto import !
On Tuesday, 2 June 2020 at 20:08:09 UTC, bauss wrote: What happens if you have the same symbol in multiple modules? Ex. two libraries that implement symbols with same name. First module will inserted. Is there a way to be selective? I want it too! :) And what about keyboard shortcut? A specially for you ! Sublime 3 / Preferences / Key bindings: [ { "keys": ["alt+a"], "command": "dlang_auto_import" }, ]
Re: I want Sublime 3 D auto import !
On Monday, 1 June 2020 at 17:28:16 UTC, Johannes Loher wrote: On Monday, 1 June 2020 at 16:18:44 UTC, Виталий Фадеев wrote: [...] Demanding stuff usually doesn't work in this community. The usual answer is something like this: If you care about this, implement it yourself or pay somebody to do it. Depends on how you interpret it.
Re: I want Sublime 3 D auto import !
On Tuesday, 2 June 2020 at 06:00:10 UTC, Виталий Фадеев wrote: On Monday, 1 June 2020 at 18:55:03 UTC, Paul Backus wrote: On Monday, 1 June 2020 at 16:18:44 UTC, Виталий Фадеев wrote: I do it! https://github.com/vitalfadeev/SublimeDlangAutoImport What happens if you have the same symbol in multiple modules? Ex. two libraries that implement symbols with same name. Is there a way to be selective? And what about keyboard shortcut?
Re: I want Sublime 3 D auto import !
On Tuesday, 2 June 2020 at 06:00:10 UTC, Виталий Фадеев wrote: On Monday, 1 June 2020 at 18:55:03 UTC, Paul Backus wrote: On Monday, 1 June 2020 at 16:18:44 UTC, Виталий Фадеев wrote: I do it! https://github.com/vitalfadeev/SublimeDlangAutoImport Cool. I dont use classe but I see how this kind of functionality might be useful for other symbols.
Re: I want Sublime 3 D auto import !
On Tuesday, 2 June 2020 at 06:00:10 UTC, Виталий Фадеев wrote: On Monday, 1 June 2020 at 18:55:03 UTC, Paul Backus wrote: On Monday, 1 June 2020 at 16:18:44 UTC, Виталий Фадеев wrote: I do it! https://github.com/vitalfadeev/SublimeDlangAutoImport Great! You should make a post about it in the Announce forum, so that other Sublime Text users will see it.
Re: I want Sublime 3 D auto import !
On Monday, 1 June 2020 at 18:55:03 UTC, Paul Backus wrote: On Monday, 1 June 2020 at 16:18:44 UTC, Виталий Фадеев wrote: I do it! https://github.com/vitalfadeev/SublimeDlangAutoImport
Re: I want Sublime 3 D auto import !
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 ". 2. Then "module " replaced to "import ". 3. Then "import " inserted in text. At top. After line "module ..." if it exist, else just at top. 4. Check for "module " 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
Re: I want Sublime 3 D auto import !
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 ". 2. Then "module " replaced to "import ". 3. Then "import " inserted in text. At top. After line "module ..." if it exist, else just at top. 4. Check for "module " not exists before insert. Demanding stuff usually doesn't work in this community. The usual answer is something like this: If you care about this, implement it yourself or pay somebody to do it.
I want Sublime 3 D auto import !
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 ". 2. Then "module " replaced to "import ". 3. Then "import " inserted in text. At top. After line "module ..." if it exist, else just at top. 4. Check for "module " not exists before insert.