Git Product home page Git Product logo

Comments (13)

olimorris avatar olimorris commented on September 26, 2024 2

As an FYI both, I've now added a onedark_vivid them as per this commit:

require("onedarkpro").setup {
  theme = "onedark_vivid",
}

from onedarkpro.nvim.

olimorris avatar olimorris commented on September 26, 2024 1

I've closed this and pinned it to the top of issues so it will stand out more to other users

from onedarkpro.nvim.

abayomi185 avatar abayomi185 commented on September 26, 2024 1

It seems that is the case. I did a bunch of testing and it does work but does not persist. I seemingly have to change :colorscheme back (to a different theme) and forth to see the custom setup, otherwise it defaults to the default setup values. It was hard to tell because quitting and relaunching Lunarvim didn't change the outcome, also TS-rainbow seems to get disabled.

Thanks again for your help. It's definitely related to my setup so I'll look to find a solution.

Config

Screenshot 2022-04-25 at 00 52 18

Outcome

Screenshot 2022-04-25 at 00 51 14

from onedarkpro.nvim.

abayomi185 avatar abayomi185 commented on September 26, 2024 1

I thought I'd put this here in case a search engine brings someone to this issue.

I solved it. It was more my misunderstanding of the structure of LunarVim's config files and Lua.

The setup needs to be added outside the scope of lvim.plugins to persist.

--[[
lvim is the global options object

Linters should be
filled in as strings with either
a global executable or a path to
an executable
]]
-- THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT

-- general
lvim.log.level = "warn"
lvim.format_on_save = true
-- lvim.colorscheme = "one"
-- lvim.colorscheme = "onedarker"
lvim.colorscheme = "onedarkpro"


-- Theme options
require("onedarkpro").setup {
  theme = "onedark",
  -- colors = {
  --   red = "#d1d1d1"
  -- },
  styles = {
    functions = "italic",
    keywords = "italic",
    virtual_text = "italic,underline",
  },
}

from onedarkpro.nvim.

mmirus avatar mmirus commented on September 26, 2024

Thank you!

from onedarkpro.nvim.

abayomi185 avatar abayomi185 commented on September 26, 2024

Hi @olimorris I'm fairly new to nvim and Lua and looking to change the color of "variables" (assigned) in my config and I'm not sure how. I've tried;

  { "olimorris/onedarkpro.nvim",
    config = function()
      require("onedarkpro").setup {
        theme = "onedark",
        colors = {
          red = "#97f4c9"
        },
      }
    end
  },

image

..but couldn't get it to work. What am I missing?

from onedarkpro.nvim.

olimorris avatar olimorris commented on September 26, 2024

..but couldn't get it to work. What am I missing?

Have you tried this at the end of your config:

onedarkpro.load()

from onedarkpro.nvim.

abayomi185 avatar abayomi185 commented on September 26, 2024

I'm using Lunarvim and I believe it loads the plugin. It also shows that it is installed in PackerStatus.

I have also tried to add the function call in my config;

Screenshot 2022-04-23 at 20 48 57

It unfortunately still doesn't change the red variable colour in my code.

from onedarkpro.nvim.

olimorris avatar olimorris commented on September 26, 2024

Hmmmm. Seems strange. Have you tried adding @mmirus config specifically like below:

local onedarkpro = require('onedarkpro')
onedarkpro.setup({
theme = "onedark",
colors = {
onedark = {
-- Vivid colors from https://github.com/Binaryify/OneDark-Pro
red = "#ef596f",
green = "#89ca78",
cyan = "#2bbac5",
purple = "#d55fde",
},
}

If you nest a onedark table within the colors table. That shouldn't actually make a difference but good to rule it out.

Otherwise, I suspect another theme or option is overwriting the TSVariable highlight group (assuming you're using Treesitter). What does :hi TSVariable show?

from onedarkpro.nvim.

abayomi185 avatar abayomi185 commented on September 26, 2024

Nesting onedark does not change the colors.

I am using Treesitter, :hi TSVariable shows TSVariable xxx guifg=#e06c75. This is using mmirus’ config.

I also tried disabling all other additional plugins to no avail.

I’ll keep trying to sort it out, I now have a better understanding of how Treesitter works. Thank you!

from onedarkpro.nvim.

olimorris avatar olimorris commented on September 26, 2024

I'm at a loss to explain it other than there must be something, somewhere in your config which is not applying the change. Are you sure LunarVim is definately applying the theme?

I've just tried it in my config and this is the outcome:

Config

Screen Shot 2022-04-24 at 22 27 58@2x

Outcome

Screen Shot 2022-04-24 at 22 28 25@2x

from onedarkpro.nvim.

mmirus avatar mmirus commented on September 26, 2024

Very cool--thank you! I was able to replace my vivid overrides with dark_theme = "onedark_vivid" and my remaining onedark overrides (unrelated to making things more vivid) kept working.

It may be counterintuitive, but I may go back to the darkened versions of the virtual text. 2f931d2#diff-708b067690c963ab0c5a4dec1eb8f6c0e1f7cda3a447538280b3bde6cd7ffb47 I kind of like having the diagnostic info fade into the background a bit--readable when I need it, but not competing with the code for attention.

I can see other people wanting the opposite, though: "If there's a diagnostic, I want it to be yelling for attention so I deal with it right away."

from onedarkpro.nvim.

olimorris avatar olimorris commented on September 26, 2024

Awesome! Still a little bit of work I need to do on the internal API to add new themes but mostly there

from onedarkpro.nvim.

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.