oni icon indicating copy to clipboard operation
oni copied to clipboard

Syntax / Compilation Errors feature doesn't work for JavaScript files

Open FranzFelberer opened this issue 8 years ago • 4 comments

Oni Version: 0.3.6 Neovim Version (Linux only): NVIM v0.3.1 Operating System: macOS High Sierra 10.13.6

Issue: As far as I understand the documentation the(https://github.com/onivim/oni/wiki/Features#syntax--compilation-errors) feature should auto of the box for javascript. (https://github.com/onivim/oni/wiki/Language-Support#javascript-and-typescript). Unfortunately it doesn't work for JavaScript in contrast to TypeScript.

Expected behavior: Syntax / Compilation Errors feature schnappschuss 2018-09-14 22 30 06

Actual behavior: schnappschuss 2018-09-14 22 30 25

Steps to reproduce:

  • create a JavaScript file with faulty code (.js)
  • copy the same code into a TypeScript file (tsx)

FranzFelberer avatar Sep 15 '18 07:09 FranzFelberer

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

oni-bot avatar Sep 15 '18 07:09 oni-bot

Confirmed, when opening the JS file I get the following:

image

Which relates to this line:

image

To clarify, I only get this error when opening the JS file after the TS file. Opening the JS file I get no error, but I still get no LSP hints, despite the LSP being connected.

CrossR avatar Sep 17 '18 09:09 CrossR

@CrossR @FranzFelberer we're currently getting quite a lot of issues from various languages related to the lsp #2448 #1926 to name a few, and whilst working on #1717 I've also noted that trying to integrate the latest version of that lsp doesn't actually work.

I think its quite likely that the language protocol has possibly shifted or since switching oni's version of typescript which houses the typescript server we're now seeing some changes to the expectations for the lsp or that we always had issues.

Either way I think in general our lsp functionality is on shaky ground the error @FranzFelberer points out however has been present for a quite a while which was one of the reasons I'm looking into #1717 but it seems to have just raised more issues/questions with the lsp integration as a whole

akinsho avatar Sep 17 '18 12:09 akinsho

Should also mention that split off from #1717 @bryphe suggested setting up some tests in #2246 to validate that our lsp manager is handling requests correctly, which might be a good place to setup some mock responses or maybe even startup an actual lsp and validate we handle responses correctly?

akinsho avatar Sep 17 '18 12:09 akinsho