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

Gradually migrate completion engine to coc (language server) #14

Closed
wookayin opened this issue Feb 24, 2019 · 2 comments
Closed

Gradually migrate completion engine to coc (language server) #14

wookayin opened this issue Feb 24, 2019 · 2 comments

Comments

@wookayin
Copy link
Owner

wookayin commented Feb 24, 2019

Language server is great, and I feel coc.nvim is now in a great shape, even better than before. It is time to use language servers and fade out deoplete.nvim (but not all, just several completion engines)!

As this feature might be highly experimental and have some annoying bugs to plain users of my dotfiles, we can think of the following plan and questions:

  • coc.nvim requires node and yarn installed. It is not shipped by default so it should be automatically installed.
  • Install coc.nvim but do not have it as a default (e.g. in favor of deoplete-jedi) unless explicitly and manually configured. What would be the flag?
  • How to configure the list of coc.nvim engines (e.g. coc-pyls, coc-json) and have them auto-installed?
wookayin added a commit that referenced this issue Feb 25, 2019
This is a first step to host coc.nvim as the main completion engine
for neovim in my dotfiles setting.

* The plugin 'coc.nvim' will be enabled if node and yarn is available,
  and ~/.config/nvim/coc-settings.json exists. The existence of this
  coc setting file determines whether either deoplete or coc will be used.

* For a fresh install, `install.py --enable-coc` will create the coc
  setting file (which is optional hence turned off by default)
@wookayin
Copy link
Owner Author

wookayin commented Feb 25, 2019

The experimental feature can be turned on with:

$ dotfiles update --enable-coc
$ python install.py --enable-coc 

To disable, simply remove ~/.config/coc/

wookayin added a commit that referenced this issue Feb 25, 2019
instead of ~/.config/nvim/coc-settings.json  (#14)
wookayin added a commit that referenced this issue Feb 26, 2019
wookayin added a commit that referenced this issue Feb 26, 2019
Install 'coc-json' and 'coc-pyls' on startup unless installed.
Moreover, python-language-server will be automatically installed
into the current python environment.
wookayin added a commit that referenced this issue Feb 26, 2019
Install `pyls` (requirement for coc-pyls) on vim startup to
coc-pyls get working (#14).
wookayin added a commit that referenced this issue Feb 26, 2019
Alias for :CocList extensions
wookayin added a commit that referenced this issue Mar 15, 2019
Previously I had a manual and hacky way to install coc extensions,
but there is a preferrable way using coc's built-in config variable.

Install {coc-snippets, coc-highlight} as well as {coc-json, coc-pyls}
by default.
wookayin added a commit that referenced this issue Mar 17, 2019
Coc's documentation window (keymap 'K') can appear in a floating
window, which is pretty cool and better than the classic preview
windows.

We should disable pymode and jedi's conflicting bindings.

Ref: #14
wookayin added a commit that referenced this issue Mar 18, 2019
* <Enter> in the insert mode during completion: Use <CR> for
  confirming completion and suggestion

* <F3>: Go to definitions (same as jedi's goto_assignments),
  as well as the command alias :CocJumpDefinition
wookayin added a commit that referenced this issue Mar 18, 2019
wookayin added a commit that referenced this issue Mar 31, 2019
It works pretty well out-of-box.
@wookayin wookayin changed the title Gradually migrating completion engine to coc (language server) Gradually migrate completion engine to coc (language server) Apr 22, 2019
wookayin added a commit that referenced this issue Jun 29, 2019
coc.nvim and Microsoft python language server have been quite
stable these days, so coc.nvim will be enabled by default.

* The --enable_coc flag has been removed, now the installation
  script will create the directory ~/.config/coc by default.

* The install script now checks node.js installation.

* coc.nvim now needs only npm (no more yarn), so setting up of
  coc can be done more easily; coc.nvim will be activated if
  node (npm) is installed and a proper version of neovim is found.
@wookayin
Copy link
Owner Author

coc.nvim is now our default completion engine for neovim, replacing deoplete.

wookayin added a commit that referenced this issue Jul 1, 2019
- gd/gr: Goto definition/reference
- gy/gi: Goto type definition/implementation
wookayin added a commit that referenced this issue Jul 3, 2019
- For deoplete, python 3.6.1+ is required.
- Give a waring mesage if node version is <8.10 (for coc.nvim)
- Make waring messages added in the mesage-history.
wookayin added a commit that referenced this issue Jul 7, 2019
This will show some status about coc's background jobs in the vim
command line. An alternative way is to display coc#status in the
tabline (airline), but this is not aesthetically better than in
command line.

Ref: #14
wookayin added a commit that referenced this issue Jul 7, 2019
Coc's VimL support deserves to be a default option. (#14)
wookayin added a commit that referenced this issue Jul 16, 2019
Displaying coc status message (4c72f34) is cool, but is a bit annoying
when the command line is active by user input or due to linting messages.
So we suppress displaying coc status on CmdlineEnter and CmdlineLeave
events. If idle (after 1 seconds), coc status will resume to appear.

Ref: #14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant