alpha2phi / modern-neovim

Crafting a modernized development environment with Neovim.
MIT License
140 stars 41 forks source link

Strange python highlighting and cosmetics #27

Closed windowsrefund closed 1 year ago

windowsrefund commented 1 year ago

Hello. Active medium reader here who is enjoying my time exploring your content. I'm hoping you might help me understand what I'm seeing when I work with some python code using a fresh install of this disto.

import requests

DEFAULT_URL = "https://xkcd.com/1906"

def get_url(url=DEFAULT_URL):
    return requests.get(url).status_code

When I place my cursor on the 'def' or 'return' key word, I see this odd highlight activity which I do not understand?

Screenshot_2023-06-21_00-14-59

I can reproduce this with any color scheme so I tend to think this may be a feature I don't grok rather than a mere cosmetic.

Also, what's going on with the light bulb that we see to the left? I recall using nvim-lightbulb in a previous life but that plugin isn't installed here. The bulb follows my cursor from line to line so I'm guessing it behaves like the plugin I've mentioned which means it would be trying to tell me 1 or more code actions is available. Entertaining this idea, I do see ruff is offering 2 code actions:

[1] Ruff: Organize Imports [2] Ruff: Fix all

However, neither option is actually doing anything and I'm sure you'd agree, there's nothing to "organize" to begin with. I'm guessing ruff is generating a false-positive which in turn spawns the bulb?

mengwangk commented 1 year ago

The highlight feature is from vim-matchup

The lightbulb comes from Lspsaga

The ruff lsp issue is fixed

windowsrefund commented 1 year ago

Thank you. Looks like the ruff no-op situation is being discussed here.