update nvchad config to v2.5
This commit is contained in:
parent
df374efd22
commit
7ddbecbda0
23 changed files with 384 additions and 260 deletions
37
home/private_dot_config/nvim/lua/options.lua
Normal file
37
home/private_dot_config/nvim/lua/options.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
require "nvchad.options"
|
||||
|
||||
-- add yours here!
|
||||
|
||||
-- auto dark mode theme
|
||||
-- (if you use this don't use the theme toggle in the editor, it may break the function)
|
||||
|
||||
-- "darkman get" result to decide which color_scheme to use.
|
||||
-- if it's not installed/command error, fallback to dark scheme
|
||||
local ok, result = pcall(function()
|
||||
return vim.system({"darkman", "get"}, { text = true }):wait().stdout
|
||||
end)
|
||||
|
||||
local color_scheme
|
||||
|
||||
if ok then
|
||||
color_scheme = result
|
||||
else
|
||||
-- Fallback value in case of error
|
||||
color_scheme = "dark"
|
||||
end
|
||||
|
||||
-- set theme!
|
||||
-- hooray, nvchad new version supports to set theme manually!
|
||||
if string.find(color_scheme,"dark") then
|
||||
require("nvconfig").base46.theme = 'nord'
|
||||
require("base46").load_all_highlights()
|
||||
elseif string.find(color_scheme,"light") then
|
||||
require("nvconfig").base46.theme = 'onenord_light'
|
||||
require("base46").load_all_highlights()
|
||||
else
|
||||
require("nvconfig").base46.theme = 'doomchad'
|
||||
require("base46").load_all_highlights()
|
||||
end
|
||||
|
||||
-- local o = vim.o
|
||||
-- o.cursorlineopt ='both' -- to enable cursorline!
|
Loading…
Add table
Add a link
Reference in a new issue