Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on startup regarding nvim_get_hl() #6

Closed
BenjaminHor opened this issue Oct 10, 2023 · 4 comments
Closed

Error on startup regarding nvim_get_hl() #6

BenjaminHor opened this issue Oct 10, 2023 · 4 comments

Comments

@BenjaminHor
Copy link

BenjaminHor commented Oct 10, 2023

I'm getting the following error when trying to run the plugin using nvim leetcode.nvim.

Failed to run `config` for leetcode.nvim
...in/.local/share/nvim/lazy/leetcode.nvim/lua/leetcode.lua:28: attempt to call field 'nvim_get_hl' (a nil value)
# stacktrace:
  - /leetcode.nvim/lua/leetcode.lua:28 _in_ **setup_highlights**
  - /leetcode.nvim/lua/leetcode.lua:59 _in_ **start**
  - /leetcode.nvim/lua/leetcode.lua:68 _in_ **setup**
  - ~/.config/nvim/lua/config/lazy.lua:12

This is my lazy config for the plugin

return {
	"kawre/leetcode.nvim",
	build = ":TSUpdate html",
	dependencies = {
		"nvim-treesitter/nvim-treesitter",
		"nvim-telescope/telescope.nvim",
		"nvim-lua/plenary.nvim", -- required by telescope
		"MunifTanjim/nui.nvim",

		-- optional
		"nvim-tree/nvim-web-devicons",

		-- recommended
		-- "rcarriga/nvim-notify",
	},
	opts = {
		-- configuration goes here
	},
}

@kawre
Copy link
Owner

kawre commented Oct 10, 2023

What version of neovim are you using

@BenjaminHor
Copy link
Author

What version of neovim are you using

NVIM v0.8.1
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

@BenjaminHor
Copy link
Author

I updated to v0.9.2 and the issue is no longer there.

@kawre
Copy link
Owner

kawre commented Oct 10, 2023

Yep, nvim_get_hl() is present since version 0.9.0. Thank you for opening an issue, gotta include that in the README.

@kawre kawre closed this as completed Oct 10, 2023
kawre added a commit that referenced this issue Oct 10, 2023
kawre added a commit that referenced this issue Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants