Kills the terminal using the kill function specified in the Wrapper:setup(opts) function, and resets the Wrapper object's channel, winid, and bufnr variables to nil. create (bool, default true): Whether to create the terminal if it does not already existĬloses the terminal using the close function specified in the Wrapper:setup(opts) function.cmd (string, default nil): Command to run upon opening the terminal.Opens the terminal using the open function specified in the Wrapper:setup(opts) function. Wrapper:create()Ĭreates a new terminal buffer, using the create function specified in the Wrapper:setup(opts) function, and updates values for the terminal's bufnr, winid, etc. This way all of its variables like bufnr, winid, etc. kill (function): The function used to kill the terminal.įunction (self) vim.cmd("bd! ".self.bufnr) endĮxcept for create, all of these functions accept one argument, which is a reference to the Wrapper object iself.close (function): The function used to close the terminal.open (function): The function used to open the terminal.create (function): The function used to create the terminal.Setup the Wrapper using the provided configuration options Arguments Returns a new Wrapper object Wrapper:setup(opts) The way you interact with Consolation is through its Wrapper object. What this means practically speaking is that you can have a floating terminal (like with Floaterm or FTerm) that can be controlled with lua functions similarly to Neoterm. The idea of this plugin is to take absolutely any asthetically enhancing terminal plugin and make it easy to use programmatically as well. Floaterm), trying to get either the terminal management plugin to work with floating windows or the floating terminal plugin to accept input programmatically is a major pain. Neoterm) or floating terminal plugins (e.g. The main reason that the author created this plugin is because while there is no shortage of either terminal management plugins (e.g. But, as is the case with many vim and neovim plugins, consolation.nvim is much more than its default configuration. I know what you're thinking: "There are already dozens of terminal wrapper plugins for vim/neovim out there! Why yet another?" And you'd be partially right - the default configuration of consolation.nvim is basically the same as all the other terminal wrapper plugins out there. A general-perpose terminal wrapper and management plugin for neovim, written in lua
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |