Giter Site home page Giter Site logo

Comments (18)

pkout avatar pkout commented on June 3, 2024 4

For me, PyLint linting started working only once I had these settings in my coc-settings.json

{
    "python.analysis.diagnosticEnabled": true,
    "python.linting.enabled": true,
    "python.linting.pylintEnabled": true,
    "python.jediEnabled": false
}

from coc-python.

matteha avatar matteha commented on June 3, 2024

Relatedly, the linter only seems to work once files are :w in vim, is it possible to lint 'on the spot'?

Using flake8, see, it doesn't mention the top STOP unless I :w the file:

Screen Shot 2019-03-27 at 4 39 23 PM

from coc-python.

esn89 avatar esn89 commented on June 3, 2024

@matteha

I notice the same thing as well, I thought the linting was async and no :w was needed.

from coc-python.

chemzqm avatar chemzqm commented on June 3, 2024

MPLS requries saved file to run diagnostic, that's because VSCode always create file before edit.

from coc-python.

esn89 avatar esn89 commented on June 3, 2024

However, flake8/pylint is separate from MPLS though. Does that mean MPLS is blocking it?

from coc-python.

chemzqm avatar chemzqm commented on June 3, 2024

@esn89 When your're using MPLS, the linting is done by MPLS instead of flake8 & pylint.

from coc-python.

esn89 avatar esn89 commented on June 3, 2024

aaah, i see. so it gets "stolen" and there is no way to turn off MPLS linting?

from coc-python.

chemzqm avatar chemzqm commented on June 3, 2024

there is no way to turn off MPLS linting?

There're settings.

from coc-python.

lkhphuc avatar lkhphuc commented on June 3, 2024

I currently do not use Language server ("python.jediEnabled": true) but linter also only update when :w.
Did I miss anything?

from coc-python.

chemzqm avatar chemzqm commented on June 3, 2024

When you have "python.jediEnabled": false, MPLS is used instead of python files, so python.linting.enabled which only has affect when python files are enabled would not works.

To disable diagnostics of MPLS, you need use"python.analysis.diagnosticEnabled": false.

from coc-python.

avalonv avatar avalonv commented on June 3, 2024

@chemzqm so to clarify, if I'm using coc-python and I want linting to happen automatically, without having to write the buffer first, I need to add the following to my coc-settings.json:

    "python.analysis.diagnosticEnabled": false,
    "python.linting.enabled": true,
    "python.jediEnabled": true,

?

from coc-python.

Mikkolehtimaki avatar Mikkolehtimaki commented on June 3, 2024

So to clarify, there is no linting possible when MPLS is used? I have now

   "python.analysis.diagnosticEnabled": true,
    "python.linting.enabled": true,
    "python.jediEnabled": false

and I would like linting to happen without Jedi. Is that possible?

The setting python.enableLinting is "off" and I cannot enable it, it always stays "off".

from coc-python.

esn89 avatar esn89 commented on June 3, 2024

There is linting possible when MPLS is used, but not as-you-type. The only way is on save. Unless someone managed to get linting without saving, please tell me :D

from coc-python.

Mikkolehtimaki avatar Mikkolehtimaki commented on June 3, 2024

There is linting possible when MPLS is used, but not as-you-type. The only way is on save. Unless someone managed to get linting without saving, please tell me :D

I'd be happy to have it working even on saving. Could you share a working config?

from coc-python.

esn89 avatar esn89 commented on June 3, 2024

Sure thing:
https://pastebin.com/QyHrk5A7

from coc-python.

Mikkolehtimaki avatar Mikkolehtimaki commented on June 3, 2024

Thanks a bunch! I was missing some settings. Pylint now shows messages in location list, however it finds a considerably smaller amount of errors than ALE for example. With your settings I also got formatting on save working! Do you know if it is possible to have formatting messages also in the location list or side bar?

from coc-python.

esn89 avatar esn89 commented on June 3, 2024

Glad to hear that. The messages such as "Line char more than 80" will not appear on the side.
You can have a little font-icon by the gutter though, here's mine for example:

https://i.imgur.com/INBytwp.png

from coc-python.

avalonv avatar avalonv commented on June 3, 2024

@esn89
I still use coc-pyls which is deprecated but at least works as you type

from coc-python.

Related Issues (20)

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.