From 958eb8c791551bc503c3014249db2ffef33f0aad Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Fri, 10 Jan 2025 18:15:52 +0100 Subject: [PATCH] Update config --- nvim/lua/keybinds.lua | 4 + nvim/lua/plugins/colors.lua | 203 ++++++++++++++++------------- nvim/my_snippets/snippets/tex.json | 9 +- 3 files changed, 123 insertions(+), 93 deletions(-) diff --git a/nvim/lua/keybinds.lua b/nvim/lua/keybinds.lua index 60a3473..3f804f7 100755 --- a/nvim/lua/keybinds.lua +++ b/nvim/lua/keybinds.lua @@ -34,6 +34,10 @@ vim.api.nvim_set_keymap('i', '', ':t.-1i', { noremap = true, s vim.api.nvim_set_keymap('i', '', ':t.i', { noremap = true, silent = true }) +-- Keep selection in visual mode when indenting +vim.api.nvim_set_keymap('v', '<', '', '>gv', { noremap = true, silent = true }) + -- Save shortcut keymap.set("i", "", ":wa", opts("Save file (shortcut)")) diff --git a/nvim/lua/plugins/colors.lua b/nvim/lua/plugins/colors.lua index f2fd999..57dbecd 100755 --- a/nvim/lua/plugins/colors.lua +++ b/nvim/lua/plugins/colors.lua @@ -4,107 +4,134 @@ return { lazy = false, priority = 1000, config = function() - -- local Shade = require("nightfox.lib.shade") + local Shade = require("nightfox.lib.shade") require("nightfox").setup({ options = { transparent = true, + styles = { + comments = "italic", + functions = "italic", + keywords = "italic", + types = "italic", + } + }, + palettes = { + all = { + black = Shade.new("#404944", 0.15, -0.15), + gray = Shade.new("#505050", 0.15, -0.15), + white = Shade.new("#dee4df", 0.15, -0.15), + red = Shade.new("#ff6060", 0.15, -0.15), + darkred = Shade.new("#903030", 0.15, -0.15), + strongred = Shade.new("#bb0000", 0.15, -0.15), + orange = Shade.new("#ce8c14", 0.15, -0.15), + green = Shade.new("#a3d397", 0.10, -0.15), + darkgreen = Shade.new("#005602", 0.10, -0.15), + darkyellow = Shade.new("#dfd100", 0.10, -0.15), + yellow = Shade.new("#e3c46d", 0.15, -0.15), + darkblue = Shade.new("#1010aa", 0.15, -0.15), + blue = Shade.new("#7070dd", 0.15, -0.15), + magenta = Shade.new("#C02490", 0.30, -0.15), + pink = Shade.new("#ff82c2", 0.15, -0.15), + purple = Shade.new("#761464", 0.15, -0.15), + cyan = Shade.new("#7ac9ff", 0.15, -0.15), + lightblue = Shade.new("#5c77ff", 0.15, -0.15), + softblue = Shade.new("#10ddff", 0.15, -0.15), + brown = Shade.new("#553200", 0.15, -0.15), + + bg0 = "#0f1512", -- Dark bg (status line and float) + bg1 = "#0f1512", -- Default bg + bg2 = "#1b211e", -- Lighter bg (colorcolm folds) + bg3 = "#252b28", -- Lighter bg (cursor line) + bg4 = "#303633", -- Conceal, border fg + + fg0 = "#dee4df", -- Lighter fg + fg1 = "#dee4df", -- Default fg + fg2 = "#dee4df", -- Darker fg (status line) + fg3 = "#89938d", -- Darker fg (line numbers, fold colums) + + sel0 = "#404944", -- Popup bg, visual selection + sel1 = "#00513b", -- Popup sel bg, search bg + + comment = "#89938d", + }, }, specs = { carbonfox = { - comment = { fg = "#070707", italic = true }, + syntax = { + comment = "comment", + bracket = "darkyellow", + builtin0 = "softblue", + builtin1 = "sel0", + builtin2 = "sel1", + conditional = "darkblue", + const = "gray", + dep = "darkred", + field = "green", + func = "pink", + ident = "darkgreen", + keyword = "blue", + number = "yellow", + operator = "white", + preproc = "strongred", + regex = "purple", + statement = "magenta", + string = "cyan", + type = "red", + variable = "orange" + }, + diag = { + error = "darkred", + warn = "yellow", + info = "lightblue", + hint = "fg3", + ok = "darkgreen", + }, + diag_bg = { + error = "red", + warn = "#a16b00", + info = "cyan", + hint = "bg3", + ok = "green"; + }, + diff = { + add = "darkgreen", + delete = "darkred", + changed = "lightblue", + text = "fg0" + }, + git = { + add = "darkgreen", + removed = "darkred", + changed = "lightblue", + conflict = "orange", + ignored = "gray" + } } }, groups = { - carbonfox = { - bracket = { fg = "#FFFFFF" }, - builtin0 = { fg = "" }, - builtin1 = { fg = "" }, - builtin2 = { fg = "" }, + all = { + Cursor = { fg = "palette.white", bg = "palette.lightblue" }, -- character under the cursor + WinSeparator = { fg = "palette.bg2" }, -- the column separating vertically split windows + EndOfBuffer = { link = "WinSeparator" }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|. + CursorLine = { bg = "palette.bg1" }, + CursorLineNr = { fg = "palette.cyan", style = "bold" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. + Search = { fg = "palette.lightblue", bg = "#00513b" }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. + IncSearch = { fg = "palette.lightblue", bg = "#1a6b51" }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c" + ModeMsg = { fg = "palette.bg3", style = "bold" }, -- 'showmode' message (e.g., "-- INSERT --") - keyword = { fg = "#8b009d", italic = true }, + NvimTreeRootFolder = { fg = "palette.lightblue", style = "bold" }, + NvimTreeFolderName = { fg = "palette.lightblue" }, + NvimTreeFolderIcon = { fg = "palette.lightblue" }, + NvimTreeOpenedFolderName = { fg = "palette.lightblue" }, + NvimTreeSymlinkFolderName = { fg = "palette.magenta" }, - } + NvimTreeExecFile = { fg = "palette.red" }, + NvimTreeImageFile = { fg = "palette.white" }, + NvimTreeSpecialFile = { fg = "palette.yellow" }, + NvimTreeSymlink = { fg = "palette.magenta" }, + }, }, }) - -- palettes = { - -- all = { - -- black = Shade.new("#404944", 0.15, -0.15), - -- white = Shade.new("#dee4df", 0.15, -0.15), - -- red = Shade.new("#ffb4a9", 0.15, -0.15), - -- orange = Shade.new("#e3c46d", 0.15, -0.15), - -- green = Shade.new("#a3d397", 0.10, -0.15), - -- darkgreen = Shade.new("#005602", 0.10, -0.15), - -- yellow = Shade.new("#e3c46d", 0.15, -0.15), - -- blue = Shade.new("#b7c4ff", 0.15, -0.15), - -- magenta = Shade.new("#f5b2e2", 0.30, -0.15), - -- pink = Shade.new("#f5b2e2", 0.15, -0.15), - -- purple = Shade.new("#761464", 0.15, -0.15), - -- cyan = Shade.new("#8ad6b6", 0.15, -0.15), - -- lightblue = Shade.new("#5c77ff", 0.15, -0.15), - -- - -- bg0 = "#0f1512", -- Dark bg (status line and float) - -- bg1 = "#0f1512", -- Default bg - -- bg2 = "#1b211e", -- Lighter bg (colorcolm folds) - -- bg3 = "#252b28", -- Lighter bg (cursor line) - -- bg4 = "#303633", -- Conceal, border fg - -- - -- fg0 = "#dee4df", -- Lighter fg - -- fg1 = "#dee4df", -- Default fg - -- fg2 = "#dee4df", -- Darker fg (status line) - -- fg3 = "#89938d", -- Darker fg (line numbers, fold colums) - -- - -- sel0 = "#404944", -- Popup bg, visual selection - -- sel1 = "#00513b", -- Popup sel bg, search bg - -- - -- comment = "#89938d", - -- }, - -- }, - -- groups = { - -- all = { - -- Cursor = { fg = "palette.white", bg = "palette.lightblue" }, -- character under the cursor - -- WinSeparator = { fg = "palette.bg2" }, -- the column separating vertically split windows - -- EndOfBuffer = { link = "WinSeparator" }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|. - -- CursorLine = { bg = "palette.bg1" }, - -- CursorLineNr = { fg = "palette.lightblue", style = "bold" }, -- Like LineNr when 'cursorline' or 'relativenumber' is set for the cursor line. - -- Search = { fg = "palette.lightblue", bg = "#00513b" }, -- Last search pattern highlighting (see 'hlsearch'). Also used for similar items that need to stand out. - -- IncSearch = { fg = "palette.lightblue", bg = "#1a6b51" }, -- 'incsearch' highlighting; also used for the text replaced with ":s///c" - -- ModeMsg = { fg = "palette.bg3", style = "bold" }, -- 'showmode' message (e.g., "-- INSERT --") - -- - -- NvimTreeRootFolder = { fg = "palette.lightblue", style = "bold" }, - -- NvimTreeFolderName = { fg = "palette.lightblue" }, - -- NvimTreeFolderIcon = { fg = "palette.lightblue" }, - -- NvimTreeOpenedFolderName = { fg = "palette.lightblue" }, - -- NvimTreeSymlinkFolderName = { fg = "palette.magenta" }, - -- - -- NvimTreeExecFile = { fg = "palette.red" }, - -- NvimTreeImageFile = { fg = "palette.white" }, - -- NvimTreeSpecialFile = { fg = "palette.yellow" }, - -- NvimTreeSymlink = { fg = "palette.magenta" }, - -- }, - -- }, - -- spec = { - -- syntax = { - -- bracket = "palette.white", - -- builtin0 = "palette.cyan", - -- builtin1 = "palette.green", - -- builtin2 = "palette.green", - -- comment = { fg = "palette.comment", style = "italic" }, - -- conditional = "palette.pink", - -- const = "palette.blue", - -- dep = { fg = "palette.black", style = "strikethrough" }, - -- field = "palette.green", - -- func = { fg ="palette.magenta", style = "italic" }, - -- ident = "palette.cyan", - -- keywords = { fg = "palette.magenta", style = "italic" }, - -- number = "palette.purple", - -- operator = "palette.white", - -- preproc = "palette.black", - -- regex = "palette.yellow", - -- statement = "palette.darkgreen", - -- string = "", - -- } - -- } - -- }) if not vim.g.vscode then vim.cmd([[colorscheme carbonfox]]) end diff --git a/nvim/my_snippets/snippets/tex.json b/nvim/my_snippets/snippets/tex.json index 4232afb..fef4fb1 100755 --- a/nvim/my_snippets/snippets/tex.json +++ b/nvim/my_snippets/snippets/tex.json @@ -45,13 +45,12 @@ "prefix": "latex-prepare", "body": [ "\\documentclass{article}\n", - "\\newcommand{\\dir}{~/projects/latex} % IMPORTANT: No trailing slashes!", - "\\input{\\dir/include.tex}", - "\\load{recommended}\n", + "\\input{~/projects/generalSchool/helpers.tex}\n", "\\setup{$1}\n", "\\begin{document}", - "\\startDocument", - "\\usetcolorboxes", + "\\maketitle", + "\\pagestyle{fancy}", + "\\thispagestyle{fancy}\n\n", "$2\n\n", "\\end{document}" ],