Giter Site home page Giter Site logo

Comments (15)

dpetka2001 avatar dpetka2001 commented on June 8, 2024 1

Could you test the following

1. `mkdir ~/.config/lazytest`
2. `git clone https://github.com/LazyVim/starter ~/.config/lazytest`
3. `NVIM_APPNAME=lazytest nvim` and wait for the installation to complete
4. Restart Neovim with the command provided in step 3
5. While on dashboard, press `x` to open the `LazyExtras` and toggle `ui.mini-starter` on by pressing `x` again
6. Restart Neovim with command provided in step 3 and observe behavior

For cleanup after you finished testing

rm -rf ~/.config/lazytest
rm -rf ~/.local/share/lazytest
rm -rf ~/.local/state/lazytest
rm -rf ~/.cache/lazytest

I can't reproduce it with default LazyVim settings.

from lazyvim.

dpetka2001 avatar dpetka2001 commented on June 8, 2024 1

Cool. Plz delete that now, because i'm not sure if it gets merged. Maybe the maintainer will prefer another solution (i'm nowhere good as the maintainer and there's a chance i'm missing something else). I will keep this branch live until my PR gets merged or rejected. Pls keep an eye on the PR if you'd like to stay informed.

from lazyvim.

dpetka2001 avatar dpetka2001 commented on June 8, 2024

I was able to reproduce by passing a directory as file argument.

PS: even a regular file argument triggers it, not just directory.

from lazyvim.

nexxai avatar nexxai commented on June 8, 2024

Could you test the following

[steps]

So I did all this and can confirm it happens when opening a directory using something like NVIM_APPNAME=lazytest nvim . or opening a file with something like NVIM_APPNAME=lazytest nvim pint.json

from lazyvim.

dpetka2001 avatar dpetka2001 commented on June 8, 2024

@nexxai Could you try #3209 locally to see if it solves your issue?

from lazyvim.

nexxai avatar nexxai commented on June 8, 2024

What's the best way to do that? Same steps above but reference that specific commit?

from lazyvim.

dpetka2001 avatar dpetka2001 commented on June 8, 2024

Create a file ~/.config/nvim/lua/plugins/core.lua with following contents

return {
  {
    "dpetka2001/LazyVim", 
    branch = "fix/mini-starter", 
  }, 
}

Save the file and then open Lazy UI and press U to update.

from lazyvim.

nexxai avatar nexxai commented on June 8, 2024

Ok I feel like an idiot because I can see that branch on Github, but when I try to run the update, it fails. Do I need to enable any special flags to tell it that it's ok to load from the not-usual repo?

Screenshot 2024-05-17 at 5 36 02 PM

from lazyvim.

dpetka2001 avatar dpetka2001 commented on June 8, 2024

I just press C to check and then U to update.

from lazyvim.

nexxai avatar nexxai commented on June 8, 2024

Tried again with a fresh install using the steps above and it looks good. No more error on the folders and files I was having issues with before!

from lazyvim.

dpetka2001 avatar dpetka2001 commented on June 8, 2024

@nexxai I just pushed a new change. Would appreciate if you could test it whenever you have time.

from lazyvim.

echasnovski avatar echasnovski commented on June 8, 2024

The more robust solution looks to be testing if the current buffer comes from 'mini.starter' (vim.bo.filetype == 'starter'). Because if Neovim is opened with an explicit target, starter buffer is not shown, hence refresh() shows a message.

from lazyvim.

dpetka2001 avatar dpetka2001 commented on June 8, 2024

@echasnovski

I replaced the call to refresh with do VimResized, since from what i read in the comments of Ministarter.refresh it also gets updated then. Does this potentially incur some unwanted effects?

from lazyvim.

echasnovski avatar echasnovski commented on June 8, 2024

I replaced the call to refresh with do VimResized, since from what i read in the comments of Ministarter.refresh it also gets updated then. Does this potentially incur some unwanted effects?

  • It triggers all autocommands for VimResized event, from all plugins.
  • It does not express proper intent (refresh starter buffer) which is not robust because 'mini.starter' can change VimResized behavior without any compatibility (docs mentioning is more about being aware about current implementation, not that it will always stay this way; although it probably will).

from lazyvim.

dpetka2001 avatar dpetka2001 commented on June 8, 2024

Will take another go at it later tonight. Thanks for the explanation and suggestions. Really appreciate you taking the time to chime in.

from lazyvim.

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.