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

No brackets rust macros? #359

Closed
2 tasks done
pwnwriter opened this issue Nov 21, 2024 · 3 comments
Closed
2 tasks done

No brackets rust macros? #359

pwnwriter opened this issue Nov 21, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@pwnwriter
Copy link

Make sure you have done the following

  • I have updated to the latest version of blink.cmp
  • I have read the README

Bug Description

I've enabled auto-brackets but yet there's no brackets around macros like println print or so.

Screenshot 2024-11-21 at 2 38 14 PM

Relevant configuration

{
    "saghen/blink.cmp",
    event = { "LspAttach", "InsertCharPre" },
    version = "v0.*",
    opts = {
      highlight = {
        use_nvim_cmp_as_default = true,
      },
      nerd_font_variant = "mono",

      accept = { auto_brackets = { enabled = true } },
      trigger = { signature_help = { enabled = true } },

      keymap = {
        ["<CR>"] = { "select_and_accept", "fallback" },
        ["<C-n>"] = { "select_next", "fallback" },
        ["<C-p>"] = { "select_prev", "fallback" },
        ["<C-y>"] = { "scroll_documentation_down" },
        ["<C-e>"] = { "scroll_documentation_up" },
      },

      windows = {
        autocomplete = {
          border = "single",
        },
        documentation = {
          auto_show = true,
          border = "single",
          auto_show_delay_ms = 100,
        },
      },
    },
  }

neovim version

NVIM v0.10.2 Build type: Release LuaJIT 2.1.1713773202 Run "nvim -V1 -v" for more info

blink.cmp version: branch, tag, or commit

"blink.cmp": { "branch": "main", "commit": "75cadbcd2657ed01326ca2b0e5e4d78a77127ca3" },

@pwnwriter pwnwriter added the bug Something isn't working label Nov 21, 2024
@Saghen
Copy link
Owner

Saghen commented Nov 21, 2024

The auto brackets were explicitly disabled for rust due to them being inaccurate too often. You can force enable them with force_allow_filetypes = { 'rust' }. Lmk if it's working well for you though and I'll remove it from the blocklist

@Saghen Saghen closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2024
@pwnwriter
Copy link
Author

Works flawlessly, I think you can remove it. but yes I'd want the brackets to be also shown in the completion menu(items). it it's possible?


Screenshot 2024-11-21 at 4 25 25 PM
Screenshot 2024-11-21 at 4 25 53 PM

Saghen added a commit that referenced this issue Nov 24, 2024
@AstrickHarren
Copy link

AstrickHarren commented Dec 20, 2024

I think in my case there are extra parenthesis for derive macros, is there a way to avoid parenthesis for derive traits or am i missing something?

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

No branches or pull requests

3 participants