Giter Club home page Giter Club logo

Comments (9)

Young1783 avatar Young1783 commented on June 13, 2024 1

HI~ @marko-cerovac
After my test, your latest commit did work a bit and see the flash(from original highlight to your theme config) for less time. I think the async loading make this no perfect phenomenon.

I can add some code in my init.vim and work a bit for me.

colorscheme material
autocmd FileType Dashboard hi! link DashboardHeader Boolean

But it does not work for fist time into Dashboard.

BTW, what is async loading effects? If without async loading, will it take more time to startup?

from material.nvim.

Young1783 avatar Young1783 commented on June 13, 2024 1

After trying removing async code, it seems work perfectly even for the first time into dashboard.
And i don't need autocmd anymore. I can config any highlight as I want.
Try it!!!

from material.nvim.

Young1783 avatar Young1783 commented on June 13, 2024 1

You are so nice.Thanks a lot.

from material.nvim.

marko-cerovac avatar marko-cerovac commented on June 13, 2024

I'm currently trying to solve this and I've noticed something weird. Even when I prevent my colorscheme from setting Dashboard colors, I still can't configure highlights from init.vim

For some reason, dashboard just doesn't accept highlight commands from init.vim. It is possible that this is an issue with dashboard and not material.nvim. I'll keep working on this

from material.nvim.

Young1783 avatar Young1783 commented on June 13, 2024

From my phenomenon, I think it maybe the the async highlight thread cause this issue, because I can see dashboard with its own highlight for 0.5 second and then turn to material.nvim configuration.

However, I know too little about Lua and maybe one month later, I have time to dig in~~~
FYI, your work is so pretty that I can read codes more pleasantly!
Keep charming~~

from material.nvim.

marko-cerovac avatar marko-cerovac commented on June 13, 2024

Thanks, that means a lot!
I've just moved the dashboard highlights to load as soon as possible. Let me know if you can change the colors now. If you still can't set the highlights, that means it's probably not related to the async loading.

from material.nvim.

marko-cerovac avatar marko-cerovac commented on June 13, 2024

Ok, that's great. You have found the source of the problem and it does seem to be the async loading.
The async loading is used to improve the start-up time. The most important parts of NeoVim like the background, numbers, borders... get loaded first and the less important things like plugin highlights get loaded later. This speeds up the startup time a lot.
If you want, I can create a new branch which doesn't use async loading. You can then install from this new branch and everything should work fine. Does this solution seem okay to you?

from material.nvim.

Young1783 avatar Young1783 commented on June 13, 2024

You are so nice.Thanks a lot.

from material.nvim.

marko-cerovac avatar marko-cerovac commented on June 13, 2024

@Young1783 I've created the new branch. It is called no-async and it doesn't use any async loading. If you are using packer.nvim, you can install it using:

use {
       'marko-cerovac/material.nvim',
       branch = 'no-async'
}

or if you are using VimPlug:

Plug 'marko-cerovac/material.nvim', { 'branch' : 'no-async'}

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