DKit icon indicating copy to clipboard operation
DKit copied to clipboard

Setting up per-project import paths

Open grogancolin opened this issue 10 years ago • 3 comments

In the readme you have: "You can also add include_paths per project."

I cant seem to find a way to do it (I may simply be looking in the wrong place).

Is there any documentation on this? Thanks

grogancolin avatar Jul 22 '15 10:07 grogancolin

You can do that by editing the sublime-project file. For example, this is part of my sublime-project file for vibe.d:

    {
        "folders":
        [
            {
                "name": "vibe-d",
                "path": "."
            },
            {
                "name": "libevent",
                "path": "/home/user/.dub/packages/libevent-2.0.1_2.0.16"
            },
            ...
        ],
        "settings":
        {
            "include_paths":
            [
                "/home/user/Projects/vibe.d/source/",
                "/home/user/.dub/packages/libevent-2.0.1_2.0.16/.",
                ...
            ],
            "package_file": "/home/user/Projects/vibe.d/dub.json"
        }
    }

If you are using DUB, you can automatically create this file using the sublime command DKit: Create Project From DUB Package File.

I will keep this open until I add proper documentation.

yazd avatar Jul 22 '15 10:07 yazd

Thanks!

grogancolin avatar Jul 22 '15 13:07 grogancolin

any events with this issue? I'm curious how I can add vibe.d in my project to have autocomplete :)

claudiug avatar Jun 04 '16 08:06 claudiug