Browse Source

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
dev
David JULIEN 8 months ago
parent
commit
b03369ba79
Signed by: swytch
GPG Key ID: 4B388E8BD9D47382
  1. 13
      .config/nvim/lua/colorscheme.lua
  2. 16
      .config/nvim/lua/lsp/init.lua
  3. 3
      .config/nvim/lua/maps.lua
  4. 2
      .config/nvim/lua/plugins.lua
  5. 6
      .config/nvim/lua/statusline.lua
  6. 3
      .gitmodules
  7. 1
      .local/src/astronomy.nvim

13
.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,
}

16
.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"
}
)

3
.config/nvim/lua/maps.lua

@ -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>tb", "<cmd>Telescope file_browser<CR>")
utils.map("n", "<leader>tl", "<cmd>Telescope live_grep<CR>")
-- colorscheme
utils.map("n", "<C-s>", "<cmd>lua require(\"astronomy\").toggle_variant()<CR>")

2
.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
}

6
.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#"
)
}
)

3
.gitmodules vendored

@ -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

1
.local/src/astronomy.nvim

@ -0,0 +1 @@
Subproject commit c329ff44d3aef42e8347563bf7ae119b5a2a2d70
Loading…
Cancel
Save