coc-extensions / coc-powershell

PowerShellEditorService integration for coc.vim
MIT License
58 stars 9 forks source link

Integrated PS console - follow up #56

Open mikeTWC1984 opened 5 years ago

mikeTWC1984 commented 5 years ago

Did some clean up/overview and realize some old issues are still there

1) Despite #52 powershell.execute command still doesn't work properly, file path is generated but is sent to a new terminal (not the integrated one) and closes immediately. Tested in both vim/nvim (latest) on a fresh Ubuntu container.

2) evaluateSelection doesn't work in Vim (works fine in NeoVim). Getting this error: request error nvim_buf_get_mark buf_get_mark support current buffer only

3) Integrated console doesn't work in Windows. gVim throws some error, but neovim just not loading it (using latest versions of both). I guess vim is not the best option for powershell stuff on windows anyway, so this is more like FYI, in case anybody is willing to research that.

TylerLeonhardt commented 5 years ago

@yatli have we done a release since #52 went in?

TylerLeonhardt commented 5 years ago

Number 2 is probably related to our selection implementation... It's a bit of a hack.

@chemzqm anything that you might need that could help with understanding the 3rd problem? Seems like that's possibly a coc.nvim issue?

corbob commented 5 years ago

I'm using NVIM v0.4.0-1234-g1b99aa8c5 and not having any issues with PSIC in nvim, or nvim-qt (biggest trouble is remembering how to exit the terminal...) I also don't recall having any issues with nvim stable, but it's been a while so I could be wrong...

mikeTWC1984 commented 5 years ago

@corbob Is that on Windows? I think on Windows problems starts when you install coc extensions, getting error from npm about certificates or something (although npm works fine outside vim, and I can run build.ps1 just fine). Idk, maybe manual install will help Just realized windows terminal is already on choco, looking forward to try vim on it.

@TylerLeonhardt , @yatli I discovered that integrated terminal acts a bit quircky in neovim. Usually when I'm get there it's not in insert mode. And some times when you get in insert mode cursor get somewhere in the middle, so need to type cls to escape that mess. In VIM it works just fine (it always in insert mode). Besides that neovim looks like much better choice for ps.

mikeTWC1984 commented 5 years ago

I see 1 and 2 are fix for both vim/neovim, thanks! I'm good to close this

TylerLeonhardt commented 5 years ago

@mikeTWC1984 is 3 still an issue?

yatli commented 5 years ago

@mikeTWC1984 which version of gVim are you running? At least 8.0 is required

mikeTWC1984 commented 5 years ago

Yes, still getting same error. Using 8.1 (latest available on their website) gvim81err I'm getting it on 3 different machines so I assume this is something common.

yatli commented 5 years ago

can you provide the output of :CocInfo?

:CocOpenLog may also help

mikeTWC1984 commented 5 years ago

cocinfo

mikeTWC1984 commented 5 years ago

this is lcocopenlog: 2019-08-01T13:17:32.972 INFO (pid:34232) [plugin] - coc 0.0.73-d9ac1b1568 initialized with node: v10.16.0

mikeTWC1984 commented 5 years ago

Are you guys able to launch it on windows with no problem?

yatli commented 5 years ago

I'm always sticking to Windows, no problem on my side. I use NeoVim.

yatli commented 5 years ago

This doesn't look like a Vim-related problem -- more likely on the javascript side. Which version of Windows are you running?

mikeTWC1984 commented 5 years ago

windows 10 and server 2016. Do you have any issue with gVim on your end? I have neovim 0.38 on one of the machines, but terminal just doesn't start.

mikeTWC1984 commented 5 years ago

I realized I didn't have polyglot on my nvim. After adding completion started working. Tested this on 2 machines. I guess we need to update read me to move polyglot from recommended to prereq. Still can't get it to work with gvim. But I'm good for now anyway

TylerLeonhardt commented 5 years ago

Sounds good. Is it cool that we close this? I think you should open an issue on gvim or coc for better support there but also we should have an issue opened to have polyglot not be a dependency

yatli commented 5 years ago

@mikeTWC1984 I have the problem repro. [coc.nvim] Error on active extension coc-powershell: TypeError: (intermediate value) is not iterable Environment is: Windows 10 1903 node 10.11 coc 0.0.73 polyglot: yes

I will trace this problem now.

mikeTWC1984 commented 5 years ago

Yeah, since nvim is working fine, we definitely can close it. If you guys can figure out if it's coc.nvim or gvim issue I can forward this to them

Gankarloo commented 5 years ago

I have the same problem, trying to use coc-powershell on windows. Enabled the debug log and found this:

2019-09-25T15:31:17.924 ERROR (pid:23096) [extensions] - TypeError: (intermediate value) is not iterable
    at TerminalModel.start (C:\Users\ankarloog\Dropbox\Utilities\gVimPortable8\Data\settings\vimfiles\bundle\coc.nvim\build\index.js:30387:28)
    at process._tickCallback (internal/process/next_tick.js:68:7)

My Environment is:

vim version: VIM - Vi IMproved 8.1 (2018 May 18, compiled May 18 2018 18:36:07)
node version: v10.16.3
coc.nvim version: 0.0.74-07b00fd6fc
term: undefined
platform: win32
polygot: yes