sublimelsp / LSP

Client implementation of the Language Server Protocol for Sublime Text
https://lsp.sublimetext.io/
MIT License
1.62k stars 182 forks source link

`...` annotations popping up #2497

Open KGOH opened 1 week ago

KGOH commented 1 week ago

Describe the bug

With code lens disabled sometimes I observe ... popping up in the right side of all views after I edit code.

To Reproduce Prepare a file that defines a symbol (a function) that's used in some other files within the project. (I.e. a file with a function that would have "1 reference" showed if code lens were enabled)

  1. Put
     "disabled_capabilities": {
       "codeLensProvider": true
     },

    into your LSP configuration

  2. Open a file with LSP enabled, wait for LSP to start.
  3. Edit the name of the function
  4. Undo the edit
  5. Observe ... in the right side of the view

Expected behavior

No ... annotation on the screen

Screenshots

https://github.com/sublimelsp/LSP/assets/11963737/eafda1b5-132d-4eb8-9d02-2bbc40e992d5

Logs

LSP_log.txt LSP_log_debug.txt

[Troubleshooting output] # Troubleshooting: ClojureHelper ## Version - LSP: 2.1.0 - Sublime Text: 4169 ## Server Test Run - exit code: 0 - output ``` ``` ## Server Configuration - command ```json [ "clojure-lsp" ] ``` - shell command ```sh clojure-lsp ``` - selector ``` source.clojure ``` - priority_selector ``` source.clojure ``` - init_options ```json {} ``` - settings ```json {} ``` - env ```json {} ``` ## Active view - File name ``` /Users/kgofhedgehogs/Work/ps/src/ps.cljc ``` - Settings ```json { "auto_complete_selector": "meta.tag, source - comment - string.quoted.double.block - string.quoted.single.block - string.unquoted.heredoc", "lsp_active": true, "syntax": "Packages/Clojure/ClojureScript.sublime-syntax" } ``` - base scope ``` source.clojure.clojurescript ``` ## Project / Workspace - folders ```json [ "/Users/kgofhedgehogs/Work/ps" ] ``` - is project: False ## LSP configuration ```json { "log_debug": true, "show_code_actions": "bulb", "show_view_status": false } ``` ## System PATH - /usr/local/bin - /usr/bin - /bin - /usr/sbin - /sbin - /Library/Apple/usr/bin - /opt/homebrew/opt/arm-gcc-bin@8/bin - /opt/homebrew/opt/avr-gcc@8/bin - /opt/homebrew/opt/qt@5/bin - /opt/homebrew/sbin - /Users/kgofhedgehogs/.jenv/shims - /Users/kgofhedgehogs/bin - /opt/homebrew/bin - /Users/kgofhedgehogs/.orbstack/bin

Environment (please complete the following information):

Additional context "ClojureHelper" source located here: https://github.com/sublimelsp/LSP/issues/1844#issuecomment-961214237

rchl commented 1 week ago

I think it would be worth creating an issue for that in the Clojure server since it looks like even though the LSP client says that code lens is not supported, it still sends a workspace/codeLens/refresh request.

The LSP client could also be changed to ignore code lens requests in that case but I'd say that the issue starts with Clojure.