Skip to content

White spaces being deleted incorrectly when using clojure-lsp #1548

@DameonSmith

Description

@DameonSmith

Make sure you have done the following

  • Updated to the latest version of blink.cmp
  • Searched for existing issues and documentation (try <C-k> on https://cmp.saghen.dev)

Bug Description

When working in clojure with the clojure-lsp turned on, accepting some autocomplete suggestions deletes all surrounding whitespace regardless of context. Some examples below:

Cursor is: |

(some-func some|-val other-val)
; ciw 
(some-func | other-val)
; accept auto complete to NEW-VAL
(some-funcNEW-VAL|other-val)

The same thing happens on new lines

(some-func   other-val
             some-|val)
; ciw and accept new-val
(some-func other-val
new-val|)

It only happens when the clojure-lsp is enabled, buffer suggestions don't seem to have the same effect.

So far it happens under the following circumstances:

  • When accepting autocompletes after deleting a text object with ciw
  • When entering insert mode and immediately accepting a suggestion, but not if I delete or type a whitespace character first.

I tried changing a lot of the settings on the LSP itself, but nothing seemed to change the behavior. I don't know if the issue is with how blink integrates with this LSP, or if there's some incantation I'm not doing. I've been trying to debug it for the last 2 hours but no luck.

I was previously using nvim-cmp and didn't have this problem.

The LSP is installed with mason, and configured with lsp-config; if it matters.

Relevant configuration

neovim version

0.11.0

blink.cmp version

033fbcc

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions