From aa47ed384a23fd7ddac68120319c6e319656a39d Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Fri, 3 Oct 2025 22:02:50 -0500 Subject: [PATCH] plugins/copilot-lsp: add module --- plugins/by-name/copilot-lsp/default.nix | 24 +++++++++++++++++++ .../plugins/by-name/copilot-lsp/default.nix | 18 ++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 plugins/by-name/copilot-lsp/default.nix create mode 100644 tests/test-sources/plugins/by-name/copilot-lsp/default.nix diff --git a/plugins/by-name/copilot-lsp/default.nix b/plugins/by-name/copilot-lsp/default.nix new file mode 100644 index 00000000..61f3759c --- /dev/null +++ b/plugins/by-name/copilot-lsp/default.nix @@ -0,0 +1,24 @@ +{ lib, ... }: +lib.nixvim.plugins.mkNeovimPlugin { + name = "copilot-lsp"; + package = "copilot-lsp"; + + description = '' + A lightweight and extensible Neovim plugin for integrating GitHub Copilot's AI-powered + code suggestions via Language Server Protocol (LSP). + + > [!NOTE] + > This plugin requires the `copilot-language-server`. + > Either enable through `copilot-lua` plugin or install manually. + ''; + + maintainers = [ lib.maintainers.khaneliman ]; + + settingsExample = { + nes = { + move_count_threshold = 5; + distance_threshold = 100; + reset_on_approaching = false; + }; + }; +} diff --git a/tests/test-sources/plugins/by-name/copilot-lsp/default.nix b/tests/test-sources/plugins/by-name/copilot-lsp/default.nix new file mode 100644 index 00000000..dedba221 --- /dev/null +++ b/tests/test-sources/plugins/by-name/copilot-lsp/default.nix @@ -0,0 +1,18 @@ +{ + empty = { + plugins.copilot-lsp.enable = true; + }; + + defaults = { + plugins.copilot-lsp = { + enable = true; + settings = { + move_count_threshold = 3; + distance_threshold = 40; + clear_on_large_distance = true; + count_horizontal_moves = true; + reset_on_approaching = true; + }; + }; + }; +}