1 Star 0 Fork 0

SpaceVim / nvim-typescript

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

Nvim-Typescript

nvim language service plugin for typescript

Installation

First make sure you have Neovim 0.3.8 or higher. This includes the node-host that is required for this plugin.

You will need a global install of the neovim client as well. This will make sure that neovim and node can communicate.

npm install -g neovim

After installing the neovim client, you will have to run :UpdateRemotePlugins.

You might want to also have typescript install globally. By default, this plugin will look in your node_modules folder first for typescript, but if that does not exist, it will use the global install.

npm -g install typescript

Then add the following plugins. This example shows Dein.vim and Plug.vim, but any plugin manager will work.

 " Dein
 # REQUIRED: Add a syntax file. YATS is the best
  call dein#add('HerringtonDarkholme/yats.vim')
  call dein#add('mhartington/nvim-typescript', {'build': './install.sh'})
 " For async completion
  call dein#add('Shougo/deoplete.nvim')
 " For Denite features
  call dein#add('Shougo/denite.nvim')


 " Vim-Plug
 # REQUIRED: Add a syntax file. YATS is the best
  Plug 'HerringtonDarkholme/yats.vim'
  Plug 'mhartington/nvim-typescript', {'do': './install.sh'}
 " For async completion
  Plug 'Shougo/deoplete.nvim'
 " For Denite features
  Plug 'Shougo/denite.nvim'


" Enable deoplete at startup

  let g:deoplete#enable_at_startup = 1

If errors occur after installing, make sure to run ./install.sh in the plugin directory. And try to run :UpdateRemotePlugins if you haven't already.

Limitation

If no completion is happening, please be sure to have a Typescript syntax file in your RTP. Neovim does not include a default syntax for Typescript, so be sure to include one. A popular syntax file for Typescript is yats.vim. Running nvim-typescript with no syntax file could lead to unexpected behavior.

Open Open Source, or how to make this everyone's code

If you happened to build something and would love to make a PR, I would be more than happy to add contributors. If something you do add happens to get merged (most likely it will :grin: ) you'll get a collaborator request. This has worked out very well in the Node community and I want it to happen here. This is as much my code as it is your code.

See:

Debugging

There are a few things you'll have to modify in your nvim config in order to be able to effectively work on this plugin:

  call dein#local('~/GitHub', {},['nvim-typescript'])
  let $NVIM_NODE_LOG_FILE='nvim-node.log'
  let $NVIM_NODE_LOG_LEVEL='warn'

This plug will try to log most things to warn as the node-client logs a lot of verbose output to debug/info. You will now be able to tail -f /PATH_TO/nvim-node.log, and see debug output appear.

TODOS

If there's a feature that you would like to see, feel free to open an issue or send a PR.

Like this plugin? Buy me a coffee on KoFI

空文件

简介

取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/spacevim/nvim-typescript.git
git@gitee.com:spacevim/nvim-typescript.git
spacevim
nvim-typescript
nvim-typescript
master

搜索帮助