simrat39 / rust-tools.nvim

Tools for better development in rust using neovim's builtin lsp
MIT License
2.17k stars 159 forks source link

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

Open BingCoke opened 1 year ago

BingCoke commented 1 year ago

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

sigmaSd commented 1 year ago

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

sigmaSd commented 1 year ago

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.

IndianBoy42 commented 1 year ago

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