diff --git a/.config/nvim/lua/colorscheme.lua b/.config/nvim/lua/colorscheme.lua new file mode 100644 index 0000000..83dfddd --- /dev/null +++ b/.config/nvim/lua/colorscheme.lua @@ -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, +} diff --git a/.config/nvim/lua/lsp/init.lua b/.config/nvim/lua/lsp/init.lua index 8d12035..6632694 100644 --- a/.config/nvim/lua/lsp/init.lua +++ b/.config/nvim/lua/lsp/init.lua @@ -8,33 +8,33 @@ local M = {} vim.fn.sign_define( "DiagnosticSignError", { - texthl = "DiagnosticError", + texthl = "DiagnosticVirtualTextError", text = globals.sign_error, - numhl = "DiagnosticError" + numhl = "DiagnosticSignError" } ) vim.fn.sign_define( "DiagnosticSignWarn", { - texthl = "DiagnosticWarn", + texthl = "DiagnosticVirtualTextWarn", text = globals.sign_warning, - numhl = "DiagnosticWarn" + numhl = "DiagnosticSignWarn" } ) vim.fn.sign_define( "DiagnosticSignHint", { - texthl = "DiagnosticHint", + texthl = "DiagnosticVirtualTextHint", text = globals.sign_hint, - numhl = "DiagnosticHint" + numhl = "DiagnosticSignHint" } ) vim.fn.sign_define( "DiagnosticSignInfo", { - texthl = "DiagnosticInfo", + texthl = "DiagnosticVirtualTextInfo", text = globals.sign_info, - numhl = "DiagnosticInfo" + numhl = "DiagnosticSignInfo" } ) diff --git a/.config/nvim/lua/maps.lua b/.config/nvim/lua/maps.lua index 60f45a5..ee37983 100644 --- a/.config/nvim/lua/maps.lua +++ b/.config/nvim/lua/maps.lua @@ -23,3 +23,6 @@ utils.map("n", "lf", "lua vim.lsp.buf.formatting()") utils.map("n", "tf", "Telescope find_files") utils.map("n", "tb", "Telescope file_browser") utils.map("n", "tl", "Telescope live_grep") + +-- colorscheme +utils.map("n", "", "lua require(\"astronomy\").toggle_variant()") diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index e4b9fb3..6ee4b19 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -20,7 +20,7 @@ return require("packer").startup(function() -- colorscheme use { - "~/.local/src/astronomy", + "~/.local/src/astronomy.nvim", config = function() require("colorscheme") end } diff --git a/.config/nvim/lua/statusline.lua b/.config/nvim/lua/statusline.lua index 2b8bafc..647b19c 100644 --- a/.config/nvim/lua/statusline.lua +++ b/.config/nvim/lua/statusline.lua @@ -148,17 +148,17 @@ local function statusline_focused() process_diagnostics( globals.sign_error .. " ", diagnostics.errors, - "%#DiagnosticError#" + "%#DiagnosticVirtualTextError#" ), process_diagnostics( globals.sign_warning .. " ", diagnostics.warnings, - "%#DiagnosticWarn#" + "%#DiagnosticVirtualTextWarn#" ), process_diagnostics( globals.sign_info .. " ", diagnostics.info, - "%#DiagnosticInfo#" + "%#DiagnosticVirtualTextInfo#" ) } ) diff --git a/.gitmodules b/.gitmodules index 5091431..70837f4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule ".local/src/slock"] path = .local/src/slock url = git@github.com:swy7ch/slock.git +[submodule ".local/src/astronomy.nvim"] + path = .local/src/astronomy.nvim + url = git@github.com:swy7ch/astronomy.nvim diff --git a/.local/src/astronomy.nvim b/.local/src/astronomy.nvim new file mode 160000 index 0000000..c329ff4 --- /dev/null +++ b/.local/src/astronomy.nvim @@ -0,0 +1 @@ +Subproject commit c329ff44d3aef42e8347563bf7ae119b5a2a2d70