F# Monkey

about

F# and Neovim

Summary

How to use vim-fsharp on Neovim

Like this

f:id:callmekohei00:20161225143010p:plain

Environment

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.12.2
BuildVersion:   16C67

$ uname -v
Darwin Kernel Version 16.3.0:
Thu Nov 17 20:23:58 PST 2016;
root:xnu-3789.31.2~1/RELEASE_X86_64

Reinstall CommandLineTools

$ sudo rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install

Reinstall home brew

$ sudo rm -rf /usr/local/Cellar /usr/local/.git && brew cleanup
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install )"
$ brew update
$ brew doctor // Follow directions ( e.g brew prue )

Reinstall local python

// check site location
$ python -m site

// delete packages
$ sudo rm -rf /usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
$ sudo rm -rf /usr/local/lib/python2.7/site-packages
$ sudo rm -rf /Users/kohei/Library/Python/2.7/lib/python/site-packages

// delete include file
$ sudo rm -rf /usr/local/include/python*

// reinstall python
$ brew uninstall -f python
$ brew install   python
$ pip  install   --upgrade pip setuptools

// reinstall package ( -I is very important )
$ sudo -H pip2 install --upgrade -I neovim

Install mono

$ brew install mono

Install Neovim

$ brew install neovim

Setting Noevim

// create nvim folder and init.vim file
$ mkdir .config/nvim
$ vim   .config/nvim/init.vim

// create dein folder and dein.toml file
$ mkdir .config/nvim/dein
$ vim   .config/nvim/dein.toml

Contents of init.vim

"----------------------------------------------------------
" For Shougo/dein.vim
"----------------------------------------------------------

" Set your path
let s:dein_dir = '/Users/kohei/.config/nvim/dein'
let s:toml     = '/Users/kohei/.config/nvim/dein.toml'


let s:dein_repo_dir = s:dein_dir . '/repos/github.com/Shougo/dein.vim'

if !isdirectory(s:dein_repo_dir)
  execute '!git clone https://github.com/Shougo/dein.vim' s:dein_repo_dir
endif

execute 'set runtimepath^=' . s:dein_repo_dir

if dein#load_state(s:dein_dir)
    call dein#begin(s:dein_dir)
    call dein#load_toml(s:toml, {'lazy': 0})
    call dein#end()
    call dein#save_state()
endif

if dein#check_install()
    call dein#install()
endif

filetype plugin indent on
syntax   enable

"----------------------------------------------------------
" For Neovim's Python2 provider
"----------------------------------------------------------

let g:python_host_prog = '/usr/local/bin/python'

Contents of dein.toml

[[plugins]]
repo        = 'Shougo/dein.vim'

[[plugins]]
repo        = 'ervandew/supertab'

[[plugins]]
description = 'F# support for Vim'
repo        = 'fsharp/vim-fsharp'
lazy        = 1
on_ft       = 'fsharp'
build       = 'make fsautocomplete'






Remove all ads