Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to TypeScript #20

Merged
merged 8 commits into from
Jun 27, 2019
Merged

Conversation

TylerLeonhardt
Copy link
Collaborator

@TylerLeonhardt TylerLeonhardt commented Jun 25, 2019

fixes #17

TODO:

  • get it working
  • make paths dynamic
  • move download of PSES to ts
  • figure out where to set rtp so coc can discover coc-powershell - coc's package manager provides this, so we should be fine.
  • rename the lang id from ps1 to powershell (maybe defer)
  • build and release pipeline to npm
  • figure out how to get coc to discover coc-powershell npm package - coc's package manager will handle this.

@yatli
Copy link
Member

yatli commented Jun 25, 2019

okay, extension loads properly now with set rtp^=.
the next task is to download PSES, and optionally show a progress bar for this.

@corbob
Copy link
Member

corbob commented Jun 25, 2019

Nice, I tried to copy over the extension.ts and package.json from coc-fsharp, but my tsc runs were causing errors.

@yatli
Copy link
Member

yatli commented Jun 25, 2019

@corbob I was getting erros, so I updated the package versions in package.json and ran npm install and it's fixed (not sure why)

@TylerLeonhardt TylerLeonhardt changed the title not working yet Move to TypeScript Jun 25, 2019
@TylerLeonhardt
Copy link
Collaborator Author

ok updated with this working for me. We only have a couple things left to do here. Feel free to pick up one if you'd like.

@corbob
Copy link
Member

corbob commented Jun 25, 2019

I think once it's in npm, then coc finds it if I understand correctly.

Am I correct in my understanding that to install it you would simply :CocInstall <Full Path to local repository>? Do we need to rev the version number to test changes (I was reving it last night and then doing :CocUpdate to get an update, but that might not be needed?)

@TylerLeonhardt
Copy link
Collaborator Author

nope. For me, it just worked when I removed the Plug entry and just had:

set rtp^=/path/to/coc-powershell

@yatli
Copy link
Member

yatli commented Jun 26, 2019

figure out where to set rtp so coc can discover coc-powershell

If you use the coc plugin manager, it'll be downloaded from npm and discovered automatically.
There are two ways of doing this:

  1. use :CocInstall coc-powershell
  2. add to your vimrc: let g:coc_global_extensions=[ 'coc-powershell', ... ]

@yatli
Copy link
Member

yatli commented Jun 26, 2019

rename the lang id from ps1 to powershell (maybe defer)

I prefer to stay with set filetype=ps1 because there are other components relying on this id -- syntax highlight, indent rules, etc.
Most notably, people may use vim-polyglot or https://github.com/PProvost/vim-ps1.

@TylerLeonhardt
Copy link
Collaborator Author

So I've made a change to have ts run the install.ps1. My reasoning:

  • PowerShell is already needed so we can leverage it
  • PowerShell's download & unzip APIs are much more intuitive and supported than Node.js's are

Let me know what you think. I'm leveraging the node-powershell package.

@yatli yatli marked this pull request as ready for review June 26, 2019 08:52
@yatli
Copy link
Member

yatli commented Jun 26, 2019

Looks cool! The whole automation process is very smooth.
I've added a few bits so that coc-powershell starts to take advantage of coc features.
For example:

coc-powershell

@yatli
Copy link
Member

yatli commented Jun 26, 2019

note, I've created an output channel for coc-powershell.
use logger.appendLine to output to :CocInfo panel

@yatli yatli merged commit 9c947a3 into coc-extensions:master Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement the client in typescript?
3 participants