clojure-lsp / clojure-lsp

Clojure & ClojureScript Language Server (LSP) implementation

Home Page:https://clojure-lsp.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alias code action "Add require ... x 1" instead of real count

NoahTheDuke opened this issue · comments

commented

Describe the bug
Every since #1053, the code action which shows Add require [clojure.string :as str] x N has only shown 1 instead of the total count.

To Reproduce
Steps to reproduce the behavior:

  1. git checkout afc2f6fcee2edd9932c460c397d31ed444741142 (the offending commit)
  2. make debug-cli && chmod +x clojure-lsp
  3. Configure your editor to use clojure-lsp
  4. Open a file with a missing require, run the code action to see the wrong output.
  5. git checkout 54b4251f459375fe9d8943c731368f71ca95e676 (the commit immediately before)
  6. make debug-cli && chmod +x clojure-lsp
  7. Open a file with a missing require, run the code action to see the correct output.

Expected behavior
The total count continues to be shown.

Screenshots
Before the PR:
image

After the PR:
image

User details (please complete the following information):

  • OS: OSX 14.4
  • Editor neovim with coc.nvim and coc-clojure
  • Version: latest but also the two commits above

Additional context
I used git bisect to find the above.

commented

Thanks for fixing, @ericdallo!