diff --git a/README.md b/README.md index e0e2efe..782423f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # My [AstroNvim](https://github.com/AstroNvim/AstroNvim) config -## How to install my config on merlin +## How to install my config on merli - First you have to install AstroNvim - Backup your previous nvim config diff --git a/init.lua b/init.lua index c276592..2eac822 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 @@ -272,7 +275,7 @@ local config = { -- [""] = false, }, i = { - [""] = { "copilot#Accept('')", silent = true, expr = true }, + -- [""] = { "copilot#Accept('')", silent = true, expr = true }, } }, @@ -293,23 +296,23 @@ local config = { -- end, -- }, -- - -- { "github/copilot.vim" }, + { + "folke/todo-comments.nvim", + event = "BufRead", + config = function() + require("todo-comments").setup() + end, + }, + { "github/copilot.vim" }, { "puremourning/vimspector" }, { "lervag/vimtex" }, - -- { "normen/vim-pio" }, - -- { - -- "iamcco/markdown-preview.nvim", - -- run = function() vim.fn["mkdp#util#install"]() end, - -- }, { "Pocco81/auto-save.nvim", config = function() require("auto-save").setup() end, }, - -- { "weirongxu/plantuml-previewer.vim" }, { "aklt/plantuml-syntax" }, - -- { "tyru/open-browser.vim" }, -- We also support a key value style plugin definition similar to NvChad: -- ["ray-x/lsp_signature.nvim"] = { @@ -318,12 +321,6 @@ local config = { -- require("lsp_signature").setup() -- end, -- }, - -- ["weirongxu/plantuml-previewer.vim"] = { - -- requires = { {"aklt/plantuml-syntax"} }, - -- -- depends = "aklt/plantuml-syntax", - -- requires = { {"tyru/open-browser.vim"} }, - -- -- depends = "tyru/open-browser.vim", - -- }, }, -- All other entries override the require("").setup({...}) call for default plugins 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. + } +}