rescript-lang / vim-rescript

MIT License
154 stars 15 forks source link

Rescript 9.1.1 update needed #34

Closed dusty-phillips closed 3 years ago

dusty-phillips commented 3 years ago

I'm playing with the Rescript 9.1.1 beta and getting a "Cannot find a nearby node_modules/bs-platform/darwin/bsc.exe. It's needed for formatting." error. I assume this is because the binaries have been moving around.

r17x commented 3 years ago

@dusty-phillips alternative solution

git clone https://github.com/rescript-lang/rescript-vscode ~/rescript-vscode
cd rescript-vscode
npm install
npm run compile 

Then, modify your lang-server for rescript. I'm using nvim-coc (coc-settings.json)

"languageserver": {
...
    "rescript": {
      "enable": true,
      "module": "~/rescript-vscode/server/out/server.js",
      "args": ["--node-ipc"],
      "filetypes": ["rescript"],
      "rootPatterns": ["bsconfig.json"]
    },
...
}

anyway this solution like https://github.com/rescript-lang/vim-rescript/issues/20#issuecomment-811984897

dusty-phillips commented 3 years ago

That works! I'll leave the issue open, since I assume vim-rescript will want to update it internally as well.

ryyppy commented 3 years ago

We also need to make sure that the plain vim functionality detects the package correctly. Fortunately we already got #35 going. Will review this and release a new version later today / tomorrow.

ryyppy commented 3 years ago

Done.