From 318316c05bd2f070497bd6d6064686050dc3fe10 Mon Sep 17 00:00:00 2001 From: Natalie Date: Mon, 21 Apr 2025 15:06:26 -0700 Subject: [PATCH] more nixvim progress --- modules/nixvim/default.nix | 2 - modules/nixvim/icons.nix | 189 +++++++++++++++++++++++++++++ modules/nixvim/opts.nix | 6 +- modules/nixvim/plugins/blink.nix | 40 ++++++ modules/nixvim/plugins/default.nix | 5 + 5 files changed, 237 insertions(+), 5 deletions(-) create mode 100644 modules/nixvim/icons.nix create mode 100644 modules/nixvim/plugins/blink.nix diff --git a/modules/nixvim/default.nix b/modules/nixvim/default.nix index 19b3946..fe644b7 100644 --- a/modules/nixvim/default.nix +++ b/modules/nixvim/default.nix @@ -12,8 +12,6 @@ programs.nixvim = { enable = true; - defaultEditor = true; - globals = { #Set leader to space, and localleader to \ mapleader = " "; diff --git a/modules/nixvim/icons.nix b/modules/nixvim/icons.nix new file mode 100644 index 0000000..956bc87 --- /dev/null +++ b/modules/nixvim/icons.nix @@ -0,0 +1,189 @@ +{lib, ...}: { + options.nvix.icons = lib.mkOption { + type = lib.types.attrs; + default = {}; + }; + config.nvix.icons = { + kind = { + Array = ""; + Boolean = ""; + Class = ""; + Color = ""; + Constant = ""; + Constructor = ""; + Enum = ""; + EnumMember = ""; + Event = ""; + Field = ""; + File = ""; + Folder = ""; + Function = ""; + Interface = ""; + Key = ""; + Keyword = ""; + Method = ""; + Module = ""; + Namespace = ""; + Null = "ﳠ"; + Number = ""; + Object = ""; + Operator = ""; + Package = ""; + Property = ""; + Reference = ""; + Snippet = ""; + String = ""; + Struct = ""; + Text = ""; + TypeParameter = ""; + Unit = ""; + Value = ""; + Variable = ""; + Copilot = ""; + TabNine = "⌬"; + }; + git = { + LineAdded = ""; + LineModified = ""; + LineRemoved = ""; + FileDeleted = ""; + FileIgnored = "󰫙"; + FileRenamed = ""; + FileStaged = "✓"; + FileUnmerged = ""; + FileMerged = ""; + FileUnstaged = ""; + FileUntracked = "◌"; + FileChanged = "󰉺"; + Copied = "󰆏"; + Ignored = ""; + Diff = ""; + Repo = ""; + Octoface = ""; + Branch = ""; + }; + ui = { + lazy = { + ft = ""; + lazy = "󰂠 "; + loaded = ""; + not_loaded = ""; + }; + ArrowCircleDown = ""; + ArrowCircleLeft = ""; + ArrowCircleRight = ""; + ArrowCircleUp = ""; + BoldArrowDown = ""; + BoldArrowLeft = ""; + BoldArrowRight = ""; + BoldArrowUp = ""; + BoldClose = ""; + BoldDividerLeft = ""; + BoldDividerRight = ""; + BoldLineLeft = "▎"; + BookMark = ""; + BoxChecked = ""; + Bug = ""; + Stacks = ""; + Scopes = ""; + Watches = ""; + DebugConsole = ""; + Calendar = ""; + Check = ""; + ChevronRight = ">"; + ChevronShortDown = ""; + ChevronShortLeft = ""; + ChevronShortRight = ""; + ChevronShortUp = ""; + Circle = ""; + Close = ""; + CloudDownload = ""; + Code = ""; + Comment = ""; + Dashboard = ""; + DividerLeft = ""; + DividerRight = ""; + DoubleChevronRight = "»"; + Ellipsis = ""; + EmptyFolder = ""; + EmptyFolderOpen = ""; + ExitCircle = "󰿅"; + File = ""; + FileSymlink = ""; + Files = ""; + FileRename = ""; + FindFile = "󰈞"; + FindText = ""; + Fire = ""; + Folder = ""; + FolderOpen = ""; + FolderSymlink = ""; + Forward = ""; + Gear = ""; + History = ""; + Lightbulb = ""; + LineLeft = "▏"; + LineMiddle = "│"; + List = ""; + Lock = ""; + NewFile = ""; + Note = ""; + Package = ""; + Pencil = "󰏫"; + Plus = ""; + Project = ""; + Search = ""; + SignIn = ""; + SignOut = ""; + Tab = ""; + Table = ""; + Target = "󰀘"; + Telescope = ""; + Text = ""; + Tree = ""; + Triangle = "󰐊"; + TriangleShortArrowDown = ""; + TriangleShortArrowLeft = ""; + TriangleShortArrowRight = ""; + TriangleShortArrowUp = ""; + }; + diagnostics = { + BoldError = ""; + Error = ""; + BoldWarning = ""; + Warning = ""; + BoldInformation = ""; + Information = ""; + BoldQuestion = ""; + Question = ""; + BoldHint = ""; + Hint = "󰌶"; + Debug = ""; + Trace = "✎"; + }; + misc = { + Robot = "ﮧ"; + Squirrel = ""; + Tag = ""; + Watch = ""; + Smiley = ""; + Package = ""; + CircuitBoard = ""; + LualineFmt = ""; + }; + nvtree_chad = { + default = "󰈚"; + symlink = ""; + folder = { + default = ""; + empty = ""; + empty_open = ""; + open = ""; + symlink = ""; + symlink_open = ""; + arrow_open = ""; + arrow_closed = ""; + }; + }; + }; +} diff --git a/modules/nixvim/opts.nix b/modules/nixvim/opts.nix index cb36614..8c6b35e 100644 --- a/modules/nixvim/opts.nix +++ b/modules/nixvim/opts.nix @@ -3,9 +3,9 @@ opts = { # Show line numbers number = true; - # You can also add relative line numbers, to help with jumping. - # Experiment for yourself to see if you like it! - #relativenumber = true + relativenumber = true; + + shiftwidth = 2; # Enable mouse mode, can be useful for resizing splits for example! mouse = "a"; diff --git a/modules/nixvim/plugins/blink.nix b/modules/nixvim/plugins/blink.nix new file mode 100644 index 0000000..c066b6c --- /dev/null +++ b/modules/nixvim/plugins/blink.nix @@ -0,0 +1,40 @@ +{ + lib, + pkgs, + ... +}: { + programs.nixvim = { + extraPackages = with pkgs; [ + gh + wordnet + glab + ]; + + extraPlugins = [ + ]; + + plugins = { + blink-cmp = { + enable = true; + + lazyLoad.settings.event = [ + "InsertEnter" + "CmdlineEnter" + ]; + + settings = { + keymap.preset = "super-tab"; + completion = { + ghost_test.enabled = true; + + documentation = { + auto_show = true; + + window.border = "rounded"; + }; + }; + }; + }; + }; + }; +} diff --git a/modules/nixvim/plugins/default.nix b/modules/nixvim/plugins/default.nix index e69de29..8ee50a4 100644 --- a/modules/nixvim/plugins/default.nix +++ b/modules/nixvim/plugins/default.nix @@ -0,0 +1,5 @@ +{pkgs, ...}: { + imports = [ + ./blink.nix + ]; +}