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

Conflicts with other embedded nvim instances

axieax opened this issue · comments

Describe the bug
A clear and concise description of what the bug is.

I'm trying to use plugins such as one-small-step-for-vimkind which spawn an embedded Neovim instance, seemingly conflicting with this plugin. I've filed an issue under that plugin already, and the plugin author suggested asking you for solution to this problem. More context can be found under this issue.

To Reproduce
Steps to reproduce the behavior:

  1. Run :lua require'osv'.launch{port=8086}
  2. Error occurs

Expected behavior
A clear and concise description of what you expected to happen.

OSV launches and does not return the following error:

E5108: Error executing lua Vim:Error invoking 'nvim_exec_lua' on channel 3:
ch 3 was closed by the client
stack traceback:
        [C]: in function 'rpcrequest'
        ...re/nvim/lazy/one-small-step-for-vimkind/lua/osv/init.lua:134: in function 'launch'
        [string ":lua"]:1: in main chunk

Screenshots
If applicable, add screenshots and/or videos to help explain your problem.

Desktop (please complete the following information):

  • OS: Mac OS Ventura 13.2.1 (M1 Max)
  • Neovim Version: 0.8.3

Additional context
Add any other context about the problem here.

I'll work on this today! Wasn't aware there were plugins that made use of nested instances.

The idea I have right now is to add a config option that allows nested instances to open when they aren't launched with any arguments.

Ideally I'd have a way to check if the nested instance was spawned in a terminal or programmatically, but I'm not sure that's possible so I'll add the config option while I'm looking into it.

Should work with the new option enabled, let me know if it doesn't :)

Thanks, works like a charm now! Just wondering why this isn't the default option? Will there be other potential side effects?

It's not the default because I want to minimize breaking changes for configs, but I may make it a default in the future. Glad it works!