Git Product home page Git Product logo

Comments (16)

Steven0351 avatar Steven0351 commented on July 21, 2024 2

I think for LunarVim the following works for me, can you try this @Steven0351?

lvim.colorscheme = "onenord"

lvim.plugins = {
  {
    "rmehri01/onenord.nvim",
    config = function()
      -- your config here
    end,
  }
}

That is what i've been trying, for whatever reason it's keeping the defaults:

lvim.colorscheme = "onenord"

lvim.plugins = {
    { 
      "rmehri01/onenord.nvim",
      config = function()
        local colors = require"onenord.colors"
        require"onenord".setup({
          custom_highlights = {
            TSNamespace = { fg = colors.dark_blue },
          },
        })
      end
    },
}

Screen Shot 2021-11-25 at 11 50 10 AM

I don't really think it's a problem with onenord since I was able to get it working briefly, though I do appreciate your fast response.

Steps for me to actually get it working goes like this:
1.) Start up normally
2.) Set colorscheme to nil
3.) Add vim.cmd [[colorscheme onenord]]
4.) Save config.lua
4.) Profit

Screen Shot 2021-11-25 at 11 57 59 AM

Screen Shot 2021-11-25 at 11 58 07 AM

from onenord.nvim.

rmehri01 avatar rmehri01 commented on July 21, 2024 2

Alright, I'll close this then. Thanks for testing it out!

from onenord.nvim.

rmehri01 avatar rmehri01 commented on July 21, 2024 1

No problem! Oh I see, yeah in LunarVim when I do :colorscheme onenord then it loads the config but when I restart it doesn't keep them.

Actually this might be a problem with onenord since I tried out a few themes such as doom-nvim and nightfox.nvim and they seem to both change on config save and preserve the changes when restarting. I'll look into it tonight and hopefully find a fix soon!

from onenord.nvim.

Steven0351 avatar Steven0351 commented on July 21, 2024 1

While the root cause is being figured out I found this to be a decent solution to the issue without having to manually toggle colorscheme on each change or startup:

{
    "rmehri01/onenord.nvim",
    config = function()
      local colors = require("onenord.colors")

      require("onenord").setup({
        custom_highlights = {
          TSNamespace = { fg = colors.purple },
        },
      })

      if lvim.colorscheme == "onenord" then
        vim.cmd [[colorscheme onenord]]
      end
    end
},

from onenord.nvim.

Steven0351 avatar Steven0351 commented on July 21, 2024 1

Alright I think I fixed the issue, it seemed to be something weird with caching on require. Can you confirm if it works regularly for you now @Steven0351?

Looks to be working as expected for me!

from onenord.nvim.

rmehri01 avatar rmehri01 commented on July 21, 2024

Hi, please refer to the configuration docs for how to override a highlight group: https://github.com/rmehri01/onenord.nvim#configuration.

If you are using tree sitter, then the group you are looking to override is TSTagDelimiter = { fg = onenord.dark_blue }.

from onenord.nvim.

jrafaaael avatar jrafaaael commented on July 21, 2024

@rmehri01 not working for me...

.config/nvim/lua/plugins/onenord.lua:

local colors = require("onenord.colors")

require("onenord").setup({
  borders = true, -- Split window borders
  italics = {
    comments = false, -- Italic comments
    strings = false, -- Italic strings
    keywords = false, -- Italic keywords
    functions = false, -- Italic functions
    variables = false, -- Italic variables
  },
  disable = {
    background = false, -- Disable setting the background color
    cursorline = false, -- Disable the cursorline
    eob_lines = true, -- Hide the end-of-buffer lines
  },
  custom_highlights = {
    TSTagDelimiter = { fg = colors.orange }
  }, -- Overwrite default highlight groups
})

.config/nvim/lua/plugins/init.lua:

require('plugins.plugins')
require("plugins.onenord")

Screenshot at 2021-11-08 14-49-08

As you can see, the keyword function and the HTML tags remain the same as the default values

from onenord.nvim.

rmehri01 avatar rmehri01 commented on July 21, 2024

That's strange since that block you posted above seems to work for me.

If none of the options are working, it may be a problem with your configuration. Are other plugins configured in this same way working as expected?

from onenord.nvim.

jrafaaael avatar jrafaaael commented on July 21, 2024

@rmehri01 yes. The rest of the plugins work normally

from onenord.nvim.

rmehri01 avatar rmehri01 commented on July 21, 2024

Hmm okay, I've been trying to reproduce this but I can't really get it. Do you have a small complete config where this issue happens so that I could try it?

Here are the examples I tried.

Before:

call plug#begin('~/.config/nvim/autoload/plugged')
    Plug 'rmehri01/onenord.nvim', { 'branch': 'main' }
        " Better Syntax Support
    Plug 'sheerun/vim-polyglot'
    " File Explorer
    Plug 'scrooloose/NERDTree'
    " Auto pairs for '(' '[' '{'
    Plug 'jiangmiao/auto-pairs'
call plug#end()

lua << EOF
local colors = require("onenord.colors")

require("onenord").setup({
  borders = true, -- Split window borders
  italics = {
    comments = true, -- Italic comments
    strings = true, -- Italic strings
    keywords = true, -- Italic keywords
    functions = true, -- Italic functions
    variables = true, -- Italic variables
  },
  disable = {
    background = false, -- Disable setting the background color
    cursorline = false, -- Disable the cursorline
    eob_lines = true, -- Hide the end-of-buffer lines
  },
  custom_highlights = {
  }, -- Overwrite default highlight groups
})
EOF

colorscheme onenord

Screen Shot 2021-11-08 at 3 51 54 PM

After changing and restarting:

call plug#begin('~/.config/nvim/autoload/plugged')
    Plug 'rmehri01/onenord.nvim', { 'branch': 'main' }
        " Better Syntax Support
    Plug 'sheerun/vim-polyglot'
    " File Explorer
    Plug 'scrooloose/NERDTree'
    " Auto pairs for '(' '[' '{'
    Plug 'jiangmiao/auto-pairs'
call plug#end()

lua << EOF
local colors = require("onenord.colors")

require("onenord").setup({
  borders = true, -- Split window borders
  italics = {
    comments = true, -- Italic comments
    strings = true, -- Italic strings
    keywords = true, -- Italic keywords
    functions = true, -- Italic functions
    variables = true, -- Italic variables
  },
  disable = {
    background = false, -- Disable setting the background color
    cursorline = false, -- Disable the cursorline
    eob_lines = true, -- Hide the end-of-buffer lines
  },
  custom_highlights = {
    Normal = { fg = colors.red }
  }, -- Overwrite default highlight groups
})
EOF

colorscheme onenord

Screen Shot 2021-11-08 at 3 53 10 PM

from onenord.nvim.

rmehri01 avatar rmehri01 commented on July 21, 2024

Do you have any updates on this @jrafaaael?

from onenord.nvim.

Steven0351 avatar Steven0351 commented on July 21, 2024

I had this same issue with LunarVim and my fix was to do the following in my config.lua:

vim.colorscheme = nil -- "onenord"
vim.cmd [[colorscheme onenord]]

From what I can tell, it seems like LunarVim is loading the colors before the config is applied 🤷‍♂️

After cleaning up my config and reloading, that no longer worked

from onenord.nvim.

rmehri01 avatar rmehri01 commented on July 21, 2024

I think for LunarVim the following works for me, can you try this @Steven0351?

lvim.colorscheme = "onenord"

lvim.plugins = {
  {
    "rmehri01/onenord.nvim",
    config = function()
      -- your config here
    end,
  }
}

from onenord.nvim.

rmehri01 avatar rmehri01 commented on July 21, 2024

Alright I think I fixed the issue, it seemed to be something weird with caching on require. Can you confirm if it works regularly for you now @Steven0351?

from onenord.nvim.

jrafaaael avatar jrafaaael commented on July 21, 2024

@rmehri01 Hey! I apologize for the late reply. Still not working for me :(

from onenord.nvim.

rmehri01 avatar rmehri01 commented on July 21, 2024

Hi, like I said, I can't see where this issue is coming from so do you have a small config I could try?

from onenord.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.