From f9e29c377407a1adfd77bbad0669cde2b8e55456 Mon Sep 17 00:00:00 2001 From: pr0c3550r Date: Mon, 6 Mar 2023 22:35:49 +0100 Subject: [PATCH] Remaps: added Keymaps for switching and closing buffers Statusline: show only with multiple Tabs Dashboard: fixed typo Everforest: new colorscheme --- nvim/.config/nvim/lua/core/remap.lua | 4 ++ nvim/.config/nvim/lua/core/statusline.lua | 2 +- nvim/.config/nvim/lua/plugin/dashboard.lua | 2 +- nvim/.config/nvim/lua/plugin/everforest.lua | 64 +++++++++++++++++++++ 4 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 nvim/.config/nvim/lua/plugin/everforest.lua diff --git a/nvim/.config/nvim/lua/core/remap.lua b/nvim/.config/nvim/lua/core/remap.lua index b32b26b..560989a 100644 --- a/nvim/.config/nvim/lua/core/remap.lua +++ b/nvim/.config/nvim/lua/core/remap.lua @@ -16,6 +16,10 @@ vim.api.nvim_set_keymap("n", "", "j", {}) vim.api.nvim_set_keymap("n", "", "k", {}) vim.api.nvim_set_keymap("n", "", "l", {}) +-- buffer switching +vim.api.nvim_set_keymap("n", "", "", {}) +vim.api.nvim_set_keymap("n", "on", "w %bd e#", {}) + -- moving visual blocks vim.api.nvim_set_keymap("v", "J", ":m '>+1gv=gv", {}) vim.api.nvim_set_keymap("v", "K", ":m '<-2gv=gv", {}) diff --git a/nvim/.config/nvim/lua/core/statusline.lua b/nvim/.config/nvim/lua/core/statusline.lua index 2e659b6..c12e198 100644 --- a/nvim/.config/nvim/lua/core/statusline.lua +++ b/nvim/.config/nvim/lua/core/statusline.lua @@ -4,4 +4,4 @@ vim.api.nvim_set_option("statusline", " %F %h%m%r %= %= %l,%c ") -- tabline -- always show tabline (0 = never, 1 = only with at least 2 tabs, 2 = always) and colors -vim.api.nvim_set_option("showtabline", 2) +vim.api.nvim_set_option("showtabline", 1) diff --git a/nvim/.config/nvim/lua/plugin/dashboard.lua b/nvim/.config/nvim/lua/plugin/dashboard.lua index 4a4b46c..e3b20af 100644 --- a/nvim/.config/nvim/lua/plugin/dashboard.lua +++ b/nvim/.config/nvim/lua/plugin/dashboard.lua @@ -14,7 +14,7 @@ return { { icon = ' ', desc = 'Files', group = '@property', action = 'Telescope find_files', key = 'ff' }, }, footer = { '', - 'Now better then ever ', + ' Now better then ever ', }, }, } diff --git a/nvim/.config/nvim/lua/plugin/everforest.lua b/nvim/.config/nvim/lua/plugin/everforest.lua new file mode 100644 index 0000000..742b554 --- /dev/null +++ b/nvim/.config/nvim/lua/plugin/everforest.lua @@ -0,0 +1,64 @@ +return { + { + "sainnhe/everforest", + lazy = true, + config = function() + -- Settings for colorscheme + vim.api.nvim_set_var("everforest_background", "hard") + vim.api.nvim_set_var("everforest_transparent_background", "1") + vim.api.nvim_set_var("everforest_ui_contrast", "low") + vim.api.nvim_set_var("everforest_show_eob", "0") + vim.api.nvim_set_var("everforest_enable_bold", "1") + vim.api.nvim_set_var("everforest_enable_italic", "1") + vim.api.nvim_set_var("everforest_better_performance", "1") + vim.cmd([[colo everforest]]) + + -- Settings to override colorscheme + -- vim.api.nvim_set_hl(0, "ModeMsg", { bold = true, fg = "#d8a657"}) + -- colors of tabline + vim.api.nvim_set_hl(0, "TabLine", { bg = "#3c3836", fg = "#89b482" }) + vim.api.nvim_set_hl(0, "TabLineFil", { bg = "#1d2021" }) + vim.api.nvim_set_hl(0, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" }) + -- color of statusline + vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" }) + vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" }) + -- color of vertical split line + vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" }) + -- color of the cursorline and cursorlinenumber + vim.api.nvim_set_hl(0, "Cursorline", { bg = "#141617" }) + vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, bg = "#141617", fg = "#d8a657" }) + -- color of Floats and FloatBorders + vim.api.nvim_set_hl(0, "NormalFloat", { bg = none, fg = none }) + vim.api.nvim_set_hl(0, "FloatBorder", { bg = none, fg = "#d4be98" }) + vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", { bg = none, fg = "#d8a657" }) + vim.api.nvim_set_hl(0, "DiagnosticFloatingError", { bg = none, fg = "#ea6962" }) + vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", { bg = none, fg = "#a9b665" }) + vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", { bg = none, fg = "#d4be98" }) + + -- autocommand for overrides + vim.api.nvim_create_autocmd("ColorScheme", { + pattern = "everforest", + callback = function() + vim.api.nvim_set_hl(0, "TabLine", { bg = "#3c3836", fg = "#89b482" }) + vim.api.nvim_set_hl(0, "TabLineFil", { bg = "#1d2021" }) + vim.api.nvim_set_hl(0, "TabLineSel", { bold = true, bg = "none", fg = "#d8a657" }) + -- color of statusline + vim.api.nvim_set_hl(0, "StatusLine", { bold = false, bg = "#1d2021", fg = "#89b482" }) + vim.api.nvim_set_hl(0, "StatusLineNC", { bg = "#1d2021", fg = "#5b534d" }) + -- color of vertical split line + vim.api.nvim_set_hl(0, "VertSplit", { bg = "#141617", fg = "#141617" }) + -- color of the cursorline and cursorlinenumber + vim.api.nvim_set_hl(0, "Cursorline", { bg = "#141617" }) + vim.api.nvim_set_hl(0, "CursorLineNr", { bold = true, bg = "#141617", fg = "#d8a657" }) + -- color of Floats and FloatBorders + vim.api.nvim_set_hl(0, "NormalFloat", { bg = none, fg = none }) + vim.api.nvim_set_hl(0, "FloatBorder", { bg = none, fg = "#d4be98" }) + vim.api.nvim_set_hl(0, "DiagnosticFloatingWarn", { bg = none, fg = "#d8a657" }) + vim.api.nvim_set_hl(0, "DiagnosticFloatingError", { bg = none, fg = "#ea6962" }) + vim.api.nvim_set_hl(0, "DiagnosticFloatingHint", { bg = none, fg = "#a9b665" }) + vim.api.nvim_set_hl(0, "DiagnosticFloatingInfo", { bg = none, fg = "#d4be98" }) + end, + }) + end, + }, +}