Skip to content

Awkward handling of LSPs that don't support textDocument/completion (e.g. null-ls) #220

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

Closed
2 tasks done
andrewferrier opened this issue Oct 30, 2024 · 2 comments
Closed
2 tasks done
Labels
bug Something isn't working

Comments

@andrewferrier
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 am using the latest stable version of blink.cmp. Thanks for your hard work, this is an amazing completion plugin and so much better out-of-the-box than nvim-cmp.

I am having issues though with LSPs that don't support the textDocument/completion method. For example, when inserting text into both markdown docs (where I use null-ls, technically not an LSP, but it emulates one), and the gitcommit filetype, I see errors on insert like this:

Error detected while processing TextChangedI Autocommands for "*":
method textDocument/completion is not supported by any of the servers registered for the current buffer

I guess it would make sense for blink.cmp to silently disable its LSP integration in this case if that method isn't supported for a buffer.

I can work around this for now by adding the relevant filetypes to blocked_filetypes.

Relevant configuration

return {
    "saghen/blink.cmp",
    lazy = false,
    version = "*",
    opts = {
        accept = { auto_brackets = { enabled = true } },
        trigger = { signature_help = { enabled = true } },
        -- blocked_filetypes = { "gitcommit", "markdown" }, <--- how to work around issue
    },
}

neovim version

NVIM v0.11.0-dev-1066+g05d9e6a9e

blink.cmp version: branch, tag, or commit

v0.5.0

@andrewferrier andrewferrier added the bug Something isn't working label Oct 30, 2024
@Saghen Saghen closed this as completed in 193423c Oct 31, 2024
@Saghen
Copy link
Owner

Saghen commented Oct 31, 2024

Thanks for your hard work, this is an amazing completion plugin and so much better out-of-the-box than nvim-cmp.

Thanks for the kind words! Glad it's working well for you :) Lmk if you're still running into the bug on main

@andrewferrier
Copy link
Author

Thanks for the very rapid fix! Can confirm this seems to be working.

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

2 participants