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

Disable completion in comments #352

Open
DuilioPerez opened this issue Apr 26, 2024 · 1 comment
Open

Disable completion in comments #352

DuilioPerez opened this issue Apr 26, 2024 · 1 comment

Comments

@DuilioPerez
Copy link

DuilioPerez commented Apr 26, 2024

I eould like an option to disable this plugin while I write inside comments. I have hoza/vim-snippets as the snippet provider for coc-snippets. My coc-config is the next:

    {
      "coc.source.around.enable": false,
      "coc.source.buffer.enable": false,
      "coc.preferences.formatOnSave": true,
      "coc.source.emoji.enable": true,
      "inlayHint.enable": false,
      "clangd.arguments": ["--header-insertion=never"]
    }
@chemzqm
Copy link
Member

chemzqm commented Mar 3, 2025

You need add code

    if (context.option.synname.match(/comment/)) return

before

let doc = workspace.getDocument(document.uri)

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

No branches or pull requests

2 participants