Hacker News new | ask | show | jobs
by nameless912 1394 days ago
NeoVim + language servers + global search with rg + a bunch of keyboard shortcuts:

- <spc>gd = go to definition

- <spc>gr = open a hovering window filled with references to symbol

This is enough to get through every codebase I've yet encountered (Go, Typescript, Python, Java, C++). I also like to use <C-I> and <C-O> in vim which allows you to jump between the most recently viewed locations.

For keeping context, I just write everything down! Either in a scratch file or on a digital notetaking app on my iPad.

1 comments

Are those keyboard shortcuts part of the LSP server?
Nope, you have to map them but they are very easy to do. You can use the suggested keymaps from nvim-lsp GitHub too (still need to copy pasta).
No, but defining one is as easy as one magic incantation in your .vimrc:

  nnore <leader>gd :LspGoToDefinition<CR> 
...or something like that. I haven't touched the config in a few months.