Nvim as IDE for golang developers (and possibly other languages supported by plugins).
Main feautures:
- LSP-based features
- completions
- hinting / linting
- go to definition/references/etc...
- snippets
- fuzzy completions for LSP/snippets/etc...
- full-text grep
- fuzzy file searching with preview (ctrl-p, fzf analogue)
- project file tree preview
- source file classes/methods/vars tree preview
TODO:
- delve (debugger) support
- interactive terminal /
:GoRun - bugfixies
Some key functions in action are displayed here:
Configure font rendering in your system and select good monospace font for nvim. Rendered text must be:
- crisp (minimal blur edges)
- readable
- not too small/large
This will provide you with a foundation to work comfortably.
Personally I achive this goals with:
neovidegui frontend for nvim (uses custom opengl font rendering engine).guifont=Liberation\ Mono:h9.3(must be installed in system, check withfc-list : family style | grep -i liberation)nerd-fonts-noto-sans-monomust be installed in Arch for cool utf symbols inside nvim.
Below all nvim commands are alias for neovide.
- clone this repository into
~/.config/nvimpath. - install packer https://github.com/wbthomason/packer.nvim#quickstart
- run
nvim +PackerSync - inside nvim run
:LspInstall goplsfor installing golang LSP server and:LspInstall phpactorfor php LSP server - run
nvim +GoInstallBinaries - inside nvim run
:TSInstall go gomod html javascript vueand:TSInstall <filetype>for eachfiletypeyour work with (supports tab-completions).
F keys:
F3- reload nvim config filesF5- project treeF8- source code tree
LSP keys:
gi- go implementationgd- go to definitiongr- go to references to variable/method/etc under cursor<space>D- go to type of objectK- show popup hint about object under cursor<space>rn- rename word under cursor (refactoring)
Autocomplete keys:
<c-space>- force autocomplete<c-e>- cancel autocomplete<c-b>,<c-f>- scroll docs<cr>- confirm autocomplete
Fuzzy searching / navigation:
<c-t>- find files in project dir<c-p>- find opened buffer<c-h>/<c-l>- prev/next buffer (ctrl + vim-style left-right)
Other stuff:
<space>w- write current fileright arrow- change numberingleft arrow- strip trailng spaces and save<a-y>/<a-p>- alt + yand/paste from system clipboard buffer
:LspInstallInfo- list of available LSP servers for current file. Select and install withikey.:GoInstallBinaries- install all needed golang tools:TSInstall- install TreeSitter lang modules:Gor:Git- run vim-fugitive (plugin for git)