Coder Social home page Coder Social logo

vim-reason-legacy's People

Contributors

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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vim-reason-legacy's Issues

Missing dependency 'trollius' in NeoVim

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?

[indent] Over-indentation creates weird interactions with LSP formatter

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.

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.