-
Notifications
You must be signed in to change notification settings - Fork 146
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
refactor: refactor setup() function, handle old configuration and update highlights #42
Conversation
@navarasu now this PR is ready to be merged |
Thanks @xeluxee for your valuable. contribution. I will pull this code and will check in my local with all cases. Also will update the doc and merge tomorrow. |
@navarasu I've just pushed a bugfix commit, please give another pull before checking |
I pulled it in local and verified. Legacy vim syntax works. But when I call lua option in the init.nvim, it is not enabling the scheme
|
We need to call |
@navarasu I don't agree, since Actually #28 can be solved only calling |
Fix #37
Changes introduced with this PR:
vim.g.onedark_config
, to make it accessible from vimscriptsetup()
: now it accepts an argument, a dictionary containing options. Note:setup()
only manages configuration, it doesn't load the colorscheme. To load the colorscheme you can:colo onedark
Example:
Of course it can be called without any argument:
require('onedark').setup()
, and the default configuration will be usedcolors/onedark.vim
->colors/onedark.lua
lua/onedark/config.lua
->lua/onedark/old_config.lua
, since this file is used to parse old configuration (if found it prints deprecation messages)bold
,underline
,undercurl
,italic
andreverse
options in favor offmt
, a string that is ready to be used in highlight command. Example:ErrorMsg = {fg = c.red, fmt = "bold,italic"}
. To see all the available attributes:h attr-list
or here (they are the same for cterm and gui)TSTitle
,TSURI
,TSTextReference
nvim-cmp
highlights to support new kind icon colorshop
highlightsTSOperator
is purple now, it looks better. I think we should consider colouringTSOperator
for other languages toocode_style
customization for various elements (comments, keywords, functions, strings and variables)Usage
NOTE: all configurations must be done before setting the colorscheme
Vimscript
Note: when using vimscript boolean values must be set with
v:true
andv:false
, not0
and1
Lua
Full config