Skip to content

Instantly share code, notes, and snippets.

@chiroptical
Created August 19, 2020 01:56
Show Gist options
  • Save chiroptical/66d6bde5c840277d82d1de90405bbef0 to your computer and use it in GitHub Desktop.
Save chiroptical/66d6bde5c840277d82d1de90405bbef0 to your computer and use it in GitHub Desktop.
Installing neovim with coc.nvim on Ubuntu 20.10 w/ haskell-language-server
  • Update the machine
sudo apt update
sudo apt upgrade
# reboot machine
  • Install prerequisites
sudo apt install neovim haskell-stack libicu-dev libtinfo-dev libgmp-dev zlib1g-dev
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
       https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
  • Setup coc.nvim
sudo apt install nodejs
# This avoids installing npm first
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
mkdir ~/.config
# Add minimal config to another repository
git clone https://github.com/chiroptical/neovim-setup ~/.config/nvim
nvim -c ":PlugInstall" -es
  • Update Stack
stack upgrade --force-download
  • Install haskell-language-server
git clone https://github.com/haskell/haskell-language-server.git --recurse-submodules
cd haskell-language-server/
git checkout 0.3.0
stack ./install.hs latest
cd ~
  • Try it out
stack new hello-world --resolver=nightly-2020-06-29
cd hello-world
stack build
nvim app/Main.hs # Try `,cd` on `putStrLn`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment