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

Can't disable code lens in settings #2422

Closed
KGOH opened this issue Feb 14, 2024 · 4 comments
Closed

Can't disable code lens in settings #2422

KGOH opened this issue Feb 14, 2024 · 4 comments

Comments

@KGOH
Copy link

KGOH commented Feb 14, 2024

Describe the bug

I can't figure out how to disable code lens by default. show_code_lens setting has documentation that only allows annotation and phantom values. If I toggle code lens, it sets window settings variable show_code_lens to False. If I set config show_code_lens to False, this has no effect.

To Reproduce

Steps to reproduce the behavior:

  1. Add "show_code_lens": false to your LSP.sublime-settings file
  2. Open a new project with a LSP server set up
  3. Observe code lens appearing

Expected behavior

No code lens showing. I expect to have an ability to disable code lens by default while still retaining the setting of code lens appearance (annotation/phantom) in case I want to toggle them on.

Environment (please complete the following information):

  • OS: macOS 12.2
  • Sublime Text version: 4169
  • LSP version: v1.28.0
  • Language servers used: Clojure
@predragnikolic
Copy link
Member

Hello,

Answer can be found here ->
#2419 (comment)

@KGOH
Copy link
Author

KGOH commented Feb 14, 2024

@predragnikolic the provided solution does disable code lens indeed, but this apparently leaves me without ability to toggle them on via LSP: Toggle Code Lenses

@rchl
Copy link
Member

rchl commented Feb 14, 2024

Why not use LSP: Toggle Code Lenses only then? The setting is stored in the window so it's remembered when switching between saved projects.

I guess if you are looking for default to be false for new windows then that's not possible right now.

@KGOH
Copy link
Author

KGOH commented Feb 14, 2024

@rchl got you. I'll see if this works for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants