{"id":13727501,"url":"https://github.com/reasonml-editor/vim-reason-plus","last_synced_at":"2025-05-07T22:31:17.884Z","repository":{"id":55615230,"uuid":"109751469","full_name":"reasonml-editor/vim-reason-plus","owner":"reasonml-editor","description":"Reason Vim editor integration","archived":false,"fork":false,"pushed_at":"2021-02-22T09:07:48.000Z","size":65,"stargazers_count":153,"open_issues_count":19,"forks_count":20,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-14T17:48:17.340Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reasonml-editor.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-06T21:22:06.000Z","updated_at":"2024-08-12T10:51:07.000Z","dependencies_parsed_at":"2022-08-15T04:31:19.224Z","dependency_job_id":null,"html_url":"https://github.com/reasonml-editor/vim-reason-plus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reasonml-editor%2Fvim-reason-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reasonml-editor%2Fvim-reason-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reasonml-editor%2Fvim-reason-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reasonml-editor%2Fvim-reason-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reasonml-editor","download_url":"https://codeload.github.com/reasonml-editor/vim-reason-plus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252965463,"owners_count":21832893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T01:04:02.516Z","updated_at":"2025-05-07T22:31:17.565Z","avatar_url":"https://github.com/reasonml-editor.png","language":"Vim script","funding_links":[],"categories":["Vim script"],"sub_categories":[],"readme":"# Vim/Neovim support for [Reason](http://reasonml.github.io)\n\nTo have the complete Vim/Neovim Reason experience, there are two plugins to install: this one, and the [language-server](https://github.com/jaredly/reason-language-server).\n\nThis one provides syntax highlight, snippets for Reason and allows related features to recognize the Reason syntax.\n\nLanguage-server provides all the others (autocompletion, type hint, jump-to-definition, etc.).\n\n## Prerequisite\n\nYou'll need either Vim with Python 3 support, or Neovim.\n\n## This Plugin's Installation\n\nIf you are using a plugin manager, add a line such as the following to your `.vimrc` (or `~/.config/nvim/init.vim` for neovim):\n\n```\n\" If using Vim-Plug (recommended. Install from https://github.com/junegunn/vim-plug)\nPlug 'reasonml-editor/vim-reason-plus'\n\n\" Or, using NeoBundle\nNeoBundle 'reasonml-editor/vim-reason-plus'\n\n\" Or, using Vundle\nPlugin 'reasonml-editor/vim-reason-plus'\n```\n\n## Language Server Installation\n\nSee https://github.com/jaredly/reason-language-server#vim for language-server installation and configuration.\n\nYou also need to install Vim/NeoVim's [Language Client](https://github.com/autozimu/LanguageClient-neovim). Please follow its [Quick Start](https://github.com/autozimu/LanguageClient-neovim#quick-start) for configurations.\n\nHere's a complete configuration in your `~/.vimrc` (or `~/.config/nvim/init.vim` for neovim), assuming you use the [vim-plug](https://github.com/junegunn/vim-plug) package manager.\n\n```viml\ncall plug#begin('~/.vim/plugged')\n\nPlug 'reasonml-editor/vim-reason-plus'\n\nPlug 'autozimu/LanguageClient-neovim', {\n    \\ 'branch': 'next',\n    \\ 'do': 'bash install.sh',\n    \\ }\n\n\" for neovim\nif has('nvim')\n  Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }\n\" for vim 8 with python\nelse\n  Plug 'Shougo/deoplete.nvim'\n  Plug 'roxma/nvim-yarp'\n  Plug 'roxma/vim-hug-neovim-rpc'\n  \" the path to python3 is obtained through executing `:echo exepath('python3')` in vim\n  let g:python3_host_prog = \"/absolute/path/to/python3\"\nendif\n\n\" nice to have\nPlug '/usr/local/opt/fzf' | Plug 'junegunn/fzf.vim'\n\ncall plug#end()\n\nlet g:LanguageClient_serverCommands = {\n    \\ 'reason': ['/absolute/path/to/reason-language-server.exe'],\n    \\ }\n\n\" enable autocomplete\nlet g:deoplete#enable_at_startup = 1\n```\n\nTo install those, do `:PlugClean`, `:PlugInstall`, `:PlugUpdate` then `:UpdateRemotePlugins` (for neovim). This may seem contrived, but folks often forget to properly setup their plugins, so we're not taking chances with the instructions here.\n\nReason-language-server currently only supports BuckleScript and OCaml 4.02.3 as compiler backends.\nFor native development using OCaml 4.03 or later, you should prefer [ocaml-language-server](https://github.com/freebroccolo/ocaml-language-server#installation-1).\n\n## Bonus Language Server Configuration\n\nPlease follow [LanguageClient-neovim's documentation on how to configure features](https://github.com/autozimu/LanguageClient-neovim/blob/dd45e31449511152f2127fe862d955237caa130f/doc/LanguageClient.txt#L199). Here's an example configuration:\n\n```\nnnoremap \u003csilent\u003e gd :call LanguageClient#textDocument_definition()\u003ccr\u003e\nnnoremap \u003csilent\u003e gf :call LanguageClient#textDocument_formatting()\u003ccr\u003e\nnnoremap \u003csilent\u003e \u003ccr\u003e :call LanguageClient#textDocument_hover()\u003ccr\u003e\n```\n\nNow, for example, triggering `gf` in normal mode would format the code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freasonml-editor%2Fvim-reason-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freasonml-editor%2Fvim-reason-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freasonml-editor%2Fvim-reason-plus/lists"}