Open dseeni opened 4 years ago
Reopening this issue there is no way to close the integrated console buffer? it automatically recreates itself
you can set this setting:
"powershell.integratedConsole.showOnStartup": true
or use the CocAction powershell.toggleTerminal
Tyler, @TylerLeonhardt Neither CocAction OR showOnStartup solve this issue, if it were so I would be very pleased.
Unfortunately that does NOT make the seperate powershell integrated console disappear. There is literally no way to close the buffer or quit.
The only work around I have for this is setting up an autocmd to unlist the buffer, like so:
There is literally no way to get rid of the powershell buffer, the small window yes you can toggle hide it and set showOnStartup:False (Which I have done).. this works for the small window on startup, but not the seperate powershell buffer.
Reading into it it seems this running live instance of the integrated console is necessary for Microsoft's LSP completion and documentation in Coc-Powershell. Which is fine, I like that stuff, so the unlisted buffer seems best, "out of sight out of mind" you know?
This is a very hacky solution, but it works because I can launch my own powershell 7 nvim terminals by binding "pwsh" and exposing it to the env path. Those terminals don't share the full pwsh7 path as the buffers "file name" as the integrated console. They simply register as 'pwsh' and don't become unlisted by this autocmd.
Like you said, all of the language features come from the Integrated Console if you get rid of that, then you don't have any of the goodness that coc-powershell provides.
The reason why the Integrated Console is displayed by default is because this extension is attempting to replicate the experience that a lot of PowerShell users expect:
This experience was made famous in the PowerShell ISE and the PowerShell extension for VS Code.
The CocAction to toggle and the settings were specifically added for the purpose of hiding it for those that don't want to see it but it's still something that needs to exist for language features.
Is there a reason this isn't good enough? I'm just trying to understand what your scenario is.
I just like my buffer list to be buffers I want to be seeing. When you cycle through buffers, say I'm working with only 2 files, its nice to swap between them, rather than have a mandatory 3rd buffer (the powershell ISE) in between. Really just a preference thing.
Of course, the CocAction to hide the split in the powershell file could also unlist the ISE buffer (basically my autocmd). And 'show' could list that separate buffer. Would basically be the same thing. Anyway my workaround has me satisfied, I get all the benefits of Coc-Powershell without an unnecessary buffer in my bufferlist.
Yes I think this is a preference, and our current implementation complies to the nvim defaults (terms are listed). You can use something like https://github.com/yatli/vmux.vim to automatically unlist the terminal buffers.
Yeah we call to coc.nvim to create the terminal buffer and we call hide on it:
I think that method could also unlist or maybe there can be an unlist API as well. @chemzqm do you have any thoughts here?
could also unlist or maybe there can be an unlist API as well.
No, it just hide the buffer. Use autocmd in your vimrc if you want to unlist terminal buffer, but looks like @dseeni want to destroy the buffer.
No, it just hide the buffer. Use autocmd in your vimrc if you want to unlist terminal buffer, but looks like @dseeni want to destroy the buffer.
@yatli if it goes against standards then disregard, but I have tried all linked plugins including what you posted, and the powershell integrated console refuses to die haha. If I kill it, it will respawn, even using things like vim-bufkill, even if all powershell files are closed.
2 wishlist changes by priority:
Allow the User to destroy the Powershell Integrated Console buffer when there are no longer .ps1 buffers in the buffer list or buffloaded.
the autocmd vs hide option = unlist are virtually the same thing. If it's an option that's nice, since it would make 'hide console' actually more useful. You could simply toggle buffadd vs bufunlist in vimscript, same as the autocmd above I think?
Thanks for taking the time to look into this :)
My suggestion is use a subprocess to start language server, and use prompt buffer (which is quite new on neovim) for interactive.
Reopening this issue there is no way to close the integrated console buffer? it automatically recreates itself
You can close the REPL (only after closing the editor buffer unfortunately) by using the '[Environment]::Exit(1)' command. But to be honest, it (the REPL buffer) should:
To Note and FWIW: I'm using a Mac with VIM 8.2 and PS 7.1.0.
EDIT FROM MAINTAINER:
Give me the ability to unlist the terminal buffer so it doesn't show up in buffer list.
ORIGINAL ASK:
Is there anyway to close the powershell integrated console in neovim? It keeps on launching, even if I kill the buffer it automatically recreates itself.