simrat39 / rust-tools.nvim

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

feat(opts): `executor` could be a string #401

Closed cpea2506 closed 8 months ago

cpea2506 commented 1 year ago

As a user, I prefer setting config without the need to know which I should require. I wonder if this would be considered as a breaking change.

Example config

require("rust-tools").setup {
    tools = {
        executor = "toggleterm",
    }
}
IndianBoy42 commented 1 year ago

I think the old behaviour is useful too, the user can extend it themselves to add other executors based on whatever terminal plugins they like (or something else)

You can check if type(executor) == "string" and use an inbuilt executor if it exists