emacs-lsp / lsp-mode

Emacs client/library for the Language Server Protocol
https://emacs-lsp.github.io/lsp-mode
GNU General Public License v3.0
4.76k stars 872 forks source link

No option to disable type hints (specifically "type") #4490

Open Froloket64 opened 2 months ago

Froloket64 commented 2 months ago

Thank you for the bug report

Bug description

The customization list for inlay hints seems to lack the type hints variable (not found in source).

Steps to reproduce

Install lsp-mode and rustic, additionally set:

(setq lsp-inlay-hint-enable t)

Expected behavior

Hello, I've recently started configuring lsp-mode with rustic (rust-analyzer) and found that I can't disable type inlay hints (hints for variable types). All of the other kinds of hints seem to be configurable fine.

20240709_10h41m25s_grim

Which Language Server did you use?

rust-analyzer automatically configured by rustic

OS

Linux

Error callstack

No response

Anything else?

As said previously, the variable seems to be missing in the customizations and it is set to true by default in rust-analyzer. Furthermore, lsp-workspace-show-log shows initializationOptions.inlayHints.typeHints.enable passed as true. Additionally, this option is listed here, on the official user manual: https://rust-analyzer.github.io/manual.html#configuration

Froloket64 commented 2 months ago

I'd love to send a PR, but I don't know Elisp well enough yet (although this might be seen as an excuse :)).