Coder Social home page Coder Social logo

Comments (8)

rgruyters avatar rgruyters commented on July 18, 2024 1

Thanks for the update and the great help. Eventually went for

require("rose-pine").setup({
      highlight_groups = {
        ["@field"] = { fg = 'text' },
        ["@attribute"] = { fg = 'subtle' },
      },
})

from neovim.

mvllow avatar mvllow commented on July 18, 2024

Sorry, could you elaborate on what exactly you'd like the result to be? Are you saying dataclasses should be different from name, age, etc.?

Screenshot 2024-01-05 alle 21 35 10

from neovim.

rgruyters avatar rgruyters commented on July 18, 2024

No, type str of name should be a different color as shown in your screenshot. I don't know why it doesn't show in my test. I have used the repro config, but it is not shown in my terminal.

Screenshot 2024-01-06 at 12 25 20

from neovim.

mvllow avatar mvllow commented on July 18, 2024

Ah, those must be from the language server. If you can provide the output of :Inspect on both the variable and the type I can offer more assistance. Iā€™m assuming those groups will start with @lsp

from neovim.

rgruyters avatar rgruyters commented on July 18, 2024

There is no @lsp when I view :Inspect.

variable:

Treesitter
  - @variable.python links to @variable python
  - @field.python links to @field python

type:

Treesitter
  - @variable.python links to @variable python
  - @type.python links to Type python
  - @type.builtin.python links to Type python

from neovim.

mvllow avatar mvllow commented on July 18, 2024

Gotcha, thanks for those. This is the same for other languages as well, we set types and fields to foam. Although not ideal, I think for now it's best to modify your personal config:

require("rose-pine").setup({
  highlight_groups = {
    ["@field.python"] = "iris" -- this can be any named palette value
  }
})

It's hard to not have fields be the same colour as some value because the value can be a type (foam), number (rose), string (gold), variable (text), etc.

from neovim.

rgruyters avatar rgruyters commented on July 18, 2024

Thanks, unfortunately your solution didn't work. (gives Lua errors)

This one works

require("rose-pine").setup({
  highlight_groups = {
    Type = { fg = "iris" },
  },
})

from neovim.

mvllow avatar mvllow commented on July 18, 2024

I updated my comment above, I was missing square brackets around the key. Glad you got it to work though :)

from neovim.

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.