Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert required attribute code action inserts bad placeholder #185

Closed
fbricon opened this issue Oct 31, 2018 · 2 comments
Closed

Insert required attribute code action inserts bad placeholder #185

fbricon opened this issue Oct 31, 2018 · 2 comments
Assignees
Labels
bug Something isn't working code action
Milestone

Comments

@fbricon
Copy link
Contributor

fbricon commented Oct 31, 2018

See
insert-req

[Trace - 1:52:32 PM] Received response 'textDocument/codeAction - (69)' in 2ms.
Result: [
    {
        "title": "Insert required attributes",
        "kind": "quickfix",
        "diagnostics": [
            {
                "range": {
                    "start": {
                        "line": 1,
                        "character": 1
                    },
                    "end": {
                        "line": 1,
                        "character": 10
                    }
                },
                "severity": 1,
                "code": "cvc-complex-type.4",
                "source": "xml",
                "message": "cvc-complex-type.4: Attribute 'variant' must appear on element 'resources'."
            }
        ],
        "edit": {
            "documentChanges": [
                {
                    "textDocument": {
                        "version": 8,
                        "uri": "file:///Users/fbricon/Downloads/sample-resources%203/tesst/resources.xml"
                    },
                    "edits": [
                        {
                            "range": {
                                "start": {
                                    "line": 1,
                                    "character": 10
                                },
                                "end": {
                                    "line": 1,
                                    "character": 10
                                }
                            },
                            "newText": " variant=\"$1\""
                        }
                    ]
                }
            ]
        }
    }
]
@NikolasKomonen
Copy link
Contributor

CodeActions do not support snippets at the moment.

@angelozerr
Copy link
Contributor

CodeActions do not support snippets at the moment.

Yes that's why I disable it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working code action
Projects
None yet
Development

No branches or pull requests

3 participants