Giter VIP home page Giter VIP logo

vim-reason-plus's Introduction

Vim support for Reason/OCaml

Prerequisite

You'll need either Vim with Python 3 support, or Neovim. If you're on Vim with Python 2, please use our old plugin.

Features

This plugin simply uses our language server. Every feature is supported. Additionally, we provide the basics: snippets and syntax highlighting.

Installing

If you are using a plugin manager, add a line such as the following to your .vimrc:

" If using NeoBundle
NeoBundle 'reasonml-editor/vim-reason-plus'

" Or, if using Vundle
Bundle 'reasonml-editor/vim-reason-plus'

" Or, if using Vim-Plug
Plug 'reasonml-editor/vim-reason-plus'

You also need to install Vim/NeoVim's Language Client. Do follow its "Quick Start" section. The Reason configuration for that section is the following:

let g:LanguageClient_serverCommands = {
    \ 'reason': ['ocaml-language-server', '--stdio'],
    \ 'ocaml': ['ocaml-language-server', '--stdio'],
    \ }

If the Quick Start instructions didn't work, make sure you read the complete installation guide. It's probably a Python issue.

See its guide on calling the available features and assigning shortcuts to them, e.g. LanguageClient_textDocument_definition.

Configuration

Please follow LanguageClient-neovim's documentation on how to configure features. Here's an example configuration you'd put in .vimrc:

nnoremap <silent> gd :call LanguageClient_textDocument_definition()<cr>
nnoremap <silent> gf :call LanguageClient_textDocument_formatting()<cr>
nnoremap <silent> <cr> :call LanguageClient_textDocument_hover()<cr>

Triggering gf in normal mode would format the buffer.

LICENSE

Some files from vim-reason-plus are based on the Rust vim plugin and so we are including that license.

vim-reason-plus's People

Contributors

bassjacob avatar buzzdecafe avatar chenglou avatar disusered avatar jordwalke avatar miuirussia avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.