Mofiqul / vscode.nvim

Neovim/Vim color scheme inspired by Dark+ and Light+ theme in Visual Studio Code
MIT License
695 stars 112 forks source link

python colors for constants and modules are not unique, and dont match VSCode's real colors #85

Open CyberMango opened 2 years ago

CyberMango commented 2 years ago

The color of imported modules in python is identical to the color of regular local variables. Also, the color for CONSTANTS is identical to the color of regular functions

example - left is neovim, right is VSCode image image

This issue isnt about being 100% identical to VSCode, but about having unique colors for constants and modules which is nice. I do have treesitter installed.

CyberMango commented 2 years ago

OK so digging into it i found that: 1) imported modules are treated with the hl group TSVariable which is why they have the same color as variables. I guess this is a TreeSitter problem that it does not give modules a new group (though they are technically just variables in python). Correct me if im wrong on this one.

2) Constants belong to TSConstant and are given vscYellow color by default. In VSCode the color for constants in python is #4fc1ff. CPP constants in VSCode are of the color vscBlue which looks better than yellow IMO.

to anyone interested this can be changed with: For all constants:

local vs_colors = require("vscode.colors")
require("vscode").setup({
    group_overrides = {
        TSConstant = { fg = vs_colors.vscBlue },
    },
})

Just for python colors:

if "vscode" == vim.g.colors_name then
    require("vscode").setup({
        group_overrides = {
            TSConstant = { fg = "#4fc1ff" },
        },
    })
end

Maintainers, please decide if you want to apply this change.

johannesrld commented 4 months ago

this seems to be fixed @CyberMango image