reasonml-editor / vim-reason-legacy Goto Github PK
View Code? Open in Web Editor NEWFallback Reason Vim editor integration
License: MIT License
Fallback Reason Vim editor integration
License: MIT License
When I install this plugin in NeoVim, I get the following error:
"src/main.re" [noeol] 65L, 1974C
function provider#python#Call[9]..remote#host#Require[10]..provider#pythonx#Require, line 15
Vim(if):ch 1 was closed by the client
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/cweber/Library/Python/2.7/lib/python/site-packages/neovim/__init__.py", line 11, in <module>
from .msgpack_rpc import (ErrorResponse, child_session, socket_session,
File "/Users/cweber/Library/Python/2.7/lib/python/site-packages/neovim/msgpack_rpc/__init__.py", line 8, in <module>
from .event_loop import EventLoop
File "/Users/cweber/Library/Python/2.7/lib/python/site-packages/neovim/msgpack_rpc/event_loop/__init__.py", line 12, in <module>
from .asyncio import AsyncioEventLoop
File "/Users/cweber/Library/Python/2.7/lib/python/site-packages/neovim/msgpack_rpc/event_loop/asyncio.py", line 22, in <module>
import trollius as asyncio
ImportError: No module named trollius
It's probably user error of some sort, but if this is the case, the docs could be updated to make it clearer?
I think there is a problem with indentation after lines with bucklescript annotations. For example, with the file (example from near the beginning of reason-react, src/ReactDOMRe.re):
external render : ReasonReact.reactElement => Dom.element => unit =
"render" [@@bs.val] [@@bs.module "react-dom"];
external _getElementsByClassName : string => array Dom.element =
"document.getElementsByClassName" [@@bs.val];
external _getElementById : string => option Dom.element =
"document.getElementById" [@@bs.val] [@@bs.return nullable];
If I go to the end of the first expression (after [@@bs.module "react-dom"];
), and insert a new line, the new line is automatically indented by 2 spaces. I think it should not be indented at all, unless we're in a block, surrounded by { }.
This may not sound like a big deal, but it is causing reformatting with vim-lsp
and ocaml-language-server
using the :LspDocumentFormat
command to indent lines following each expression with bucklescript annotations by an additional indentation level. So you wind up with some of these lines being 3 or 4 indentation levels deep when they should actually start at the beginning of the line, and do if you just run refmt --in-place
on the file from outside the editor. It winds up looking like this:
external render : ReasonReact.reactElement => Dom.element => unit =
"render" [@@bs.val] [@@bs.module "react-dom"];
external _getElementsByClassName : string => array Dom.element =
"document.getElementsByClassName" [@@bs.val];
external _getElementById : string => option Dom.element =
"document.getElementById" [@@bs.val] [@@bs.return nullable];
Moving indent/reason.vim
somewhere else makes things indent normally. Looks like an issue with the indent configuration.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.