tpope / vim-projectionist

projectionist.vim: Granular project configuration
https://www.vim.org/scripts/script.php?script_id=4989
1.06k stars 67 forks source link

Works with 2 Levels of nesting but not with 3? #171

Closed primeapple closed 2 years ago

primeapple commented 2 years ago

In the README there are two versions of jsons, nested with 2 and 3 levels. I understand it that the one with 3 levels has directories as the outermost keys, that enable the projections in the values only in these directories.

However

The following works:

{
    "app/components/*.test.jsx": {
        "type": "test",
        "alternate": "app/components/{}.jsx"
    },
    "app/components/*.jsx": {
        "type": "component",
        "alternate": "app/components/{}.test.jsx"
    }
}

But this one doesnt?

{
    "app/components/*": {
        "app/components/*.test.jsx": {
            "type": "test",
            "alternate": "app/components/{}.jsx"
        },
        "app/components/*.jsx": {
            "type": "component",
            "alternate": "app/components/{}.test.jsx"
        }
    }
}
tpope commented 2 years ago

The 3-level version is only for use with g:projectionist_heuristics. Technically, it isn't even JSON, it's VimL.