├── LICENSE ├── README.md └── 完整配置代码 └── nvim ├── init.lua ├── lua ├── core │ ├── keymaps.lua │ └── options.lua └── plugins │ ├── autopairs.lua │ ├── bufferline.lua │ ├── cmp.lua │ ├── comment.lua │ ├── gitsigns.lua │ ├── lsp.lua │ ├── lualine.lua │ ├── nvim-tree.lua │ ├── plugins-setup.lua │ ├── telescope.lua │ └── treesitter.lua └── plugin └── packer_compiled.lua /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 dansoncut 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 从零配置Neovim - B站:技术蛋老师 2 | 3 | main分支为视频介绍的Packer插件管理配置 4 | lazy分支为Lazy插件管理配置 5 | -------------------------------------------------------------------------------- /完整配置代码/nvim/init.lua: -------------------------------------------------------------------------------- 1 | require("plugins.plugins-setup") 2 | 3 | require("core.options") 4 | require("core.keymaps") 5 | 6 | -- 插件 7 | require("plugins.lualine") 8 | require("plugins/nvim-tree") 9 | require("plugins/treesitter") 10 | require("plugins/lsp") 11 | require("plugins/cmp") 12 | require("plugins/comment") 13 | require("plugins/autopairs") 14 | require("plugins/bufferline") 15 | require("plugins/gitsigns") 16 | require("plugins/telescope") 17 | -------------------------------------------------------------------------------- /完整配置代码/nvim/lua/core/keymaps.lua: -------------------------------------------------------------------------------- 1 | vim.g.mapleader = " " 2 | 3 | local keymap = vim.keymap 4 | 5 | -- ---------- 插入模式 ---------- --- 6 | keymap.set("i", "jk", "") 7 | 8 | -- ---------- 视觉模式 ---------- --- 9 | -- 单行或多行移动 10 | keymap.set("v", "J", ":m '>+1gv=gv") 11 | keymap.set("v", "K", ":m '<-2gv=gv") 12 | 13 | -- ---------- 正常模式 ---------- --- 14 | -- 窗口 15 | keymap.set("n", "sv", "v") -- 水平新增窗口 16 | keymap.set("n", "sh", "s") -- 垂直新增窗口 17 | 18 | -- 取消高亮 19 | keymap.set("n", "nh", ":nohl") 20 | 21 | -- 切换buffer 22 | keymap.set("n", "", ":bnext") 23 | keymap.set("n", "", ":bprevious") 24 | 25 | -- ---------- 插件 ---------- --- 26 | -- nvim-tree 27 | keymap.set("n", "e", ":NvimTreeToggle") 28 | -------------------------------------------------------------------------------- /完整配置代码/nvim/lua/core/options.lua: -------------------------------------------------------------------------------- 1 | local opt = vim.opt 2 | 3 | -- 行号 4 | opt.relativenumber = true 5 | opt.number = true 6 | 7 | -- 缩进 8 | opt.tabstop = 2 9 | opt.shiftwidth = 2 10 | opt.expandtab = true 11 | opt.autoindent = true 12 | 13 | -- 防止包裹 14 | opt.wrap = false 15 | 16 | -- 光标行 17 | opt.cursorline = true 18 | 19 | -- 启用鼠标 20 | opt.mouse:append("a") 21 | 22 | -- 系统剪贴板 23 | opt.clipboard:append("unnamedplus") 24 | 25 | -- 默认新窗口右和下 26 | opt.splitright = true 27 | opt.splitbelow = true 28 | 29 | -- 搜索 30 | opt.ignorecase = true 31 | opt.smartcase = true 32 | 33 | -- 外观 34 | opt.termguicolors = true 35 | opt.signcolumn = "yes" 36 | vim.cmd[[colorscheme tokyonight-moon]] 37 | -------------------------------------------------------------------------------- /完整配置代码/nvim/lua/plugins/autopairs.lua: -------------------------------------------------------------------------------- 1 | local npairs_ok, npairs = pcall(require, "nvim-autopairs") 2 | if not npairs_ok then 3 | return 4 | end 5 | 6 | npairs.setup { 7 | check_ts = true, 8 | ts_config = { 9 | lua = { "string", "source" }, 10 | javascript = { "string", "template_string" }, 11 | }, 12 | fast_wrap = { 13 | map = '', 14 | chars = { '{', '[', '(', '"', "'" }, 15 | pattern = [=[[%'%"%)%>%]%)%}%,]]=], 16 | end_key = '$', 17 | keys = 'qwertyuiopzxcvbnmasdfghjkl', 18 | check_comma = true, 19 | highlight = 'Search', 20 | highlight_grey='Comment' 21 | }, 22 | } 23 | 24 | -- 配置这个使得自动补全会把括号带上 25 | 26 | local cmp_autopairs = require "nvim-autopairs.completion.cmp" 27 | local cmp_status_ok, cmp = pcall(require, "cmp") 28 | if not cmp_status_ok then 29 | return 30 | end 31 | cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done { map_char = { tex = "" } }) 32 | -------------------------------------------------------------------------------- /完整配置代码/nvim/lua/plugins/bufferline.lua: -------------------------------------------------------------------------------- 1 | vim.opt.termguicolors = true 2 | 3 | require("bufferline").setup { 4 | options = { 5 | -- 使用 nvim 内置lsp 6 | diagnostics = "nvim_lsp", 7 | -- 左侧让出 nvim-tree 的位置 8 | offsets = {{ 9 | filetype = "NvimTree", 10 | text = "File Explorer", 11 | highlight = "Directory", 12 | text_align = "left" 13 | }} 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /完整配置代码/nvim/lua/plugins/cmp.lua: -------------------------------------------------------------------------------- 1 | local cmp_status_ok, cmp = pcall(require, "cmp") 2 | if not cmp_status_ok then 3 | return 4 | end 5 | 6 | local snip_status_ok, luasnip = pcall(require, "luasnip") 7 | if not snip_status_ok then 8 | return 9 | end 10 | 11 | require("luasnip.loaders.from_vscode").lazy_load() 12 | 13 | -- 下面会用到这个函数 14 | local check_backspace = function() 15 | local col = vim.fn.col "." - 1 16 | return col == 0 or vim.fn.getline("."):sub(col, col):match "%s" 17 | end 18 | 19 | 20 | cmp.setup({ 21 | snippet = { 22 | expand = function(args) 23 | require('luasnip').lsp_expand(args.body) 24 | end, 25 | }, 26 | mapping = cmp.mapping.preset.insert({ 27 | [''] = cmp.mapping.scroll_docs(-4), 28 | [''] = cmp.mapping.scroll_docs(4), 29 | [''] = cmp.mapping.abort(), -- 取消补全,esc也可以退出 30 | [''] = cmp.mapping.confirm({ select = true }), 31 | 32 | [""] = cmp.mapping(function(fallback) 33 | if cmp.visible() then 34 | cmp.select_next_item() 35 | elseif luasnip.expandable() then 36 | luasnip.expand() 37 | elseif luasnip.expand_or_jumpable() then 38 | luasnip.expand_or_jump() 39 | elseif check_backspace() then 40 | fallback() 41 | else 42 | fallback() 43 | end 44 | end, { 45 | "i", 46 | "s", 47 | }), 48 | 49 | [""] = cmp.mapping(function(fallback) 50 | if cmp.visible() then 51 | cmp.select_prev_item() 52 | elseif luasnip.jumpable(-1) then 53 | luasnip.jump(-1) 54 | else 55 | fallback() 56 | end 57 | end, { 58 | "i", 59 | "s", 60 | }), 61 | }), 62 | 63 | -- 这里重要 64 | sources = cmp.config.sources({ 65 | { name = 'nvim_lsp' }, 66 | { name = 'luasnip' }, 67 | { name = 'path' }, 68 | }, { 69 | { name = 'buffer' }, 70 | }) 71 | }) 72 | -------------------------------------------------------------------------------- /完整配置代码/nvim/lua/plugins/comment.lua: -------------------------------------------------------------------------------- 1 | require('Comment').setup() 2 | -------------------------------------------------------------------------------- /完整配置代码/nvim/lua/plugins/gitsigns.lua: -------------------------------------------------------------------------------- 1 | require('gitsigns').setup { 2 | signs = { 3 | add = { text = '+' }, 4 | change = { text = '~' }, 5 | delete = { text = '_' }, 6 | topdelete = { text = '‾' }, 7 | changedelete = { text = '~' }, 8 | }, 9 | } 10 | -------------------------------------------------------------------------------- /完整配置代码/nvim/lua/plugins/lsp.lua: -------------------------------------------------------------------------------- 1 | require("mason").setup({ 2 | ui = { 3 | icons = { 4 | package_installed = "✓", 5 | package_pending = "➜", 6 | package_uninstalled = "✗" 7 | } 8 | } 9 | }) 10 | 11 | require("mason-lspconfig").setup({ 12 | -- 确保安装,根据需要填写 13 | ensure_installed = { 14 | "lua_ls", 15 | }, 16 | }) 17 | 18 | local capabilities = require('cmp_nvim_lsp').default_capabilities() 19 | 20 | require("lspconfig").lua_ls.setup { 21 | capabilities = capabilities, 22 | } 23 | -------------------------------------------------------------------------------- /完整配置代码/nvim/lua/plugins/lualine.lua: -------------------------------------------------------------------------------- 1 | require('lualine').setup({ 2 | options = { 3 | theme = 'tokyonight' 4 | } 5 | }) 6 | -------------------------------------------------------------------------------- /完整配置代码/nvim/lua/plugins/nvim-tree.lua: -------------------------------------------------------------------------------- 1 | -- 默认不开启nvim-tree 2 | vim.g.loaded_netrw = 1 3 | vim.g.loaded_netrwPlugin = 1 4 | 5 | require("nvim-tree").setup() 6 | -------------------------------------------------------------------------------- /完整配置代码/nvim/lua/plugins/plugins-setup.lua: -------------------------------------------------------------------------------- 1 | -- 自动安装packer 2 | local ensure_packer = function() 3 | local fn = vim.fn 4 | local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' 5 | if fn.empty(fn.glob(install_path)) > 0 then 6 | fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) 7 | vim.cmd [[packadd packer.nvim]] 8 | return true 9 | end 10 | return false 11 | end 12 | 13 | local packer_bootstrap = ensure_packer() 14 | 15 | -- 保存此文件自动更新安装软件 16 | -- 注意PackerCompile改成了PackerSync 17 | -- plugins.lua改成了plugins-setup.lua,适应本地文件名字 18 | vim.cmd([[ 19 | augroup packer_user_config 20 | autocmd! 21 | autocmd BufWritePost plugins-setup.lua source | PackerSync 22 | augroup end 23 | ]]) 24 | 25 | return require('packer').startup(function(use) 26 | use 'wbthomason/packer.nvim' 27 | use 'folke/tokyonight.nvim' -- 主题 28 | use { 29 | 'nvim-lualine/lualine.nvim', -- 状态栏 30 | requires = { 'kyazdani42/nvim-web-devicons', opt = true } -- 状态栏图标 31 | } 32 | use { 33 | 'nvim-tree/nvim-tree.lua', -- 文档树 34 | requires = { 35 | 'nvim-tree/nvim-web-devicons', -- 文档树图标 36 | } 37 | } 38 | use "christoomey/vim-tmux-navigator" -- 用ctl-hjkl来定位窗口 39 | use "nvim-treesitter/nvim-treesitter" -- 语法高亮 40 | use "p00f/nvim-ts-rainbow" -- 配合treesitter,不同括号颜色区分 41 | use { 42 | "williamboman/mason.nvim", 43 | "williamboman/mason-lspconfig.nvim", -- 这个相当于mason.nvim和lspconfig的桥梁 44 | "neovim/nvim-lspconfig" 45 | } 46 | -- 自动补全 47 | use "hrsh7th/nvim-cmp" 48 | use "hrsh7th/cmp-nvim-lsp" 49 | use "L3MON4D3/LuaSnip" -- snippets引擎,不装这个自动补全会出问题 50 | use "saadparwaiz1/cmp_luasnip" 51 | use "rafamadriz/friendly-snippets" 52 | use "hrsh7th/cmp-path" -- 文件路径 53 | 54 | use "numToStr/Comment.nvim" -- gcc和gc注释 55 | use "windwp/nvim-autopairs" -- 自动补全括号 56 | 57 | use "akinsho/bufferline.nvim" -- buffer分割线 58 | use "lewis6991/gitsigns.nvim" -- 左则git提示 59 | 60 | use { 61 | 'nvim-telescope/telescope.nvim', tag = '0.1.1', -- 文件检索 62 | requires = { {'nvim-lua/plenary.nvim'} } 63 | } 64 | 65 | if packer_bootstrap then 66 | require('packer').sync() 67 | end 68 | end) 69 | -------------------------------------------------------------------------------- /完整配置代码/nvim/lua/plugins/telescope.lua: -------------------------------------------------------------------------------- 1 | local builtin = require('telescope.builtin') 2 | 3 | -- 进入telescope页面会是插入模式,回到正常模式就可以用j和k来移动了 4 | 5 | vim.keymap.set('n', 'ff', builtin.find_files, {}) 6 | vim.keymap.set('n', 'fg', builtin.live_grep, {}) -- 环境里要安装ripgrep 7 | vim.keymap.set('n', 'fb', builtin.buffers, {}) 8 | vim.keymap.set('n', 'fh', builtin.help_tags, {}) 9 | -------------------------------------------------------------------------------- /完整配置代码/nvim/lua/plugins/treesitter.lua: -------------------------------------------------------------------------------- 1 | require'nvim-treesitter.configs'.setup { 2 | -- 添加不同语言 3 | ensure_installed = { "vim", "help", "bash", "c", "cpp", "javascript", "json", "lua", "python", "typescript", "tsx", "css", "rust", "markdown", "markdown_inline" }, -- one of "all" or a list of languages 4 | 5 | highlight = { enable = true }, 6 | indent = { enable = true }, 7 | 8 | -- 不同括号颜色区分 9 | rainbow = { 10 | enable = true, 11 | extended_mode = true, 12 | max_file_lines = nil, 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /完整配置代码/nvim/plugin/packer_compiled.lua: -------------------------------------------------------------------------------- 1 | -- Automatically generated packer.nvim plugin loader code 2 | 3 | if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then 4 | vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') 5 | return 6 | end 7 | 8 | vim.api.nvim_command('packadd packer.nvim') 9 | 10 | local no_errors, error_msg = pcall(function() 11 | 12 | _G._packer = _G._packer or {} 13 | _G._packer.inside_compile = true 14 | 15 | local time 16 | local profile_info 17 | local should_profile = false 18 | if should_profile then 19 | local hrtime = vim.loop.hrtime 20 | profile_info = {} 21 | time = function(chunk, start) 22 | if start then 23 | profile_info[chunk] = hrtime() 24 | else 25 | profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 26 | end 27 | end 28 | else 29 | time = function(chunk, start) end 30 | end 31 | 32 | local function save_profiles(threshold) 33 | local sorted_times = {} 34 | for chunk_name, time_taken in pairs(profile_info) do 35 | sorted_times[#sorted_times + 1] = {chunk_name, time_taken} 36 | end 37 | table.sort(sorted_times, function(a, b) return a[2] > b[2] end) 38 | local results = {} 39 | for i, elem in ipairs(sorted_times) do 40 | if not threshold or threshold and elem[2] > threshold then 41 | results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' 42 | end 43 | end 44 | if threshold then 45 | table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') 46 | end 47 | 48 | _G._packer.profile_output = results 49 | end 50 | 51 | time([[Luarocks path setup]], true) 52 | local package_path_str = "/root/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/root/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/root/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/root/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" 53 | local install_cpath_pattern = "/root/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" 54 | if not string.find(package.path, package_path_str, 1, true) then 55 | package.path = package.path .. ';' .. package_path_str 56 | end 57 | 58 | if not string.find(package.cpath, install_cpath_pattern, 1, true) then 59 | package.cpath = package.cpath .. ';' .. install_cpath_pattern 60 | end 61 | 62 | time([[Luarocks path setup]], false) 63 | time([[try_loadstring definition]], true) 64 | local function try_loadstring(s, component, name) 65 | local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) 66 | if not success then 67 | vim.schedule(function() 68 | vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) 69 | end) 70 | end 71 | return result 72 | end 73 | 74 | time([[try_loadstring definition]], false) 75 | time([[Defining packer_plugins]], true) 76 | _G.packer_plugins = { 77 | ["Comment.nvim"] = { 78 | loaded = true, 79 | path = "/root/.local/share/nvim/site/pack/packer/start/Comment.nvim", 80 | url = "https://github.com/numToStr/Comment.nvim" 81 | }, 82 | LuaSnip = { 83 | loaded = true, 84 | path = "/root/.local/share/nvim/site/pack/packer/start/LuaSnip", 85 | url = "https://github.com/L3MON4D3/LuaSnip" 86 | }, 87 | ["bufferline.nvim"] = { 88 | loaded = true, 89 | path = "/root/.local/share/nvim/site/pack/packer/start/bufferline.nvim", 90 | url = "https://github.com/akinsho/bufferline.nvim" 91 | }, 92 | ["cmp-nvim-lsp"] = { 93 | loaded = true, 94 | path = "/root/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", 95 | url = "https://github.com/hrsh7th/cmp-nvim-lsp" 96 | }, 97 | ["cmp-path"] = { 98 | loaded = true, 99 | path = "/root/.local/share/nvim/site/pack/packer/start/cmp-path", 100 | url = "https://github.com/hrsh7th/cmp-path" 101 | }, 102 | cmp_luasnip = { 103 | loaded = true, 104 | path = "/root/.local/share/nvim/site/pack/packer/start/cmp_luasnip", 105 | url = "https://github.com/saadparwaiz1/cmp_luasnip" 106 | }, 107 | ["friendly-snippets"] = { 108 | loaded = true, 109 | path = "/root/.local/share/nvim/site/pack/packer/start/friendly-snippets", 110 | url = "https://github.com/rafamadriz/friendly-snippets" 111 | }, 112 | ["gitsigns.nvim"] = { 113 | loaded = true, 114 | path = "/root/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", 115 | url = "https://github.com/lewis6991/gitsigns.nvim" 116 | }, 117 | ["lualine.nvim"] = { 118 | loaded = true, 119 | path = "/root/.local/share/nvim/site/pack/packer/start/lualine.nvim", 120 | url = "https://github.com/nvim-lualine/lualine.nvim" 121 | }, 122 | ["mason-lspconfig.nvim"] = { 123 | loaded = true, 124 | path = "/root/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim", 125 | url = "https://github.com/williamboman/mason-lspconfig.nvim" 126 | }, 127 | ["mason.nvim"] = { 128 | loaded = true, 129 | path = "/root/.local/share/nvim/site/pack/packer/start/mason.nvim", 130 | url = "https://github.com/williamboman/mason.nvim" 131 | }, 132 | ["nvim-autopairs"] = { 133 | loaded = true, 134 | path = "/root/.local/share/nvim/site/pack/packer/start/nvim-autopairs", 135 | url = "https://github.com/windwp/nvim-autopairs" 136 | }, 137 | ["nvim-cmp"] = { 138 | loaded = true, 139 | path = "/root/.local/share/nvim/site/pack/packer/start/nvim-cmp", 140 | url = "https://github.com/hrsh7th/nvim-cmp" 141 | }, 142 | ["nvim-lspconfig"] = { 143 | loaded = true, 144 | path = "/root/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", 145 | url = "https://github.com/neovim/nvim-lspconfig" 146 | }, 147 | ["nvim-tree.lua"] = { 148 | loaded = true, 149 | path = "/root/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", 150 | url = "https://github.com/nvim-tree/nvim-tree.lua" 151 | }, 152 | ["nvim-treesitter"] = { 153 | loaded = true, 154 | path = "/root/.local/share/nvim/site/pack/packer/start/nvim-treesitter", 155 | url = "https://github.com/nvim-treesitter/nvim-treesitter" 156 | }, 157 | ["nvim-ts-rainbow"] = { 158 | loaded = true, 159 | path = "/root/.local/share/nvim/site/pack/packer/start/nvim-ts-rainbow", 160 | url = "https://github.com/p00f/nvim-ts-rainbow" 161 | }, 162 | ["nvim-web-devicons"] = { 163 | loaded = false, 164 | needs_bufread = false, 165 | path = "/root/.local/share/nvim/site/pack/packer/opt/nvim-web-devicons", 166 | url = "https://github.com/kyazdani42/nvim-web-devicons" 167 | }, 168 | ["packer.nvim"] = { 169 | loaded = true, 170 | path = "/root/.local/share/nvim/site/pack/packer/start/packer.nvim", 171 | url = "https://github.com/wbthomason/packer.nvim" 172 | }, 173 | ["plenary.nvim"] = { 174 | loaded = true, 175 | path = "/root/.local/share/nvim/site/pack/packer/start/plenary.nvim", 176 | url = "https://github.com/nvim-lua/plenary.nvim" 177 | }, 178 | ["telescope.nvim"] = { 179 | loaded = true, 180 | path = "/root/.local/share/nvim/site/pack/packer/start/telescope.nvim", 181 | url = "https://github.com/nvim-telescope/telescope.nvim" 182 | }, 183 | ["tokyonight.nvim"] = { 184 | loaded = true, 185 | path = "/root/.local/share/nvim/site/pack/packer/start/tokyonight.nvim", 186 | url = "https://github.com/folke/tokyonight.nvim" 187 | }, 188 | ["vim-tmux-navigator"] = { 189 | loaded = true, 190 | path = "/root/.local/share/nvim/site/pack/packer/start/vim-tmux-navigator", 191 | url = "https://github.com/christoomey/vim-tmux-navigator" 192 | } 193 | } 194 | 195 | time([[Defining packer_plugins]], false) 196 | 197 | _G._packer.inside_compile = false 198 | if _G._packer.needs_bufread == true then 199 | vim.cmd("doautocmd BufRead") 200 | end 201 | _G._packer.needs_bufread = false 202 | 203 | if should_profile then save_profiles() end 204 | 205 | end) 206 | 207 | if not no_errors then 208 | error_msg = error_msg:gsub('"', '\\"') 209 | vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None') 210 | end 211 | --------------------------------------------------------------------------------