diff --git a/lazy-lock.json b/lazy-lock.json index 366b5db..5b2ca4a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,10 +1,10 @@ { - "AstroNvim": { "branch": "main", "commit": "259212b3f7d3eb0ede6add0ab2df099c8e5981df" }, + "AstroNvim": { "branch": "main", "commit": "e2c4d250730da01a94177f94fcc2797036cdb051" }, "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, "aerial.nvim": { "branch": "master", "commit": "1160fb7a15a34b03b7381d95d45560712b5f19d0" }, "alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" }, - "astrocommunity": { "branch": "main", "commit": "8823b1cf73a0ee79e19c09e6ccf3ae6f898de67d" }, + "astrocommunity": { "branch": "main", "commit": "532a545db91bbc63be038fee99cf2666cc3b6350" }, "astrocore": { "branch": "main", "commit": "0fcaac66d115948605c14eaf45a41d3923eaafeb" }, "astrolsp": { "branch": "main", "commit": "2f6b0a4059775a1dac011d2944dd41fd4a8fe7a8" }, "astrotheme": { "branch": "main", "commit": "41b7d8430a55fd771e41bd763af4c3fd1c2fc0b5" }, @@ -37,7 +37,7 @@ "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, "lsp_signature.nvim": { "branch": "master", "commit": "a38da0a61c172bb59e34befc12efe48359884793" }, "lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" }, - "luvit-meta": { "branch": "main", "commit": "55709f183b0742a7e4f47688c284f81148ad4dc0" }, + "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "markview.nvim": { "branch": "main", "commit": "6e9f1840ba33e5318285ad97c22676f55b753479" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "97d9f1d3ad205dece6bcafd1d71cf1507608f3c7" }, @@ -45,35 +45,35 @@ "mason-nvim-dap.nvim": { "branch": "main", "commit": "8b9363d83b5d779813cdd2819b8308651cec2a09" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "mini.bufremove": { "branch": "main", "commit": "1ee294a97e091d3cf967974df622c0d887890dc2" }, - "mini.icons": { "branch": "main", "commit": "1c79feb7478ca773fa3dac5cadf43ced9180e861" }, - "mini.indentscope": { "branch": "main", "commit": "da9af64649e114aa79480c238fd23f6524bc0903" }, + "mini.icons": { "branch": "main", "commit": "910db5df9724d65371182948f921fce23c2c881e" }, + "mini.indentscope": { "branch": "main", "commit": "613df2830d7faeae7483ba2e736683154b95921e" }, "mini.move": { "branch": "main", "commit": "4caa1c212f5ca3d1633d21cfb184808090ed74b1" }, "mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" }, "monokai-pro.nvim": { "branch": "master", "commit": "4f4133601296881bb2197800bd68d2bba9eaadb9" }, "multiple-cursors.nvim": { "branch": "main", "commit": "2f5e786c43aa9c0fc34b295cfcc9bfbacef8e926" }, "neo-tree.nvim": { "branch": "main", "commit": "e6645ecfcba3e064446a6def1c10d788c9873f51" }, - "neoconf.nvim": { "branch": "main", "commit": "c2ea8f71098add9e56771c318fa8423f89bfb6c1" }, + "neoconf.nvim": { "branch": "main", "commit": "9aefba9244a9cfd42c665e5b5dab7ac8594968a5" }, "noice.nvim": { "branch": "main", "commit": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f" }, "none-ls-extras.nvim": { "branch": "main", "commit": "6557f20e631d2e9b2a9fd27a5c045d701a3a292c" }, - "none-ls.nvim": { "branch": "main", "commit": "7bebb35a05871aeb99825f29d869cbd9a46bdbba" }, + "none-ls.nvim": { "branch": "main", "commit": "eec6019d95353f1706bff07ab4698354d09fe062" }, "nui.nvim": { "branch": "main", "commit": "a0fd35fcbb4cb479366f1dc5f20145fd718a3733" }, "nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" }, "nvim-cmp": { "branch": "main", "commit": "8c82d0bd31299dbff7f8e780f5e06d2283de9678" }, - "nvim-dap": { "branch": "master", "commit": "b768c8d0ce6da614ac17ed097bf2d94e35fe1a58" }, - "nvim-dap-ui": { "branch": "master", "commit": "e94d98649dccb6a3884b66aabc2e07beb279e535" }, + "nvim-dap": { "branch": "master", "commit": "99807078c5089ed30e0547aa4b52c5867933f426" }, + "nvim-dap-ui": { "branch": "master", "commit": "727c032a8f63899baccb42a1c26f27687e62fc5e" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" }, "nvim-highlight-colors": { "branch": "main", "commit": "68a4df620cf58e2c7336e53738e8cf3a522ad694" }, "nvim-lsp-endhints": { "branch": "main", "commit": "a449f2f27b6b985ff216964572224ce432d94a86" }, - "nvim-lspconfig": { "branch": "master", "commit": "88157521e890fe7fdf18bee22438875edd6300a6" }, + "nvim-lspconfig": { "branch": "master", "commit": "04e8eb54eb6f70cd367ae58fdafb2ce05b2650ee" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, "nvim-notify": { "branch": "master", "commit": "a3020c2cf4dfc4c4f390c4a21e84e35e46cf5d17" }, "nvim-spider": { "branch": "main", "commit": "2b38e3e95e143313d78ca098eeecda7aebfce925" }, - "nvim-treesitter": { "branch": "master", "commit": "8ca76960ae75e0a3bb231402558eb50e79433161" }, + "nvim-treesitter": { "branch": "master", "commit": "dc9bf52c1f8b9abae0c10e0192baea2e720472ef" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, "nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" }, "nvim-ufo": { "branch": "main", "commit": "a5390706f510d39951dd581f6d2a972741b3fa26" }, - "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "plenary.nvim": { "branch": "master", "commit": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" }, "promise-async": { "branch": "main", "commit": "38a4575da9497326badd3995e768b4ccf0bb153e" }, "rainbow-delimiters.nvim": { "branch": "master", "commit": "85b80abaa09cbbc039e3095b2f515b3cf8cadd11" }, "resession.nvim": { "branch": "master", "commit": "cc819b0489938d03e4f3532a583354f0287c015b" }, @@ -83,7 +83,7 @@ "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "transparent.nvim": { "branch": "main", "commit": "8a2749a2fa74f97fe6557f61b89ac7fd873f3c21" }, "treesj": { "branch": "main", "commit": "ec234a9a13d61a7b95900abdb02fabaea1afd9f3" }, - "trouble.nvim": { "branch": "main", "commit": "46cf952fc115f4c2b98d4e208ed1e2dce08c9bf6" }, + "trouble.nvim": { "branch": "main", "commit": "50481f414bd3c1a40122c1d759d7e424d5fafe84" }, "ultimate-autopair.nvim": { "branch": "v0.6", "commit": "9e3209190c22953566ae4e6436ad2b4ff4dabb95" }, "vim-illuminate": { "branch": "master", "commit": "5eeb7951fc630682c322e88a9bbdae5c224ff0aa" }, "vim-visual-multi": { "branch": "master", "commit": "a6975e7c1ee157615bbc80fc25e4392f71c344d4" }, diff --git a/lua/plugins/cmp.lua b/lua/plugins/cmp.lua index fa0323a..0ceac7c 100644 --- a/lua/plugins/cmp.lua +++ b/lua/plugins/cmp.lua @@ -6,13 +6,22 @@ return { }, }, { - "github/copilot.vim", + "hrsh7th/cmp-cmdline", + event = "CmdlineEnter", }, { - "hrsh7th/cmp-cmdline", + "github/copilot.vim", + event = "BufRead", }, { "hrsh7th/nvim-cmp", + event = "VimEnter", + depedencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "saadparwaiz1/cmp_luasnip", + }, opts = function(_, opts) local cmp = require "cmp" local luasnip = require "luasnip" @@ -22,37 +31,48 @@ return { return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match "%s" == nil end - -- `/` cmdline setup. - cmp.setup.cmdline("/", { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = "buffer" }, - }, - }) + cmp.config.sources { + { name = "nvim_lsp", priority = 1000 }, + { name = "luasnip", priority = 900 }, + { name = "cmdline", priority = 800 }, + { name = "buffer", priority = 500 }, + { name = "path", priority = 250 }, + } -- `:` cmdline setup. cmp.setup.cmdline(":", { - mapping = cmp.mapping.preset.cmdline(), + mapping = cmp.mapping.preset.cmdline { + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.confirm { select = true } + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("", true, true, true), "n", true) + else + fallback() + end + end, { "i", "c" }), + }, sources = cmp.config.sources({ { name = "path" }, }, { { name = "cmdline", option = { - ignore_cmds = { "Man", "!" }, + -- code for me options for processing command when press enter + + ignore_cmds = { + "q", + "qa", + "qall", + "quitall", + "quit", + "wall", + "wq", + }, }, }, }), }) - cmp.setup.filetype("python", { - sources = cmp.config.sources { - { name = "nvim_lsp", priority = 1000 }, - { name = "buffer", priority = 500 }, - { name = "path", priority = 250 }, - }, - }) - return require("astrocore").extend_tbl(opts, { -- Configure window style window = { @@ -106,14 +126,15 @@ return { fallback() end end, { "i", "s" }), - [""] = cmp.mapping(function(fallback) - -- Check if Copilot is suggesting something - if vim.fn["copilot#Accept"]() ~= "" then - vim.api.nvim_set_keymap("i", "", "copilot#Accept(“”)", { expr = true, silent = true }) - else - fallback() -- If no suggestion, fallback to default behavior - end - end, { "i", "s" }), -- Enable in insert and command-line mode + + -- [""] = cmp.mapping(function(fallback) + -- -- Check if Copilot is suggesting something + -- if vim.fn["copilot#Accept"]() ~= "" then + -- vim.api.nvim_set_keymap("i", "", "copilot#Accept('')", { expr = true, silent = true }) + -- else + -- fallback() -- If no suggestion, fallback to default behavior + -- end + -- end, { "i", "s" }), -- Enable in insert and command-line mode }, experimental = { ghost_text = false, -- this feature conflict with copilot.vim's preview. diff --git a/lua/plugins/disabled.lua b/lua/plugins/disabled.lua index f9e9a41..62f3428 100644 --- a/lua/plugins/disabled.lua +++ b/lua/plugins/disabled.lua @@ -35,10 +35,10 @@ return { { "nvim-neo-tree/neo-tree.nvim", enabled = true }, { "folke/flash.nvim", enabled = true }, { "github/copilot.vim", enabled = true }, + { "rafamadriz/friendly-snippets", enabled = false }, { "JoosepAlviste/nvim-ts-context-commentstring", enabled = false }, - { "windwp/nvim-ts-autotag", enabled = true }, - + { "windwp/nvim-ts-autotag", enabled = false}, } -- if true then return {} end