From fcbb5bea9056554c03bcbf328f32763b7a5f3c5f Mon Sep 17 00:00:00 2001
From: Daniel Lundin <dln@arity.se>
Date: Tue, 21 Jan 2025 22:30:38 +0100
Subject: [PATCH 1/3] nvim: blink-emoji-nvim and blink-compat are now in
 nixpkgs

---
 home/common/nvim/default.nix | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/home/common/nvim/default.nix b/home/common/nvim/default.nix
index 57e68e6..e5adcd9 100644
--- a/home/common/nvim/default.nix
+++ b/home/common/nvim/default.nix
@@ -46,6 +46,8 @@ in
     ];
 
     plugins = with pkgs.vimPlugins; [
+      blink-compat
+      blink-emoji-nvim
       friendly-snippets
       go-nvim
       targets-vim
@@ -80,22 +82,6 @@ in
         config = lib.fileContents ./blink-cmp.lua;
       }
 
-      {
-        plugin = pkgs.vimUtils.buildVimPlugin {
-          name = "blink.compat";
-          src = pkgs.fetchFromGitHub {
-            owner = "saghen";
-            repo = "blink.compat";
-            rev = "5ca8848c8cc32abdc980e5db4f0eb7bb8fbf84dc"; # Dec 25, 2024
-            hash = "sha256-tFQeKyqdo3mvptYnWxKhTpI4ROFNQ6u3P8cLqtlsozw=";
-          };
-        };
-        type = "lua";
-        config = ''
-          require('blink.compat').setup()
-        '';
-      }
-
       {
         plugin = pkgs.vimUtils.buildVimPlugin {
           name = "inlay-hints";

From 8c5b50bbbd5f17834a84f3b84dabf245e6554f44 Mon Sep 17 00:00:00 2001
From: Daniel Lundin <dln@arity.se>
Date: Tue, 21 Jan 2025 22:30:38 +0100
Subject: [PATCH 2/3] nvim: allow blink completion menu to go downward if there
 is not enough space north

---
 home/common/nvim/blink-cmp.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/home/common/nvim/blink-cmp.lua b/home/common/nvim/blink-cmp.lua
index 8ae4f6c..a719718 100644
--- a/home/common/nvim/blink-cmp.lua
+++ b/home/common/nvim/blink-cmp.lua
@@ -29,7 +29,7 @@ require 'blink-cmp'.setup({
     menu = {
       auto_show = true,
       border = 'rounded',
-      direction_priority = { 'n' },
+      direction_priority = { 'n', 's' },
       draw = {
         components = {
           kind_icon = {

From 8bcc3ca8327993cabc67791eefd5c2e06cb9e180 Mon Sep 17 00:00:00 2001
From: Daniel Lundin <dln@arity.se>
Date: Tue, 21 Jan 2025 22:30:38 +0100
Subject: [PATCH 3/3] =?UTF-8?q?nvim:=20add=20blink-emoji=20completion=20?=
 =?UTF-8?q?=F0=9F=9A=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 home/common/nvim/blink-cmp.lua | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/home/common/nvim/blink-cmp.lua b/home/common/nvim/blink-cmp.lua
index a719718..113fda6 100644
--- a/home/common/nvim/blink-cmp.lua
+++ b/home/common/nvim/blink-cmp.lua
@@ -61,9 +61,18 @@ require 'blink-cmp'.setup({
   },
 
   sources = {
-    default = { 'lsp' },
+    default = {
+      'lsp',
+      'emoji',
+    },
     cmdline = {},
-    providers = {},
+    providers = {
+      emoji = {
+        module = "blink-emoji",
+        name = "Emoji",
+        score_offset = 1,
+        opts = { insert = true },
+      }
+    },
   },
-
 })