From 8b7bc83bce3f48d166bd277d5b9672859a9b95b6 Mon Sep 17 00:00:00 2001 From: Roel de Cort <63876068+dc-tec@users.noreply.github.com> Date: Mon, 8 Jul 2024 00:17:29 +0200 Subject: [PATCH] feat: update lualine, clipboard and changed startup dashboard (#13) Updated Lualine with mode icon, moved git diff and added a icon displaying Github copilot status. Changed setting to default yank to system clipboard Updated startup dashboard --- config/plugins/ui/lualine.nix | 45 ++++++++++++++++++----------------- config/plugins/ui/startup.nix | 18 +++++++------- config/settings.nix | 1 + 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/config/plugins/ui/lualine.nix b/config/plugins/ui/lualine.nix index d7afaa5..aafbf47 100644 --- a/config/plugins/ui/lualine.nix +++ b/config/plugins/ui/lualine.nix @@ -14,6 +14,7 @@ _: { lualine_a = [ { name = "mode"; + icon = " "; } ]; lualine_b = [ @@ -21,6 +22,16 @@ _: { name = "branch"; icon = ""; } + { + name = "diff"; + extraConfig = { + symbols = { + added = " "; + modified = " "; + removed = " "; + }; + }; + } ]; lualine_c = [ { @@ -58,28 +69,18 @@ _: { name = "navic"; } { - name = "diff"; - extraConfig = { - symbols = { - added = " "; - modified = " "; - removed = " "; - }; - source = { - __raw = '' - function() - local gitsings = vim.b.gitsigns_status_dict - if gitsigns then - return { - added = gitigns.added, - modified = gitigns.changed, - removed = gitigns.removed - } - end - end - ''; - }; - }; + name.__raw = '' + function() + local icon = " " + local status = require("copilot.api").status.data + return icon .. (status.message or " ") + end, + + cond = function() + local ok, clients = pcall(vim.lsp.get_clients, { name = "copilot", bufnr = 0 }) + return ok and #clients > 0 + end, + ''; } ]; lualine_y = [ diff --git a/config/plugins/ui/startup.nix b/config/plugins/ui/startup.nix index ad77e8d..7c64e4a 100644 --- a/config/plugins/ui/startup.nix +++ b/config/plugins/ui/startup.nix @@ -39,32 +39,32 @@ [ " Find File" "Telescope find_files" - "ff" + "ff" ] [ "󰍉 Find Word" "Telescope live_grep" - "fr" + "fr" ] [ - " Recent Files" + " Recent Files" "Telescope oldfiles" - "fg" + "fg" ] [ - " File Browser" + " File Browser" "Telescope file_browser" - "fe" + "fe" ] [ - " Copilot Chat" + " Copilot Chat" "CopilotChat" - "Chat with Github Copilot" + "ct" ] [ "󰧑 SecondBrain" "edit ~/projects/personal/SecondBrain" - "Note taking with Obsidian" + "sb" ] ]; highlight = "string"; diff --git a/config/settings.nix b/config/settings.nix index 0a4684f..7a8ead0 100644 --- a/config/settings.nix +++ b/config/settings.nix @@ -16,6 +16,7 @@ opts = { number = true; relativenumber = true; + clipboard = "unnamedplus"; tabstop = 2; softtabstop = 2; showtabline = 2;