To switch back between Golang and Scala: init.vim
and init.lua
I followd the guide provided by this guy (https://octetz.com/docs/2019/2019-04-24-vim-as-a-go-ide/) and faced some problems:
- The
vim.plug
should be copied inside~/.config/nvim/autoload/
not~/.var/app/io.neovim.nvim/data/nvim/site/autoload/
. - The command
:GoInstallBinaries
installs the binaries likegopls
(in my case) inside$HOME/go/bin
. Therefore,$HOME/go/bin
must be appended to the$PATH
variable.
if [ -d "$HOME/go/bin" ] ; then
PATH="$PATH:$HOME/go/bin"
fi
gcc
was not installed by default in my distribution (Ubuntu 20.04) while it was necessary for installation of some binaries.- To install
gcc
:
To verify installation:apt install build-essential
gcc --version
- To install
:GoInstallBinaries
didn't installgocode, gocode-gomod, gogetdoc, golint, gometalinter
.- To install
golint
:
apt install golint
- To install
godoc
: https://installati.one/ubuntu/20.04/gocode/
- To install
- Remove nvim using
apt-get
. - Install nvim using app image.
- Move nvim app image to
/use/bin/nvim
. - Point vim to nvim (alias in .bashrc).
~/.config/nvim
: nvim dir~/.config/nvim/autoload/plug.vim
: for loading plugins- coc: language server (nvim has also LSP itself)
init.vim
: LSP key bindings, etc.~/.vim
: Pluggins are installed here.init.lua
vsinit.vim
- https://github.com/zmb3/gogetdoc
- https://github.com/alecthomas/gometalinter
- junegunn/vim-plug#812
- https://github.com/fatih/vim-go
- https://github.com/neovim/neovim
- https://github.com/neoclide/coc.nvim
- https://github.com/neoclide/coc.nvim/wiki
- https://github.com/scalameta/nvim-metals
- https://github.com/scalameta/coc-metals
- https://github.com/nanotee/nvim-lua-guide
- https://vonheikemen.github.io/devlog/tools/configuring-neovim-using-lua/
- https://github.com/wbthomason/packer.nvim
~/.local/share/nvim/site/pack/packer/opt/packer.nvim/
- https://www.reddit.com/r/neovim/comments/ri0vpv/how_can_i_install_plugins_automatically_with/
- comment
map("n", "<leader>f", vim.lsp.buf.formatting)
. :PackerInstall
- comment
source ~/.profile
(because of coursier/bin)cs install metals
:MetalsInstall
https://blog.afoolishmanifesto.com/posts/vim-lsp-scala/
- coc-java
- https://javadev.org/devtools/ide/neovim/coc/
- https://github.com/nvim-treesitter/nvim-treesitter
TSInstall go
TSInstall java
- https://github.com/nanotee/nvim-lua-guide
- https://github.com/preservim/nerdtree
- https://stackoverflow.com/questions/1656591/how-to-jump-back-to-nerdtree-from-file-in-tab
- https://www.reddit.com/r/neovim/comments/wzyn1i/programming_in_c_using_neovim/
- https://jdhao.github.io/2020/11/29/neovim_cpp_dev_setup/
- https://codevion.github.io/#!vim/coc.md
- https://github.com/dense-analysis/ale
- https://www.reddit.com/r/vim/comments/cdo5ou/does_anyone_know_how_to_format_indent_c_as_you/
- https://stackoverflow.com/questions/53664/how-to-effectively-work-with-multiple-files-in-vim
- https://stackoverflow.com/questions/1445992/vim-file-navigation
- https://vim.fandom.com/wiki/Alternative_tab_navigation