From b6bc4d71a9cc32dd56a88ecdbc00948b97a7165d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Tue, 25 Oct 2022 21:41:18 +0200 Subject: [PATCH 1/3] Add section for merlin --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e158509..ae91ebc 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # My [AstroNvim](https://github.com/AstroNvim/AstroNvim) config +## README for the merlin server at FIT VUT can be found [here](https://github.com/jiriks74/astronvim_config/tree/merlin) + ## How to install my config - First you have to install AstroNvim -- 2.45.2 From eac04f8fca3830c636b960951508d0c598d578df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Fri, 28 Oct 2022 21:31:12 +0200 Subject: [PATCH 2/3] Add todo-comments.nvim plugin --- init.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/init.lua b/init.lua index e5fec66..bc34760 100644 --- a/init.lua +++ b/init.lua @@ -292,6 +292,13 @@ local config = { -- end, -- }, -- + { + "folke/todo-comments.nvim", + event = "BufRead", + config = function() + require("todo-comments").setup() + end, + }, { "github/copilot.vim" }, { "puremourning/vimspector" }, { "lervag/vimtex" }, -- 2.45.2 From e6d978fc38fd74b5bfa54d1057f0579fc146c615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Sat, 29 Oct 2022 23:55:17 +0200 Subject: [PATCH 3/3] Make copilot work with cmp --- init.lua | 7 +++++-- plugins/cmp.lua | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 plugins/cmp.lua diff --git a/init.lua b/init.lua index bc34760..c766ca3 100644 --- a/init.lua +++ b/init.lua @@ -1,3 +1,6 @@ +local cmp = require('cmp') +-- Never gonna give you up +-- Never gonna -- AstroNvim Configuration Table -- All configuration changes should go inside of the table below @@ -271,7 +274,7 @@ local config = { -- [""] = false, }, i = { - [""] = { "copilot#Accept('')", silent = true, expr = true }, + -- [""] = { "copilot#Accept('')", silent = true, expr = true }, } }, @@ -292,7 +295,7 @@ local config = { -- end, -- }, -- - { + { "folke/todo-comments.nvim", event = "BufRead", config = function() diff --git a/plugins/cmp.lua b/plugins/cmp.lua new file mode 100644 index 0000000..b247eed --- /dev/null +++ b/plugins/cmp.lua @@ -0,0 +1,25 @@ +local cmp = require "cmp" +local luasnip = require "luasnip" +return { + preselect = cmp.PreselectMode.None, + mapping = { + [""] = cmp.mapping.confirm { select = false }, + [""] = cmp.mapping(function(fallback) + vim.api.nvim_feedkeys(vim.fn['copilot#Accept'](vim.api.nvim_replace_termcodes('', true, true, true)), 'n', + true) + end) + -- if luasnip.expandable() then + -- luasnip.expand() + -- elseif luasnip.expand_or_jumpable() then + -- luasnip.expand_or_jump() + -- fallback() + -- end + -- end, { + -- "i", + -- "s", + -- }), + }, + experimental = { + ghost_text = false -- this feature conflict with copilot.vim's preview. + } +} -- 2.45.2