feat(colorscheme): change colorscheme to onedark
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
-- https://github.com/bluz71/vim-moonfly-colors
|
||||
|
||||
---@type LazyPluginSpec
|
||||
return {
|
||||
"bluz71/vim-moonfly-colors",
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
name = "moonfly",
|
||||
init = function()
|
||||
vim.g.moonflyNormalFloat = true
|
||||
vim.g.moonflyCursorColor = true
|
||||
vim.g.moonflyWinSeparator = 2
|
||||
vim.g.moonflyVirtualTextColor = true
|
||||
end,
|
||||
config = function()
|
||||
vim.cmd.colorscheme("moonfly")
|
||||
end,
|
||||
}
|
||||
@@ -1,51 +1,24 @@
|
||||
local function find_link_source(name)
|
||||
local hl = vim.api.nvim_get_hl(0, { name = "NvimTreeFileIcon" })
|
||||
while hl.link do
|
||||
hl = vim.api.nvim_get_hl(0, { name = hl.link })
|
||||
end
|
||||
|
||||
return hl
|
||||
end
|
||||
|
||||
local function override_highlights()
|
||||
-- Git
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeGitDeletedIcon MoonflyTurquoise",
|
||||
bang = true,
|
||||
})
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeGitDirtyIcon MoonflyTurquoise",
|
||||
bang = true,
|
||||
})
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeGitIgnoredIcon Comment",
|
||||
bang = true,
|
||||
})
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeGitMergeIcon MoonflyCrimson",
|
||||
bang = true,
|
||||
})
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeGitNewIcon MoonflyOrchid",
|
||||
bang = true,
|
||||
})
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeGitRenamedIcon MoonflyTurquoise",
|
||||
bang = true,
|
||||
})
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeGitStagedIcon MoonflyGreen",
|
||||
bang = true,
|
||||
})
|
||||
-- File Icon
|
||||
local hl = find_link_source("NvimTreeFileIcon")
|
||||
vim.api.nvim_set_hl(0, "NvimTreeFileIcon", { fg = hl.fg, bg = nil })
|
||||
|
||||
-- Bookmarks
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeBookmarkHL MoonflyYellowLineActive",
|
||||
bang = true,
|
||||
})
|
||||
|
||||
-- Clipboard
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeCutHL MoonflyRedLineActive",
|
||||
bang = true,
|
||||
})
|
||||
|
||||
-- Modified
|
||||
vim.cmd.highlight({
|
||||
"link NvimTreeModifiedIcon MoonflyTurquoise",
|
||||
bang = true,
|
||||
})
|
||||
-- Symlink Icon
|
||||
hl = find_link_source("NvimTreeSymlinkIcon")
|
||||
vim.api.nvim_set_hl(
|
||||
0,
|
||||
"NvimTreeSymlinkIcon",
|
||||
{ fg = hl.fg, bg = nil }
|
||||
)
|
||||
end
|
||||
|
||||
local function disable_highlights()
|
||||
@@ -127,8 +100,6 @@ return {
|
||||
end
|
||||
end
|
||||
|
||||
override_highlights()
|
||||
|
||||
local signs = require("ow.lsp").diagnostic_signs
|
||||
require("nvim-tree").setup({
|
||||
on_attach = function(bufnr)
|
||||
@@ -280,6 +251,7 @@ return {
|
||||
},
|
||||
})
|
||||
|
||||
override_highlights()
|
||||
disable_highlights()
|
||||
|
||||
require("nvim-tree.api").tree.toggle({
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
---@type LazyPluginSpec
|
||||
return {
|
||||
"navarasu/onedark.nvim",
|
||||
-- enabled = false,
|
||||
priority = 1000, -- make sure to load this before all the other start plugins
|
||||
config = function()
|
||||
local c = require("onedark.palette").dark
|
||||
local opts = {
|
||||
style = "dark",
|
||||
highlights = {
|
||||
NormalFloat = { bg = c.bg0 },
|
||||
FloatBorder = { bg = c.bg0 },
|
||||
TabLineSel = { fg = c.fg, bg = c.bg0 }
|
||||
},
|
||||
}
|
||||
require("onedark").setup(opts)
|
||||
-- Enable theme
|
||||
require("onedark").load()
|
||||
end,
|
||||
}
|
||||
Reference in New Issue
Block a user