Compare commits

..

14 Commits

11 changed files with 151 additions and 62 deletions

View File

@ -1,31 +1,71 @@
# Colors (Gruvbox dark)
# Nightfox Alacritty Colors
## name: nightfox
## upstream: https://github.com/edeneast/nightfox.nvim/raw/main/extra/nightfox/alacritty.toml
# Default colors
[colors.primary]
# hard contrast background = = '#1d2021'
# background = '#282828'
# soft contrast background = = '#32302f'
background = '#292522'
foreground = '#ebdbb2'
background = "#2e3440" # changed
foreground = "#eceff4" # changed
dim_foreground = "#aeafb0"
bright_foreground = "#d6d6d7"
[colors.cursor]
text = "#cdcecf"
cursor = "#aeafb0"
[colors.vi_mode_cursor]
text = "#cdcecf"
cursor = "#63cdcf"
[colors.search.matches]
foreground = "#cdcecf"
background = "#3c5372"
[colors.search.focused_match]
foreground = "#cdcecf"
background = "#81b29a"
[colors.footer_bar]
foreground = "#cdcecf"
background = "#29394f"
[colors.hints.start]
foreground = "#cdcecf"
background = "#f4a261"
[colors.hints.end]
foreground = "#cdcecf"
background = "#29394f"
[colors.selection]
text = "#cdcecf"
background = "#2b3b51"
# Normal colors
[colors.normal]
black = '#282828'
red = '#cc241d'
green = '#98971a'
yellow = '#d79921'
blue = '#458588'
magenta = '#b16286'
cyan = '#689d6a'
white = '#a89984'
black = "#393b44"
red = "#c94f6d"
green = "#81b29a"
yellow = "#dbc074"
blue = "#719cd6"
magenta = "#9d79d6"
cyan = "#63cdcf"
white = "#dfdfe0"
# Bright colors
[colors.bright]
black = '#928374'
red = '#fb4934'
green = '#b8bb26'
yellow = '#fabd2f'
blue = '#83a598'
magenta = '#d3869b'
cyan = '#8ec07c'
white = '#ebdbb2'
black = "#575860"
red = "#d16983"
green = "#8ebaa4"
yellow = "#e0c989"
blue = "#86abdc"
magenta = "#baa1e2"
cyan = "#7ad5d6"
white = "#e4e4e5"
[colors.dim]
black = "#30323a"
red = "#ab435d"
green = "#6e9783"
yellow = "#baa363"
blue = "#6085b6"
magenta = "#8567b6"
cyan = "#54aeb0"
white = "#bebebe"

View File

@ -2,7 +2,7 @@
# author tonsky
[colors.primary]
background = '#F1F1F1' # changed
background = '#FFFFFF' # changed
foreground = '#434343'
[colors.cursor]

View File

@ -12,43 +12,45 @@
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
"gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" },
"global-note.nvim": { "branch": "main", "commit": "1e0d4bba425d971ed3ce40d182c574a25507115c" },
"go.nvim": { "branch": "master", "commit": "f058a8c622edf24d27b8ef82fabffdbbc1d55707" },
"godoc.nvim": { "branch": "main", "commit": "0163dd1f4695ef6bed8ad72336b96e08f31018a0" },
"go.nvim": { "branch": "master", "commit": "0d426e87227dd14584881ecc595c173121456111" },
"godoc.nvim": { "branch": "main", "commit": "356f79853dbb3b3e200064367603751895153c29" },
"guihua.lua": { "branch": "master", "commit": "d783191eaa75215beae0c80319fcce5e6b3beeda" },
"hardtime.nvim": { "branch": "main", "commit": "f87c86d1aa1e05dcf3c6ecd97fbfd237e2de0bf5" },
"hererocks": { "branch": "master", "commit": "c9c5444dea1e07e005484014a8231aa667be30b6" },
"hlsearch.nvim": { "branch": "main", "commit": "fdeb60b890d15d9194e8600042e5232ef8c29b0e" },
"incline.nvim": { "branch": "main", "commit": "0eb5b7f6fc6636a4e7b2eb2800b7650fd6d164a2" },
"incline.nvim": { "branch": "main", "commit": "27040695b3bbfcd3257669037bd008d1a892831d" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"iswap.nvim": { "branch": "master", "commit": "e02cc91f2a8feb5c5a595767d208c54b6e3258ec" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"leap.nvim": { "branch": "main", "commit": "346a16ef942635a8ca5ff92e603d07e7e8be6cbe" },
"lsp_signature.nvim": { "branch": "master", "commit": "c909a01eb923101c76a57fd2187835e9013ab59a" },
"lspsaga.nvim": { "branch": "main", "commit": "6063935cf68de9aa6dd79f8e1caf5df0a9385de3" },
"lsp_signature.nvim": { "branch": "master", "commit": "b58cca003d1d3311213d6db0352f58d8e57bfff0" },
"lspsaga.nvim": { "branch": "main", "commit": "778d56ff9b387dacd14ae648ed5604394b486f51" },
"marks.nvim": { "branch": "master", "commit": "bb25ae3f65f504379e3d08c8a02560b76eaf91e8" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "5639d58a3d11ff7c05c8e31e159bfedae55d7961" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "98767d37f8e5255a5111fc1e3163232d4dc07bda" },
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
"melange-nvim": { "branch": "master", "commit": "2db5407f2f6d6d6286f50f2f7365728d66f6f3ae" },
"mellifluous.nvim": { "branch": "v1", "commit": "1637e46585435ebda7963248e0e65422effad8d9" },
"mini.nvim": { "branch": "main", "commit": "0420076298c4457f200c2de468f65d080597a347" },
"nano-theme.nvim": { "branch": "main", "commit": "0b1158c4911f4bd9d5a1e2e7669ebff893435b64" },
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
"neogit": { "branch": "master", "commit": "333968f8222fda475d3e4545a9b15fe9912ca26a" },
"neogit": { "branch": "master", "commit": "6d1bd94f7fca92a50a892f494920696b5defa8c8" },
"nordic.nvim": { "branch": "main", "commit": "8627750ece357e9670f9e69853091f7fbb8d6523" },
"nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" },
"nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" },
"nvim-lspconfig": { "branch": "master", "commit": "fb733ac734249ccf293e5c8018981d4d8f59fa8f" },
"nvim-lspconfig": { "branch": "master", "commit": "0a1ac55d7d4ec2b2ed9616dfc5406791234d1d2b" },
"nvim-surround": { "branch": "main", "commit": "caf6f633d4d77a29b6e265b560c5a035d171a913" },
"nvim-treesitter": { "branch": "master", "commit": "e70cb73e943db7483b0ea86a55e80d471bcb995c" },
"nvim-treesitter": { "branch": "master", "commit": "aece1062335a9e856636f5da12d8a06c7615ce8a" },
"nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" },
"nvim-various-textobjs": { "branch": "main", "commit": "2788ce64fcfaa702ae3340180be592dfcd733c86" },
"nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" },
"oil.nvim": { "branch": "master", "commit": "ab887d926c2665a708fbe9e6c4654042cc5f4c60" },
"onenord.nvim": { "branch": "main", "commit": "af734ccc21847ce56830eed1f593ef320ffa27ff" },
"orgmode": { "branch": "master", "commit": "0ebe2e3c8a24137a86ac20b9f35c2a574a71035d" },
"onenord.nvim": { "branch": "main", "commit": "babdcc3da92f0c90703bb612a13a58e5f7669287" },
"orgmode": { "branch": "master", "commit": "145dce4d2f1bbaed5ff9e353822981b783627b32" },
"persisted.nvim": { "branch": "main", "commit": "b4b7a281307f8b52d47b0fd5b6798a453681d44e" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"quicker.nvim": { "branch": "master", "commit": "1798be71cdcb15fb84fa8054148a56e17fd391dc" },
"rabbit.nvim": { "branch": "master", "commit": "3a4ce048b8ecc48811d061220d0e86111adda20d" },
"rest.nvim": { "branch": "main", "commit": "2ded89dbda1fd3c1430685ffadf2df8beb28336d" },
"slimline.nvim": { "branch": "main", "commit": "326514876f6e5c051a7a2bf1e926659a74500016" },
"sqlite.lua": { "branch": "master", "commit": "50092d60feb242602d7578398c6eb53b4a8ffe7b" },
"tardis.nvim": { "branch": "main", "commit": "a6ee00a217529490e79d349b1f1a9cf5831180d3" },
@ -59,16 +61,16 @@
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"tmux.nvim": { "branch": "main", "commit": "2c1c3be0ef287073cef963f2aefa31a15c8b9cd8" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"tree-sitter-nu": { "branch": "main", "commit": "c10340b5bb3789f69182acf8f34c3d4fc24d2fe1" },
"tree-sitter-nu": { "branch": "main", "commit": "d5c71a10b4d1b02e38967b05f8de70e847448dd1" },
"tree-sitter-templ": { "branch": "master", "commit": "7f7f06b3931ca00e8ddfbeab3fc08ad00d297fad" },
"treesj": { "branch": "main", "commit": "48c1a7539f376fd40ceb9cf12d697040fcf90649" },
"treewalker.nvim": { "branch": "main", "commit": "b9e6520a08dc8e62891dcb759fce29f988e68da9" },
"treesj": { "branch": "main", "commit": "6c616638e3aa0087f2c267bb5990115b67105976" },
"treewalker.nvim": { "branch": "main", "commit": "43d3250007d2c5a2ed693c1edebf66d66af33407" },
"trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" },
"undotree": { "branch": "master", "commit": "b951b87b46c34356d44aa71886aecf9dd7f5788a" },
"vim-ReplaceWithRegister": { "branch": "master", "commit": "b82bf59e5387b57d0125afb94fd7984061031136" },
"vim-dadbod": { "branch": "master", "commit": "9f0ca8bcef704659820a95c3bbd2c262583a66a1" },
"vim-dadbod-completion": { "branch": "master", "commit": "a8dac0b3cf6132c80dc9b18bef36d4cf7a9e1fe6" },
"vim-dadbod-ui": { "branch": "master", "commit": "f4d37b7312ae6489e5c04bee654ca521baac188a" },
"vim-dadbod-ui": { "branch": "master", "commit": "685e75b34ee0e12f92ec4507ea8bb7f1aaa936e5" },
"vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" },
"vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" },
"whaler": { "branch": "main", "commit": "9e0b67e36250cb80e679563adcd4b7451eae26b2" },

View File

@ -113,10 +113,4 @@ vim.keymap.set("n", "<leader>ss", "<cmd>source ~/.config/nvim/after/plugin/luasn
-- colors
key('n', '<F6>', function()
if vim.o.background == "dark" then
vim.o.background = "light"
else
vim.o.background = "dark"
end
end)
key('n', '<F6>', function() require('lupan.utils').toggle_color_scheme() end, { desc = 'Toggle background' })

View File

@ -2,6 +2,12 @@ local M = {}
local filename = os.getenv('HOME') .. '/.config/alacritty/alacritty.toml'
local colorschemes = nil
function M.set_color_schemes(dark, light)
colorschemes = { dark = dark, light = light }
end
function M.terminalbg()
local ok, lines = pcall(io.lines, filename)
if ok then
@ -14,11 +20,29 @@ function M.terminalbg()
return "dark"
end
function M.update_color_scheme()
vim.o.background = M.terminalbg()
if colorschemes then
vim.cmd.colorscheme(colorschemes[vim.o.background])
end
end
function M.toggle_color_scheme()
if vim.o.background == "dark" then
vim.o.background = "light"
else
vim.o.background = "dark"
end
if colorschemes then
vim.cmd.colorscheme(colorschemes[vim.o.background])
end
end
local w = vim.uv.new_fs_event()
local function watch(fname)
w:start(filename, {}, vim.schedule_wrap(function(...)
vim.o.background = M.terminalbg()
M.update_color_scheme()
w:stop()
watch(fname)
end))

View File

@ -11,9 +11,23 @@ return {
},
{
"savq/melange-nvim",
},
{
'ronisbr/nano-theme.nvim',
config = function()
vim.o.background = require('lupan.utils').terminalbg()
vim.cmd.colorscheme('melange')
local nano = require('nano-theme.colors')
local nano_get = nano.get
function nano.get()
local t = nano_get()
local light = vim.o.background == 'light'
if not light then
t.nano_strong.fg = '#ECEFF4'
end
return t
end
require('lupan.utils').set_color_schemes('nano-theme', 'nano-theme')
require('lupan.utils').update_color_scheme()
end
},
{

View File

@ -2,6 +2,10 @@ return {
{
'folke/which-key.nvim',
event = 'VimEnter',
opts = {
preset = 'helix',
delay = 1000,
},
config = function(_, opts)
require('which-key').setup(opts)

View File

@ -21,16 +21,11 @@ return {
{
'inkarkat/vim-ReplaceWithRegister',
keys = {
{ '<leader>r', '<Plug>ReplaceWithRegisterOperator' },
{ '<leader>rr', '<Plug>ReplaceWithRegisterLine' },
{ '<leader>r', '<Plug>ReplaceWithRegisterVisual', mode = 'x' },
{ 'gp', '<Plug>ReplaceWithRegisterOperator' },
{ 'gpp', '<Plug>ReplaceWithRegisterLine' },
{ 'gp', '<Plug>ReplaceWithRegisterVisual', mode = 'x' },
},
},
{
"chrisgrieser/nvim-various-textobjs",
lazy = false,
opts = { keymaps = { useDefaults = true } },
},
{
'ggandor/leap.nvim',

View File

@ -0,0 +1,16 @@
return {
{
"rest-nvim/rest.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
opts.ensure_installed = opts.ensure_installed or {}
table.insert(opts.ensure_installed, "http")
end,
},
ft = 'http',
keys = {
{ '<leader>S', '<cmd>Rest run<CR>', ft = 'http' },
},
},
}

View File

@ -18,7 +18,7 @@ return {
harpoon = { switch = 'f' },
},
colors = {
file = '#5a418a',
file = '#EBCB8B',
},
},
keys = {

View File

@ -21,7 +21,7 @@ plug "MichaelAquilina/zsh-you-should-use"
plug "zsh-users/zsh-history-substring-search"
if which zoxide > /dev/null; then
eval "$(zoxide init --cmd cd zsh)"
eval "$(zoxide init zsh)"
else
plug "agkozak/zsh-z"
ZSHZ_ECHO=1