TIL: coc.nvim goto features
2022-06-04 00:00:00 +0000 UTCThe coc.nvim plugin for (neo)vim provides an implementation of LSP and utilities for working with LSP features in Vim.
One of the most useful features is the set of “goto” features. I use these regularly:
- Go to definition (coc-definition)
- Bound to
gd
, this brings you to the definition of the variable of function under your cursor.
- Bound to
- Go to type definition (coc-type-definition)
- Bound to
gy
, this brings you to the definition of the type under your cursor.
- Bound to
- Go to references (coc-references)
- Bound to
gr
, brings up navigation panes to browse the references to this function in your current project.
- Bound to
These are especially useful as I am currently working on a C project (ccask) and find the ergonomics excellent for moving between .c
and .h
files and for quickly finding references to code in disparate files.