willothy / flatten.nvim

Open files and command output from wezterm, kitty, and neovim terminals in your current neovim instance

Home Page:https://luarocks.org/modules/willothy/flatten.nvim

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow to configure where to open files

Allaman opened this issue · comments

Hi, thanks for this plugin! I just tried it with your settings for toggle-term and it works perfect.

There is one thing I would appreciate. Currently, a file is opened in a new tab. As I never work with tabs, it would be wonderful if there is an option allowing you to open a file in the current window.

Definitely, that's a good idea. I'll add some options for where to open files with the next update! Do you think it'd be useful to configure file open locations for specific filetypes, or would you prefer a setting that applies to all filetypes?

Thanks in advance :)

In my opinion, applying this option to all file types is sufficient.

Sounds good, glad you like the plugin :)

Okay, working on this right now. I'm adding options for opening in a tab (as it already does), in a split, vsplit, or in the current window. You'll also be able to provide a function instead of a string if you want to handle the window opening yourself, and the bufnr of the opened file will be passed to it as an argument.

If there are any more related requests / comments, please add them to #5 :)

It works like a charm! Thanks!