Ale: Question: How to configure ALE with YouCompleteMe on a javascript project?

Created on 25 Oct 2018  路  8Comments  路  Source: dense-analysis/ale

Hi,

Apologies if I am wasting this space with a question. But I did some research and I am still confused. I would like to have ycm for the auto-completion etc... but I also would like to be able to run eslint on my javascript project? Is that possible, can those two plugins co-exist?

Right now ycm is running all the diagnostics through TSServer. Not sure if there is a possibility for plugging eslint in that workflow. I am getting on the fly diagnostics with ycm but it would be nice to make sure that it is all done through eslint.

Thanks.

Most helpful comment

Just reporting back on this, if someone is interested:

  • The ALE autocompletion is already disabled by default.
  • I have let ycm run but disabled the primary diagnostics options and the secondary ones as well
    This effectively turns of the linting and syntax checking provided by ycm but the autocompletion keeps working.

So with these settings, both plugins seem to be able to co-exist with no issues so far. Will update this topic if I come across issues.

All 8 comments

Doesn't ALE do completion via TSServer without ycm required? Why would you need it for typescript?

You have a fair point.

I was trying to find the optimum solution here. Since I have ycm already auto-completing Python and other C languages, I was curious to know if I can keep ycm for auto-completion etc. But use ale for linting.

If ycm works already, I'm pretty sure you can disable completion in ALE and just let YCM handle it.

And I guess, I will need to disable the diagnostics in ycm (the errors, warnings etc.) so that ALE can take over. I can see there is no elegant way to do this, but to tweak the overlapping bits of both plugins so they do not interfere with each other.

Or disable ycm entirely for javascript projects and let ALE through. Thanks.

I am still open to suggestions if there are people who experienced both plugins.
:)

Just reporting back on this, if someone is interested:

  • The ALE autocompletion is already disabled by default.
  • I have let ycm run but disabled the primary diagnostics options and the secondary ones as well
    This effectively turns of the linting and syntax checking provided by ycm but the autocompletion keeps working.

So with these settings, both plugins seem to be able to co-exist with no issues so far. Will update this topic if I come across issues.

Curious here -- can (and does) ALE use TSServer to complete Javascript? I know that TSServer will gladly consume a Javascript project; I've had success using a LSP wrapper around TSServer + LanguageClient-neovim for completions using this.

You should be able to do that if you use the allowJs setting for tsserver.

I wanted to do exactly this, but I could not for the life of me get TSServer to pay attention the JSDoc informaiton.

Being able to complete methods on parameters is a big deal, so I ended up back on YouCompleteMe with the legacy TernJS completion enabled. This works a treat and starts up faster than TSServer.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

trevordmiller picture trevordmiller  路  3Comments

lervag picture lervag  路  3Comments

aressler38 picture aressler38  路  3Comments

glepnir picture glepnir  路  3Comments

janhellmich picture janhellmich  路  3Comments