feat: introducing astronomy.nvim

new colorscheme!

added as a submodule, which will be pulled right where it needs to sit

updated the config to follow the changes

add colorscheme.lua to configurate
!!!BROKEN: this file uses script that are not yet committed
This commit is contained in:
David JULIEN 2021-10-22 22:40:18 +02:00
parent f0920db8df
commit b03369ba79
No known key found for this signature in database
GPG Key ID: 4B388E8BD9D47382
7 changed files with 32 additions and 12 deletions

View File

@ -0,0 +1,13 @@
-- Author : swytch
-- Created : Friday Oct. 22, 2021 22:07:41 CET
-- License : GPLv3
-- Description : colorscheme config file
local utils = require("utils")
local file = os.getenv("XDG_STATE_HOME") .. "/nvim_colorscheme"
local colorscheme = utils.lines_from(file)[0]
require("astronomy").setup {
variant = colorscheme,
}

View File

@ -8,33 +8,33 @@ local M = {}
vim.fn.sign_define( vim.fn.sign_define(
"DiagnosticSignError", "DiagnosticSignError",
{ {
texthl = "DiagnosticError", texthl = "DiagnosticVirtualTextError",
text = globals.sign_error, text = globals.sign_error,
numhl = "DiagnosticError" numhl = "DiagnosticSignError"
} }
) )
vim.fn.sign_define( vim.fn.sign_define(
"DiagnosticSignWarn", "DiagnosticSignWarn",
{ {
texthl = "DiagnosticWarn", texthl = "DiagnosticVirtualTextWarn",
text = globals.sign_warning, text = globals.sign_warning,
numhl = "DiagnosticWarn" numhl = "DiagnosticSignWarn"
} }
) )
vim.fn.sign_define( vim.fn.sign_define(
"DiagnosticSignHint", "DiagnosticSignHint",
{ {
texthl = "DiagnosticHint", texthl = "DiagnosticVirtualTextHint",
text = globals.sign_hint, text = globals.sign_hint,
numhl = "DiagnosticHint" numhl = "DiagnosticSignHint"
} }
) )
vim.fn.sign_define( vim.fn.sign_define(
"DiagnosticSignInfo", "DiagnosticSignInfo",
{ {
texthl = "DiagnosticInfo", texthl = "DiagnosticVirtualTextInfo",
text = globals.sign_info, text = globals.sign_info,
numhl = "DiagnosticInfo" numhl = "DiagnosticSignInfo"
} }
) )

View File

@ -23,3 +23,6 @@ utils.map("n", "<leader>lf", "<cmd>lua vim.lsp.buf.formatting()<CR>")
utils.map("n", "<leader>tf", "<cmd>Telescope find_files<CR>") utils.map("n", "<leader>tf", "<cmd>Telescope find_files<CR>")
utils.map("n", "<leader>tb", "<cmd>Telescope file_browser<CR>") utils.map("n", "<leader>tb", "<cmd>Telescope file_browser<CR>")
utils.map("n", "<leader>tl", "<cmd>Telescope live_grep<CR>") utils.map("n", "<leader>tl", "<cmd>Telescope live_grep<CR>")
-- colorscheme
utils.map("n", "<C-s>", "<cmd>lua require(\"astronomy\").toggle_variant()<CR>")

View File

@ -20,7 +20,7 @@ return require("packer").startup(function()
-- colorscheme -- colorscheme
use { use {
"~/.local/src/astronomy", "~/.local/src/astronomy.nvim",
config = function() require("colorscheme") end config = function() require("colorscheme") end
} }

View File

@ -148,17 +148,17 @@ local function statusline_focused()
process_diagnostics( process_diagnostics(
globals.sign_error .. " ", globals.sign_error .. " ",
diagnostics.errors, diagnostics.errors,
"%#DiagnosticError#" "%#DiagnosticVirtualTextError#"
), ),
process_diagnostics( process_diagnostics(
globals.sign_warning .. " ", globals.sign_warning .. " ",
diagnostics.warnings, diagnostics.warnings,
"%#DiagnosticWarn#" "%#DiagnosticVirtualTextWarn#"
), ),
process_diagnostics( process_diagnostics(
globals.sign_info .. " ", globals.sign_info .. " ",
diagnostics.info, diagnostics.info,
"%#DiagnosticInfo#" "%#DiagnosticVirtualTextInfo#"
) )
} }
) )

3
.gitmodules vendored
View File

@ -13,3 +13,6 @@
[submodule ".local/src/slock"] [submodule ".local/src/slock"]
path = .local/src/slock path = .local/src/slock
url = git@github.com:swy7ch/slock.git url = git@github.com:swy7ch/slock.git
[submodule ".local/src/astronomy.nvim"]
path = .local/src/astronomy.nvim
url = git@github.com:swy7ch/astronomy.nvim

@ -0,0 +1 @@
Subproject commit c329ff44d3aef42e8347563bf7ae119b5a2a2d70