Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python not working with neodim #21

Closed
jmgonzalezro opened this issue Feb 23, 2023 · 7 comments
Closed

Python not working with neodim #21

jmgonzalezro opened this issue Feb 23, 2023 · 7 comments

Comments

@jmgonzalezro
Copy link

jmgonzalezro commented Feb 23, 2023

Hello. I have problems dimming objects in python.
Here is the behavior.
Python:

  • The first 'dimmed' atribute should be dimmed, the other one, since it's used should not. Both have the same colour. Also the function itself should be dimmed since it's never been used.
    imagen

lua:

  • 'b' is dimmed as expected, c is not since it's going to be used.
    imagen

here is my setup in plugins.lua

-- NeoDim
  use {
    "zbirenbaum/neodim",
    event = "LspAttach",
    config = function ()
      require("neodim").setup({
        alpha = 0.75,
        blend_color = "#000000",
        update_in_insert = {
          enable = true,
          delay = 100,
        },
        hide = {
          virtual_text = true,
          signs = true,
          underline = true,
        }
      })
    end
  }

Any suggestions or help?

@zbirenbaum
Copy link
Owner

Python is working fine for me at the moment, could you supply your pyright version?

@jmgonzalezro
Copy link
Author

$ pyright --version
pyright 1.1.295

$ pip show pyright
Name: pyright
Version: 1.1.295
Summary: Command line wrapper for pyright
Home-page: https://github.com/RobertCraigie/pyright-python
Author: Robert Craigie
Author-email:
License: MIT
Location: /usr/local/lib/python3.8/dist-packages
Requires: nodeenv

I'm using this @ mason.
imagen

@jmgonzalezro
Copy link
Author

Okey... seems like if I activate in mason pyright it starts dimming the not used parameters. So, in my understanding, pyright is mandatory.
I don't really know if it's possible to dim unused global functions. Also thank you for responding this fast.

@fecet
Copy link

fecet commented May 22, 2023

I'm using pylsp and neodim doesn't work for me. I used pyright before and it works perfectly, so I'm wondering if pyright is the only option for python to work with neodim?

@zbirenbaum
Copy link
Owner

I'm using pylsp and neodim doesn't work for me. I used pyright before and it works perfectly, so I'm wondering if pyright is the only option for python to work with neodim?

I don't use pylsp, could you provide a sample of their 'unused' diagnostic message so I can try to debug it?

@fecet
Copy link

fecet commented May 22, 2023

from typing import Union, List, Any


def a(b, c) -> Any:
    return b + 1

And the following is how it look likes in neovim:
image

@ayamir
Copy link

ayamir commented May 26, 2023

I'm using pylsp and neodim doesn't work for me. I used pyright before and it works perfectly, so I'm wondering if pyright is the only option for python to work with neodim?

I don't use pylsp, could you provide a sample of their 'unused' diagnostic message so I can try to debug it?

image

Neodim doesn't support pyflakes more concisely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants