diff --git a/lazy-lock.json b/lazy-lock.json index 8dc6956..b5bd74e 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -44,7 +44,6 @@ "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "tardis.nvim": { "branch": "main", "commit": "f050686a6c299dba95d07990550174c20aba56dd" }, "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, - "telescope_hoogle": { "branch": "master", "commit": "14be34fd5c464e3da0992ad094f157b0b8b098f9" }, "treesj": { "branch": "main", "commit": "925b506eadd9b465e6e577bb684d86e9863a2e21" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, "vim-illuminate": { "branch": "master", "commit": "0d1e93684da00ab7c057410fecfc24f434698898" }, diff --git a/lua/colors/normal.lua b/lua/colors/normal.lua new file mode 100644 index 0000000..24d3ff2 --- /dev/null +++ b/lua/colors/normal.lua @@ -0,0 +1,14 @@ +local custom_highlights = function(C) + return { + HopNextKey = { bg = C.text, fg = C.base, style = { "bold", "underline" } }, + HopNextKey1 = { bg = C.text, fg = C.base, style = { "bold" } }, + HopNextKey2 = { bg = C.text, fg = C.base, style = { "bold", "italic" } }, + DiagnosticUnderlineError = { style = { "undercurl" } }, + DiagnosticUnderlineWarn = { style = { "undercurl" } }, + DiagnosticUnderlineInfo = { style = { "undercurl" } }, + DiagnosticUnderlineHint = { style = { "undercurl" } }, + DiagnosticUnderlineOk = { style = { "undercurl" } }, + } +end + +return custom_highlights diff --git a/lua/colors/quasimono.lua b/lua/colors/quasimono.lua index 68266ef..465bc7f 100644 --- a/lua/colors/quasimono.lua +++ b/lua/colors/quasimono.lua @@ -1,87 +1,133 @@ local custom_highlights = function(C) local U = require("catppuccin.utils.colors") local ret = { - -- fuuctions sigature & calls are blue - Function = { fg = C.blue, style = { "bold" } }, + HopNextKey = { bg = C.text, fg = C.base, style = { "bold", "underline" } }, + HopNextKey1 = { bg = C.text, fg = C.base, style = { "bold" } }, + HopNextKey2 = { bg = C.text, fg = C.base, style = { "bold", "italic" } }, + DiagnosticUnderlineError = { style = { "undercurl" } }, + DiagnosticUnderlineWarn = { style = { "undercurl" } }, + DiagnosticUnderlineInfo = { style = { "undercurl" } }, + DiagnosticUnderlineHint = { style = { "undercurl" } }, + DiagnosticUnderlineOk = { style = { "undercurl" } }, ["@function.call"] = { fg = U.darken(C.blue, 0.5, C.text) }, + Function = { fg = C.blue, style = { "bold" } }, ["@lsp.type.function"] = { link = "@function.call" }, ["@lsp.type.method"] = { link = "@function.call" }, - - -- Types are green - -- Type = { fg = U.darken(C.green, 0.8, C.black) }, - -- ["@type.python"] = { link = "Type", }, - - -- Comments should be important - Comment = { fg = C.mauve, style = {}}; - - -- differentiate between consts and mutables + ["@lsp.type.macro"] = { link = "Macro" }, + ["@Keyword.directive"] = { link = "PreProc" }, + -- ["@lsp.mod.definition"] = { bg = U.darken(C.green, .3, C.base) }, + -- Keyword = { fg = C.black, style = { "italic" } }, + Type = { fg = C.text }, + -- + -- syntax + Constant = { fg = C.text }, + String = { fg = C.text }, + Character = { fg = C.text }, + Number = { fg = C.text }, + Float = { fg = C.text }, + Boolean = { fg = C.text }, + Identifier = { fg = C.text }, + -- Function = { fg = C.text }, + Statement = { fg = C.text }, + Conditional = { fg = C.text }, + Repeat = { fg = C.text }, + Label = { fg = C.text }, + Operator = { fg = C.text }, + Keyword = { fg = C.text }, + Exception = { fg = C.text }, + PreProc = { fg = C.pink }, + Include = { fg = C.pink }, + Define = { fg = C.pink }, + Macro = { fg = C.pink }, + PreCondit = { fg = C.pink }, + StorageClass = { fg = C.text }, + Structure = { fg = C.text }, + Special = { fg = C.text }, + Typedef = { fg = C.text }, + SpecialChar = { fg = C.text }, + Tag = { fg = C.text }, + Delimiter = { fg = C.text }, + Debug = { fg = C.text }, variable = {}, ["@lsp.mod.readonly"] = { fg = C.text }, ["@variable"] = { fg = U.darken(C.red, .5, C.text) }, + ["@keyword.modifier"] = { fg = C.yellow, style = {"italic"}} - -- highly visible consts kwds - ["@keyword.modifier"] = { fg = C.yellow, style = {"italic"}}, + -- ['@parameter'] = { style = { "underline"} }, - -- Plugin specific - HopNextKey = { bg = C.text, fg = C.base, style = { "bold" } }, - HopNextKey1 = { link = "HopNextKey" }, - HopNextKey2 = { link = "HopNextKey" }, + -- Underlined = { style = { "underline" } }, -- (preferred) text that stands out, HTML links + -- Bold = { style = { "bold" } }, + -- Italic = { style = { "italic" } }, + -- ("Ignore", below, may be invisible...) + -- Ignore = { }, -- (preferred) left blank, hidden |hl-Ignore| + -- Error = { fg = C.red }, -- (preferred) any erroneous construct + -- Todo = { bg = C.flamingo, fg = C.base, style = { "bold" } }, -- (preferred) anything that needs extra attention; mostly the keywords TODO FIXME and XXX + -- qfLineNr = { fg = C.yellow }, + -- qfFileName = { fg = C.blue }, + -- htmlH1 = { fg = C.pink, style = { "bold" } }, + -- htmlH2 = { fg = C.blue, style = { "bold" } }, + -- -- mkdHeading = { fg = C.peach, style = { "bold" } }, + -- -- mkdCode = { bg = C.terminal_black, fg = C.text }, + -- mkdCodeDelimiter = { bg = C.base, fg = C.text }, + -- mkdCodeStart = { fg = C.flamingo, style = { "bold" } }, + -- mkdCodeEnd = { fg = C.flamingo, style = { "bold" } }, + -- -- mkdLink = { fg = C.blue, style = { "underline" } }, + -- + -- -- debugging + -- debugPC = { bg = O.transparent_background and C.none or C.crust }, -- used for highlighting the current line in terminal-debug + -- debugBreakpoint = { bg = C.base, fg = C.overlay0 }, -- used for breakpoint colors in terminal-debug + -- -- illuminate + -- illuminatedWord = { bg = C.surface1 }, + -- illuminatedCurWord = { bg = C.surface1 }, + -- -- diff + -- diffAdded = { fg = C.green }, + -- diffRemoved = { fg = C.red }, + -- diffChanged = { fg = C.blue }, + -- diffOldFile = { fg = C.yellow }, + -- diffNewFile = { fg = C.peach }, + -- diffFile = { fg = C.blue }, + -- diffLine = { fg = C.overlay0 }, + -- diffIndexLine = { fg = C.teal }, + -- DiffAdd = { bg = U.darken(C.green, 0.18, C.base) }, -- diff mode: Added line |diff.txt| + -- DiffChange = { bg = U.darken(C.blue, 0.07, C.base) }, -- diff mode: Changed line |diff.txt| + -- DiffDelete = { bg = U.darken(C.red, 0.18, C.base) }, -- diff mode: Deleted line |diff.txt| + -- DiffText = { bg = U.darken(C.blue, 0.30, C.base) }, -- diff mode: Changed text within a changed line |diff.txt| + -- -- NeoVim + -- healthError = { fg = C.red }, + -- healthSuccess = { fg = C.teal }, + -- healthWarning = { fg = C.yellow }, + -- -- misc + -- + -- -- glyphs + -- GlyphPalette1 = { fg = C.red }, + -- GlyphPalette2 = { fg = C.teal }, + -- GlyphPalette3 = { fg = C.yellow }, + -- GlyphPalette4 = { fg = C.blue }, + -- GlyphPalette6 = { fg = C.teal }, + -- GlyphPalette7 = { fg = C.text }, + -- GlyphPalette9 = { fg = C.red }, + -- + -- -- rainbow + -- rainbow1 = { fg = C.red }, + -- rainbow2 = { fg = C.peach }, + -- rainbow3 = { fg = C.yellow }, + -- rainbow4 = { fg = C.green }, + -- rainbow5 = { fg = C.sapphire }, + -- rainbow6 = { fg = C.lavender }, + -- + -- -- csv + -- csvCol0 = { fg = C.red }, + -- csvCol1 = { fg = C.peach }, + -- csvCol2 = { fg = C.yellow }, + -- csvCol3 = { fg = C.green }, + -- csvCol4 = { fg = C.sky }, + -- csvCol5 = { fg = C.blue }, + -- csvCol6 = { fg = C.lavender }, + -- csvCol7 = { fg = C.mauve }, + -- csvCol8 = { fg = C.pink }, } - - -- base color - for _, field in ipairs({ - "Constant", - "String", - "Character", - "Number", - "Float", - "Boolean", - "Identifier", - "Statement", - "Conditional", - "Repeat", - "Label", - "Operator", - "Keyword", - "Exception", - "StorageClass", - "Structure", - "Special", - "Typedef", - "SpecialChar", - "Tag", - "Delimiter", - "Debug", - }) do - ret[field] = { fg = C.text }; - end - - -- pink - for _, field in ipairs({ - "PreProc", - "Include", - "Define", - "Macro", - "@lsp.type.macro", - "PreCondit", - "@Keyword.directive", - }) do - ret[field] = { fg = C.pink }; - end - - for _, field in ipairs({ - "DiagnosticUnderlineError", - "DiagnosticUnderlineWarn", - "DiagnosticUnderlineInfo", - "DiagnosticUnderlineHint", - "DiagnosticUnderlineOk", - }) do - ret[field] = { style = { "undercurl" } }; - end - - -- for semantic coloring from ccls local var_colors = { U.darken(C.green, .4, C.text); U.darken(C.lavender, .5, C.text); diff --git a/lua/mappings.lua b/lua/mappings.lua index d868a10..5225ce9 100644 --- a/lua/mappings.lua +++ b/lua/mappings.lua @@ -32,7 +32,6 @@ s('n', 'N', " Neogit ", { desc = "Open Neogit" }) -- s('x', 'p', 'p:let @+=@0:let @"=@0') s('x', 'p', 'P') s('n', 'gh', ":Ouroboros", { desc = "Go to header/implementation" }) -s('t', '', '', { desc = "Escape terminal mode"}) -- Luasnip local ls = require("luasnip") @@ -109,6 +108,7 @@ vim.api.nvim_create_autocmd('LspAttach', { s('n', 'q', vim.diagnostic.setloclist, { buffer = ev.buf, desc = "Set location list" }) s('n', 'gD', vim.lsp.buf.declaration, { buffer = ev.buf, desc = "Goto declaration" }) s('n', 'gd', telescope.lsp_definitions, { buffer = ev.buf, desc = "Goto definition" }) + s( {'n', 'v'}, 'K', vim.lsp.buf.hover, { buffer = ev.buf, desc = "lsp Hover" }) s( {'n', 'v'}, '', dap_or(vim.lsp.buf.signature_help), { buffer = ev.buf, desc = "dap eval" }) s( {'n', 'v'}, '', @@ -139,11 +139,10 @@ function continue() end end -s('n', 'b', dap.toggle_breakpoint, { desc = "Toggle breakpoint" }) -s('n', 'B', function() - local condition = vim.fn.input("Condition: ", "", "customlist,Complete") - dap.set_breakpoint(condition) -end, { desc = "Add conditional breakpoint" }) +local pb = require('persistent-breakpoints.api') +s('n', 'b', pb.toggle_breakpoint, { desc = "Toggle breakpoint" }) +s('n', 'l', pb.set_log_point, { desc = "Set logpoint" }) +s('n', 'B', pb.set_conditional_breakpoint , { desc = "Add conditional breakpoint" }) s('n', 'w', dapui.elements.watches.add, { desc = "Add watch" }) s('v', 'w', dapui.elements.watches.add, { desc = "Add watch" }) s('n', '', dapui.toggle, { desc = "Toggle debygger UI" }) diff --git a/lua/plugins.lua b/lua/plugins.lua index b36f2ae..39ab572 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -25,10 +25,24 @@ local plugins = { name = "catppuccin", priority = 1000, opts = { - background = { + background = { -- :h background light = "latte", dark = "mocha", }, + styles = { -- Handles the styles of general hi groups (see `:h highlight-args`): + comments = {}, -- Change the style of comments + conditionals = {}, + loops = {}, + functions = {}, + keywords = {}, + strings = {}, + variables = {}, + numbers = {}, + booleans = {}, + properties = {}, + types = { "italic" }, + operators = {}, + }, color_overrides = { mocha = { base = "#000000", @@ -253,7 +267,7 @@ local plugins = { "lewis6991/gitsigns.nvim", config = function() require('gitsigns').setup({ - numhl = true, + word_diff = true, on_attach = function(bufnr) local gs = package.loaded.gitsigns @@ -310,12 +324,7 @@ local plugins = { ) map('n', 'hd', gs.diffthis, { desc = "Diff this" }) map('n', 'hD', function() gs.diffthis('~') end, { desc = "Diff this (ignore whitespace)" }) - map( - "n", - "td", - function () gs.toggle_linehl() gs.toggle_word_diff() gs.toggle_deleted() end, - { desc = "toggle diff highlight" } - ) + map('n', 'td', gs.toggle_deleted, { desc = "Toggle deleted" }) -- Text object map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk', { desc = "Select hunk" }) @@ -537,6 +546,14 @@ local plugins = { } end }, + { + 'Weissle/persistent-breakpoints.nvim', + config = function() + require('persistent-breakpoints').setup { + load_breakpoints_event = { "BufReadPost" } + } + end + }, { 'jakemason/ouroboros', dependencies = { "nvim-lua/plenary.nvim" } @@ -565,30 +582,6 @@ local plugins = { "nvim-telescope/telescope.nvim" } }, - { - 'fredeeb/tardis.nvim', - dependencies = { 'nvim-lua/plenary.nvim' }, - config = function () - require('tardis-nvim').setup { - keymap = { - ["next"] = '', -- next entry in log (older) - ["prev"] = '', -- previous entry in log (newer) - ["quit"] = 'q', -- quit all - ["revision_message"] = '', -- show revision message for current revision - ["commit"] = '', -- replace contents of origin buffer with contents of tardis buffer - }, - initial_revisions = 10, -- initial revisions to create buffers for - max_revisions = 256, -- max number of revisions to load - } - end - }, - { - 'BartSte/nvim-project-marks', - lazy = false, - config = function() - require('projectmarks').setup({}) - end - }, } return plugins diff --git a/snippets/nix.snippets b/snippets/nix.snippets index 10c0c44..84e0471 100644 --- a/snippets/nix.snippets +++ b/snippets/nix.snippets @@ -16,7 +16,7 @@ snippet deps snippet flake { - description = "Flake for $1"; + description = "Flake utils $1"; inputs = { nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; flake-utils.url = "github:numtide/flake-utils";