Giter Club home page Giter Club logo

Comments (7)

Yazeed1s avatar Yazeed1s commented on June 22, 2024

Hey @jlaunay, I am not actually sure what you are doing, you definitely need to download the plugin using vim-plug or packer in order to use it.

from oh-lucy.nvim.

Yazeed1s avatar Yazeed1s commented on June 22, 2024

from oh-lucy.nvim.

jlaunay avatar jlaunay commented on June 22, 2024

Hey @jlaunay, I am not actually sure what you are doing, you definitely need to download the plugin using vim-plug or packer in order to use it.

Hi @Yazeed1s thanks for your answer and for this theme.
I'm using dein and have no problem with other themes.

In order to test with no plugin I'm using this minimal.vim config file

set rtp^=~/.local/share/nvim/dein/repos/github.com/Yazeed1s/oh-lucy.nvim/
set vif=NONE
filetype plugin indent on
syntax enable

And call with

nvim -Nu minimal.vim

Maybe I'm doing it wrong but I do not know what :/

from oh-lucy.nvim.

Yazeed1s avatar Yazeed1s commented on June 22, 2024

Hi @jlaunay, i never actually tested the plugin with dein, however the way you are calling the plugin is wrong. 'minimal' is actually my other theme, not this one. Try typing

nvim -Nu oh-lucy.nvim

and hopefully it will work. if not, let me know so i can reproduce the issue myself.

from oh-lucy.nvim.

jlaunay avatar jlaunay commented on June 22, 2024

minimal.vim is not the plugin I try to load, it's the minimal vimrc file I call with nvim -u option (the content of the file is above) in order to try the theme with no plugin.

I just tried with packer and only your plugin using the following init file (it use only packer, oh-lucy into a temp dir):

-- ignore default config and plugins
vim.opt.runtimepath:remove(vim.fn.expand("~/.config/nvim"))
vim.opt.packpath:remove(vim.fn.expand("~/.local/share/nvim/site"))

-- append test directory
local test_dir = "/tmp/nvim-config"
vim.opt.runtimepath:append(vim.fn.expand(test_dir))
vim.opt.packpath:append(vim.fn.expand(test_dir))

-- install packer
local install_path = test_dir .. "/pack/packer/start/packer.nvim"
local install_plugins = false

if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
	vim.cmd("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
	vim.cmd("packadd packer.nvim")
	install_plugins = true
end

local packer = require("packer")

packer.init({
	package_root = test_dir .. "/pack",
	compile_path = test_dir .. "/plugin/packer_compiled.lua",
})

packer.startup(function()
	local use = function(args)
		if type(args) == "string" then
			local plugin = args
			args = { plugin }
		end

		args.event = "User LoadPlugins"

		packer.use(args)
	end

	-- Install Packer
	packer.use("wbthomason/packer.nvim")

	-- Plugin to test
	use("Yazeed1s/oh-lucy.nvim")

	if install_plugins then
		packer.sync()
	else
		-- load plugins at your earliest convenience
		vim.defer_fn(function()
			vim.cmd("doautocmd User LoadPlugins")
		end, 1)
	end
end)

Calling nvim -u name_of_the_init_file_above.lua and exec :colorscheme oh-lucy switch the theme, this is not the problem.
But if I try to exec :echo g:colors_name instead of oh-lucy I get E121: Undefined variable: g:colors_name.

If you try :colorscheme darkblue (or any other builtin theme) :echo g:colors_name give the current colorscheme.

In the code this variable is defined here

I'm using this variable to restore any theme change at nvim startup.

Here is my nvim version

NVIM v0.8.0
Build type: Release
LuaJIT 2.1.0-beta3
Compilé par builduser

Features: +acl +iconv +tui

You do not reproduce the issue? Is the variable defined for you?
Thanks for your help !

from oh-lucy.nvim.

tan-wei avatar tan-wei commented on June 22, 2024

I met the same issue: After I use oh-lucy, then use :colorscheme to print the name of color scheme, it will show default instead of oh-lucy, which is not the truth.

from oh-lucy.nvim.

tan-wei avatar tan-wei commented on June 22, 2024

For most of color schemes in vim/neovim, g:colors_name is set to tell us which color scheme is used. It is important when we use randomized color schemes.

from oh-lucy.nvim.

Related Issues (9)

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.