Code Monkey home page Code Monkey logo

Comments (6)

benewberg avatar benewberg commented on July 26, 2024 1

Please excuse me further commenting on a closed issue, but the only way I've been able to make the color overrides work (using the colors from the colorscheme as opposed to the hexadecimal colors) is to do the following:

local colors = require('ayu.colors')
colors.generate(true)  -- this is where the "fix" is; true because I want mirage
require('ayu').setup({
  mirage = true,
  overrides = {
    TSInclude = {fg = colors.tag},
    IncSearch = {fg = '#FFFFFF'}
  }
})
require('ayu').colorscheme()

The colors.generate gets called in the call to colorscheme(), but I can't call that before the setup() otherwise it won't honor the overrides. Thus this is the other option:

require('ayu').colorscheme()  -- call before and after the setup
local colors = require('ayu.colors')
require('ayu').setup({
  mirage = true,
  overrides = {
    TSInclude = {fg = colors.tag},
    IncSearch = {fg = '#FFFFFF'}
  }
})
require('ayu').colorscheme()

Perhaps I am doing something incorrect, which necessitates the above?

from neovim-ayu.

Shatur avatar Shatur commented on July 26, 2024 1

@benewberg you are right,you need to call generate first. I will add this to readme.

from neovim-ayu.

Shatur avatar Shatur commented on July 26, 2024

Thanks, now should work, I just made a typo :)

from neovim-ayu.

LoveSponge avatar LoveSponge commented on July 26, 2024

Overriding still seems to not be working if the variable wasn't declared before?
I'm trying to override TreeSitter faces:

require('ayu').setup({
  mirage = true,
  overrides = {
    TSInclude = { fg = colors.tag },
    IncSearch = {fg = '#FFFFFF'}
  }
})

IncSearch seems to work, but not TSInclude...

from neovim-ayu.

Shatur avatar Shatur commented on July 26, 2024

Overriding still seems to not be working if the variable wasn't declared before?

It works, you can specify new values. Just tested, the new TSInclude appears. Try debugging using so $VIMRUNTIME/syntax/hitest.vim.

from neovim-ayu.

LoveSponge avatar LoveSponge commented on July 26, 2024

@benewberg - confirmed putting this line applies the desired colours.

from neovim-ayu.

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.