Skip to content

Load python snippets when opening django files? #581

@mfxa

Description

@mfxa

Reading some of the earlier discussions I realize one definitely do not want to load every framework's/library's snippets just when opening a python file, but on the other hand loading a django filetyped file (not the separate htmldjango), I think one would always want to load the python snippets.

This can be done via LuaSnip, but not if one is not using that and instead using nvims native vim.snippet with e.g. blink.cmp.

So I'd suggest a change similar to how html is loaded for many languages:

            {
                "language": [
                    "python",
                    "django"
                ],
                "path": "./snippets/python/python.json"
            },
            {
                "language": [
                    "python",
                    "django"
                ],
                "path": "./snippets/python/comprehension.json"
            },
            {
                "language": [
                    "python",
                    "django"
                ],    
                "path": "./snippets/python/unittest.json"
            },
            {
                "language": [
                    "python",
                    "django"
                ], 
                "path": "./snippets/python/debug.json"
            },

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions