startup.nvim icon indicating copy to clipboard operation
startup.nvim copied to clipboard

Use custom logo/header/theme

Open Carlosmape opened this issue 3 years ago • 1 comments

I am trying to use a custom header/logo. I want to make it "persistent", I mean: I use nvim with the same configuration in multiple (cross-platform) computers (personal one running linux and work one running windows). I often use my own nvim-config repository to keep both synced. As I can understand, to customize this plugin header/logo/theme or whatever, you MUST place it inside nvim binaries forlder (see these references: https://neovim.discourse.group/t/require-files-not-from-lua-folder/1823/9) to properly require it before from Lua... So what I am trying to do is (I have copied entire Dashboard theme to "nvim_config_folder/dashboard/custom.lua") and then adding this pattern to Lua's require one like suggested the link before:

--Startup configuration, custom Dashboard
local dashboard_path = vim.fn.stdpath 'config' .. '/?.lua;'
package.path = dashboard_path .. package.path
require("startup").setup({require("dashboard.custom")})

But it throws the next error when nvim opens: imagen

I think the error comes due to change this "require" pattern

It would be a nice idea to have a function/variable to configure it (without having to create/modify own theme or sample ones)

Carlosmape avatar Jul 18 '22 13:07 Carlosmape

I think, the readme of the repo, indicates to use a nvim structure like this one https://github.com/Blovio/NeoVim_Essentials I have tried but when try to do the require again (like in the picture) I am having the same Issue

Carlosmape avatar Jul 19 '22 14:07 Carlosmape

you have to put the dashboard/custom.lua file into the lua directory in your config folder

max397574 avatar Feb 12 '23 09:02 max397574

I missread something there

  1. why do you think you need to put it into "nvim binaries" folder. What should that even be? Never heard about anything like that. You just need to put it into the lua folder inside your config (read lua guide to understand lua modules)
  2. the errors seems like there is a problem in your custom theme. Can you send it?

max397574 avatar Feb 12 '23 10:02 max397574

I mean to have a lua file justo containing headers (to do not extend my "startup.lua" file too much. I finally solve ir by declaring headers directly un the configuration one

Carlosmape avatar Feb 20 '23 08:02 Carlosmape

so this issue is fixed?

max397574 avatar Feb 20 '23 08:02 max397574

Not fixed, but I think it could be closed. The solución un muy case was to define headers in the sale lua file as the config

Carlosmape avatar Feb 23 '23 06:02 Carlosmape