Skip to content

Cody suggestions in Svelte files always removes closing tags for script and style #1033

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

Open
Miroku87 opened this issue Mar 18, 2025 · 0 comments

Comments

@Miroku87
Copy link

Hello,
I have an issue with Cody while writing Svelte code: everytime I'm writing code just before a </script> or a </style> tag, if I get a Cody suggestion and I hit Tab to confirm it, the change will always delete the closing tag right after that.
It's quite annoying since it forces me to rewrite that tag every single time.

Is there a setting that maybe can avoid this?
As Cody itself suggested, I've tried putting this config in my ~/.config/sourcegraph/cody/cody.json

{
    "rules": {
        "svelte": {
            "preserveTags": {
                "script": true,
                "style": true
            }
        }
    },
    "filePatterns": {
        "*.svelte": {
            "enforceClosingTags": [
                "script",
                "style"
            ]
        }
    }
}

Unfortunately nothing has changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant