From bd7d56290d0a8cf8e3b1d5f3cb272df62025866a Mon Sep 17 00:00:00 2001 From: justanothercatgirl Date: Sun, 10 Dec 2023 11:55:41 +0300 Subject: Tried to fix crates completion but failed --- .config/nvim/lua/user/plugins.lua | 107 +++++++++++++++++++++++++++++--------- 1 file changed, 81 insertions(+), 26 deletions(-) (limited to '.config/nvim/lua/user/plugins.lua') diff --git a/.config/nvim/lua/user/plugins.lua b/.config/nvim/lua/user/plugins.lua index 2e52200..57fcef1 100644 --- a/.config/nvim/lua/user/plugins.lua +++ b/.config/nvim/lua/user/plugins.lua @@ -2,39 +2,93 @@ -- plugins to be installed plugins = { - { "folke/lazy.nvim" }, -- plugin manager - -- "williamboman/mason.nvim", -- plugin manager for LSP - -- "williamboman/mason-lspconfig.nvim", -- mason add-ons for lspconfig + { "folke/lazy.nvim" }, -- plugin manager - { "nvim-lua/popup.nvim" }, -- some functions for other plugins - { "nvim-lua/plenary.nvim" }, -- some functions for other plugins - { "folke/which-key.nvim" }, -- pretty self-descriptive name + { "nvim-lua/popup.nvim" }, -- some functions for other plugins + { "nvim-lua/plenary.nvim" }, -- some functions for other plugins + { "folke/which-key.nvim" }, -- pretty self-descriptive name - { "rafi/awesome-vim-colorschemes" }, -- colorschemes - { "lunarvim/colorschemes" }, -- colorschemes - { "folke/tokyonight.nvim" }, -- colorschemes + { "rafi/awesome-vim-colorschemes" }, -- colorschemes + { "lunarvim/colorschemes" }, -- colorschemes + { "folke/tokyonight.nvim" }, -- colorschemes - { "tpope/vim-commentary" }, -- gc & gcc for commenting - { "tpope/vim-surround" }, -- replace quotes e.t.c - { "preservim/nerdtree" }, -- file explorer - { "nvim-treesitter/nvim-treesitter" }, -- folding code, advanced syntax highlighting & sitting on a tree - { "neovim/nvim-lspconfig" }, -- LSP configuration + { "tpope/vim-commentary" }, -- gc & gcc for commenting + { "preservim/nerdtree" }, -- file explorer + { + "windwp/nvim-autopairs", + event = { "InsertEnter" }, -- automatically pair brackets and quotes + + }, + { + "tpope/vim-surround", -- replace quotes e.t.c + event = { "InsertEnter" }, + }, + + + { + "nvim-treesitter/nvim-treesitter", -- folding code, advanced syntax highlighting & sitting on a tree + event = { "InsertEnter" }, + }, + { + "neovim/nvim-lspconfig", -- LSP configuration + event = { "InsertEnter" }, + }, - -- { "hrsh7th/vim-vsnip" }, -- snippet engine - { "L3MON4D3/LuaSnip" }, -- better snippet engine - { "saadparwaiz1/cmp_luasnip" }, -- for luasnip - { "rafamadriz/friendly-snippets" }, -- predefined snippets + + -- { "hrsh7th/vim-vsnip" }, -- snippet engine + { + "L3MON4D3/LuaSnip", -- better snippet engine + event = { "InsertEnter" }, + }, + { + "saadparwaiz1/cmp_luasnip", -- for luasnip + event = { "InsertEnter" }, + }, + { + "rafamadriz/friendly-snippets", -- predefined snippets + event = { "InsertEnter" }, + }, + -- Autocompletion framework - { "hrsh7th/nvim-cmp" }, -- the framework - { "hrsh7th/cmp-nvim-lua" }, -- lua config - { "hrsh7th/cmp-nvim-lsp-signature-help" }, -- ?????????? a monster - { "hrsh7th/cmp-nvim-lsp" }, -- LSP completion - { "hrsh7th/cmp-path" }, -- /mnt/D/media/audio_sync/term_download_mp3/HELLO_I_AM_EMU_OTORI.mp3 - { "hrsh7th/cmp-buffer" }, -- current buffer - { "hrsh7th/cmp-cmdline" }, -- command line tools - { "Saecki/crates.nvim" }, -- rust packages from crates.io + { + "hrsh7th/nvim-cmp", -- the framework + event = { "InsertEnter" }, + }, + { + "hrsh7th/cmp-nvim-lua", -- lua config + event = { "InsertEnter" }, + }, + { + "hrsh7th/cmp-nvim-lsp-signature-help", -- ?????????? a monsterature-help" + event = { "InsertEnter" }, + }, + { + "hrsh7th/cmp-nvim-lsp", -- LSP completion + event = { "InsertEnter" }, + }, + { + "hrsh7th/cmp-path", -- /mnt/D/media/audio_sync/term_download_mp3/HELLO_I_AM_EMU_OTORI.mp3 + event = { "InsertEnter" }, + }, + { + "hrsh7th/cmp-buffer", -- current buffer + event = { "InsertEnter" }, + }, + { + "hrsh7th/cmp-cmdline", -- command line tools + event = { "InsertEnter" }, + }, + { + "Saecki/crates.nvim", -- rust packages from crates.io + event = { "BufRead Cargo.toml" }, + setup = function() + require('crates').setup() + end, + }, + + --{ "lvimuser/lsp-inlayhints.nvim" } -- saved for the better times } @@ -63,3 +117,4 @@ lazy = require("lazy") lazy.setup(plugins, opts) -- lazy.load('nerdtree') + -- cgit v1.2.3-70-g09d2