rust-tools.nvim icon indicating copy to clipboard operation
rust-tools.nvim copied to clipboard

autoSetHints = true resets RustDisableInlayHints

Open druskus20 opened this issue 3 years ago • 2 comments

Specifying autoSetHints = true causes hints to be shown on save. This shouldn't happen if the user has previously disabled hints with RustDisableInlayHitns or RustToggleInlayHints.

out

  • Notice how the hint ParserConfig reappears after saving the file

Relevant parts of my config

tools = {
  autoSetHints = true,
  inlay_hints = {
    show_parameter_hints = true,
    other_hints_prefix = "\194\187 ",
    only_current_line_autocmd = "CursorHold",
    only_current_line = false,
    right_align_padding = 7,
    parameter_hints_prefix = "< ",
    right_align = false,
    highlight = "RustInlayHint",
    max_len_align = false,
    max_len_align_padding = 1
  }
}

druskus20 avatar Jan 26 '22 05:01 druskus20

You're right, this is a bug

simrat39 avatar Feb 05 '22 05:02 simrat39

But yeah, gonna rewrite the inlay hints code, its a mess right now

simrat39 avatar Feb 05 '22 05:02 simrat39