From 864912a6c28548b7875bf8f0cd17974e50fde1f6 Mon Sep 17 00:00:00 2001 From: read-docs Date: Sat, 27 Dec 2025 13:01:30 +0100 Subject: [PATCH] added copilot --- init.lua | 8 +++++++- lua/custom/plugins/copilot-cmp.lua | 3 +++ lua/custom/plugins/copilot.lua | 23 +++++++++++++++++++++++ lua/custom/plugins/markdown-render.lua | 9 --------- lua/custom/plugins/markview.lua | 7 +++++++ lua/custom/plugins/store.lua | 6 ++++++ lua/custom/plugins/typst.lua | 6 ++++++ 7 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 lua/custom/plugins/copilot-cmp.lua create mode 100644 lua/custom/plugins/copilot.lua delete mode 100644 lua/custom/plugins/markdown-render.lua create mode 100644 lua/custom/plugins/markview.lua create mode 100644 lua/custom/plugins/store.lua create mode 100644 lua/custom/plugins/typst.lua diff --git a/init.lua b/init.lua index a14adfe3..e34a5ea4 100644 --- a/init.lua +++ b/init.lua @@ -878,8 +878,14 @@ require('lazy').setup({ }, sources = { - default = { 'lsp', 'path', 'snippets', 'lazydev' }, + default = { 'lsp', 'path', 'snippets', 'lazydev', 'copilot' }, providers = { + copilot = { + name = 'copilot', + module = 'blink-cmp-copilot', + score_offset = 100, + async = true, + }, lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 }, }, }, diff --git a/lua/custom/plugins/copilot-cmp.lua b/lua/custom/plugins/copilot-cmp.lua new file mode 100644 index 00000000..4d8572c2 --- /dev/null +++ b/lua/custom/plugins/copilot-cmp.lua @@ -0,0 +1,3 @@ +return { + 'giuxtaposition/blink-cmp-copilot', +} diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua new file mode 100644 index 00000000..45334e5f --- /dev/null +++ b/lua/custom/plugins/copilot.lua @@ -0,0 +1,23 @@ +return { + 'zbirenbaum/copilot.lua', + requires = { + 'giuxtaposition/blink-cmp-copilot', + init = function() + vim.g.copilot_nes_debounce = 500 + end, + }, + cmd = 'Copilot', + event = 'InsertEnter', + config = function() + require('copilot').setup { + nes = { + enabled = true, + keymap = { + accept_and_goto = 'p', + accept = false, + dismiss = '', + }, + }, + } + end, +} diff --git a/lua/custom/plugins/markdown-render.lua b/lua/custom/plugins/markdown-render.lua deleted file mode 100644 index 0b649fcc..00000000 --- a/lua/custom/plugins/markdown-render.lua +++ /dev/null @@ -1,9 +0,0 @@ -return { - 'MeanderingProgrammer/render-markdown.nvim', - dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.nvim' }, -- if you use the mini.nvim suite - -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-mini/mini.icons' }, -- if you use standalone mini plugins - -- dependencies = { 'nvim-treesitter/nvim-treesitter', 'nvim-tree/nvim-web-devicons' }, -- if you prefer nvim-web-devicons - ---@module 'render-markdown' - ---@type render.md.UserConfig - opts = {}, -} diff --git a/lua/custom/plugins/markview.lua b/lua/custom/plugins/markview.lua new file mode 100644 index 00000000..7c7040f5 --- /dev/null +++ b/lua/custom/plugins/markview.lua @@ -0,0 +1,7 @@ +return { + 'OXY2DEV/markview.nvim', + lazy = false, + + -- Completion for `blink.cmp` + dependencies = { 'saghen/blink.cmp' }, +} diff --git a/lua/custom/plugins/store.lua b/lua/custom/plugins/store.lua new file mode 100644 index 00000000..cd92f5e3 --- /dev/null +++ b/lua/custom/plugins/store.lua @@ -0,0 +1,6 @@ +return { + 'alex-popov-tech/store.nvim', + dependencies = { 'OXY2DEV/markview.nvim' }, + opts = {}, + cmd = 'Store', +} diff --git a/lua/custom/plugins/typst.lua b/lua/custom/plugins/typst.lua new file mode 100644 index 00000000..6f65f736 --- /dev/null +++ b/lua/custom/plugins/typst.lua @@ -0,0 +1,6 @@ +return { + 'chomosuke/typst-preview.nvim', + lazy = false, -- or ft = 'typst' + version = '1.*', + opts = {}, -- lazy.nvim will implicitly calls `setup {}` +}