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

add features "choice module to use" and "support float notify window"

Open BingCoke opened this issue 2 years ago • 3 comments

choice module

#364

we want to disable some module that we will not use. So here is a simply solustion. We can set options.open and open some module to use.

rt.setup({
 tools = {
    -- if you want disable hints use this config
    inlay_hints = {
      auto = false,
    }
  },

  open = {
    crate_graph = false,
    expand_macro = false,
    external_docs = true,
    debuggables = false,
    hover_range = false,
    workspace_refresh = true,
    move_item = false,
    standalone = false,
    dap = false,
    parent_module = false,
    runnables = false,
  },
})

support float notify window

cargo workspace reloaded will trigger vim.notify() which give me a bad editing experience. So I create a float window to replace it.

Peek 2023-05-14 13-08

BingCoke avatar May 14 '23 05:05 BingCoke

I feel the word open is not obvious maybe enable is better ?

sigmaSd avatar May 18 '23 16:05 sigmaSd

Or maybe naming doesn't matter, I'm interested i where this pr will go, since I have a plugin with the same architecture as rust-tools and I think this is a good feature to add.

sigmaSd avatar May 18 '23 16:05 sigmaSd

How much time does disabling this actually save? could the loading be made lazier instead to reap similar benefits?

enable is much more common to use in neovim plugins

and you can just use nvim-notify if you want vim.notify to have a floating window, doesn't feel like its the scope of this plugin

IndianBoy42 avatar Jul 12 '23 15:07 IndianBoy42