Skip to content

set_all delgates to set #15

@jrray

Description

@jrray

M.set_all = function()
inlay.set()
end

Hi, I'm trying to figure out why I don't see inlay hints enabled by default in my config, and I noticed the suggested default config calls set_all but that ends up calling set internally.

  local ih = require('inlay-hints')                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                          
  ih.setup()                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                          
  local rust_tools = require('rust-tools')                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                          
  local opts = {                                                                                                                                                                                                                                                                          
      tools = {                                                                                                                                                                                                                                                                           
          on_initialized = function()                                                                                                                                                                                                                                                     
              ih.set_all()                                                                                                                                                                                                                                                                
          end,                                                                                                                                                                                                                                                                            
          inlay_hints = {                                                                                                                                                                                                                                                                 
              auto = false,                                                                                                                                                                                                                                                               
          }                                                                                                                                                                                                                                                                               
      },                                                                                                                                                                                                                                                                                  
      server = {                                                                                                                                                                                                                                                                          
          on_attach = function(c, b)                                                                                                                                                                                                                                                      
              ih.on_attach(c, b)                                                                                                                                                                                                                                                          
          end,                                                                                                                                                                                                                                                                            
      }                                                                                                                                                                                                                                                                                   
  }                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                          
  rust_tools.setup(opts)

Inlay hints appear if I turn them on for each buffer, but I would like them to be on by default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions