initial commit

This commit is contained in:
2022-04-14 15:33:17 +08:00
commit 01a16a70ab
15 changed files with 665 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
# My Neovim Config
## Plugins
* [packer.nvim](https://github.com/wbthomason/packer.nvim)
* [auto-pairs](https://github.com/jiangmiao/auto-pairs)
* [better-escape.nvim](https://github.com/max397574/better-escape.nvim)
* [hrsh7th/nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
* [ewis6991/gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim)
* [williamboman/nvim-lsp-installer](https://github.com/williamboman/nvim-lsp-installer)
* [rcarriga/nvim-notify](https://github.com/rcarriga/nvim-notify)
* [kyazdani42/nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua)
* [nvim-telescope/telescope.nvim](https://github.com/nvim-telescope/telescope.nvim)
## Themes
* [catppuccin/nvim](https://github.com/catppuccin/nvim)
* [folke/tokyonight.nvim](https://github.com/folke/tokyonight.nvim)
## TODOs
- [x] LSP
- [x] 调整配置文件缩进
- [ ] Telescope 选择主题配色
- [ ] Notify 配置
- [ ] Packer Plugins 懒加载
- [x] CMP snip换行后tab数量问题
- [x] CMP command 不区分大小写
- [ ] CMP document border
- [x] CMP highlight 首个
- [x] CMP ghost
- [ ] CMP 函数自动加括号
- [x] LSP 放在 CMP sources 最前面
- [ ] Autopairs 配置
- [ ] 注释插件
- [ ] shift 块后保持选择
+15
View File
@@ -0,0 +1,15 @@
require 'configs.options'
require 'configs.keymaps'
require 'configs.plugins.packer'
-- Plugins settings
require 'configs.plugins.themes'
require 'configs.plugins.cmp'
require 'configs.plugins.lsp_installer'
require 'configs.plugins.better_escape'
require 'configs.plugins.autopairs'
require 'configs.plugins.gitsigns'
require 'configs.plugins.nvimtree'
-- require 'plugins.notify'
+44
View File
@@ -0,0 +1,44 @@
local opts = {
noremap = true,
silent = true
}
vim.api.nvim_set_keymap('', '<Space>', '<Nop>', opts)
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- Moving line
-- == re-indents the line to suit its new position
-- gc reselects the last visual block
-- = re-indents the block
vim.api.nvim_set_keymap('n', '<A-j>', ':m .+1<CR>==', opts)
vim.api.nvim_set_keymap('n', '<A-k>', ':m .-2<CR>==', opts)
vim.api.nvim_set_keymap('i', '<A-j>', '<Esc>:m .+1<CR>==gi', opts)
vim.api.nvim_set_keymap('i', '<A-k>', '<Esc>:m .-2<CR>==gi', opts)
vim.api.nvim_set_keymap('v', '<A-j>', ":m '>+1<CR>gv=gv", opts)
vim.api.nvim_set_keymap('v', '<A-k>', ":m '<-2<CR>gv=gv", opts)
-- Navigating window
vim.api.nvim_set_keymap('n', '<C-h>', '<C-w>h', opts)
vim.api.nvim_set_keymap('n', '<C-j>', '<C-w>j', opts)
vim.api.nvim_set_keymap('n', '<C-k>', '<C-w>k', opts)
vim.api.nvim_set_keymap('n', '<C-l>', '<C-w>l', opts)
-- Keymaps for NvimTree
vim.api.nvim_set_keymap('n', '<C-n>', ':NvimTreeFindFileToggle <CR>', opts)
-- Keymaps for Telescope
vim.api.nvim_set_keymap('n', '<leader>ff', ':Telescope find_files <CR>', opts)
vim.api.nvim_set_keymap('n', '<leader>fg', ':Telescope live_grep <CR>', opts)
vim.api.nvim_set_keymap('n', '<leader>fb', ':Telescope buffers <CR>', opts)
vim.api.nvim_set_keymap('n', '<leader>fh', ':Telescope help_tags <CR>', opts)
-- Keymaps for LSP
-- Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
vim.api.nvim_set_keymap('n', '<space>e', '<cmd>lua vim.diagnostic.open_float()<CR>', opts)
vim.api.nvim_set_keymap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<CR>', opts)
vim.api.nvim_set_keymap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<CR>', opts)
vim.api.nvim_set_keymap('n', '<space>q', '<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
+28
View File
@@ -0,0 +1,28 @@
vim.opt.clipboard = 'unnamedplus'
vim.opt.number = true
vim.opt.numberwidth = 2
vim.opt.wrap = false
vim.opt.fileencoding = 'utf-8'
vim.opt.mouse = 'a'
vim.opt.updatetime = 250
vim.opt.timeoutlen = 400
vim.opt.smartcase = true
vim.opt.ignorecase = true
vim.opt.wildignorecase = true
vim.opt.wildmenu = false
vim.opt.smartindent = true
vim.opt.smarttab = true
vim.opt.expandtab = true
vim.opt.tabstop = 4
vim.opt.softtabstop = 4
vim.opt.shiftwidth = 4
vim.opt.termguicolors = true
vim.opt.splitbelow = true
vim.opt.splitright = true
vim.opt.completeopt = 'menu,menuone,noinsert'
+7
View File
@@ -0,0 +1,7 @@
local present, autopairs = pcall(require, "nvim-autopairs")
if not present then
return
end
autopairs.setup()
+10
View File
@@ -0,0 +1,10 @@
local present, escape = pcall(require, 'better_escape')
if not present then
print "no escape"
return
end
escape.setup({
mapping = {'jk'},
})
+153
View File
@@ -0,0 +1,153 @@
local present_cmp, cmp = pcall(require, 'cmp')
if not present_cmp then
print 'no cmp'
return
end
local present_lua, luasnip = pcall(require, 'luasnip')
if not present_lua then
print 'no luasnip'
return
end
require("luasnip.loaders.from_vscode").lazy_load()
local kind_icons = {
Text = "",
Method = "",
Function = "",
Constructor = "",
Field = "",
Variable = "",
Class = "ﴯ",
Interface = "",
Module = "",
Property = "ﰠ",
Unit = "",
Value = "",
Enum = "",
Keyword = "",
Snippet = "",
Color = "",
File = "",
Reference = "",
Folder = "",
EnumMember = "",
Constant = "",
Struct = "",
Event = "",
Operator = "",
TypeParameter = ""
}
cmp.setup({
snippet = {
-- REQUIRED - you must specify a snippet engine
expand = function(args)
-- vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users.
luasnip.lsp_expand(args.body)
-- require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
-- require('snippy').expand_snippet(args.body) -- For `snippy` users.
-- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
end
},
formatting = {
fields = {'kind', 'abbr', 'menu'},
format = function(entry, vim_item)
vim_item.abbr = string.format('%s', vim_item.abbr)
vim_item.kind = string.format('%s', kind_icons[vim_item.kind])
vim_item.menu = ({
nvim_lsp = '[LSP]',
luasnip = '[Snippet]',
buffer = '[BUF]',
path = '[Path]'
})[entry.source.name]
return vim_item
end
},
mapping = {
['<C-k>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item({
-- Select but noinsert
behavior = cmp.SelectBehavior.Select
})
else
fallback()
end
end, {'i', 'c'}),
['<C-j>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item({
behavior = cmp.SelectBehavior.Select
})
else
fallback()
end
end, {'i', 'c'}),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), {'i', 'c'}), -- d
['<C-e>'] = cmp.mapping({
i = cmp.mapping.abort(),
c = cmp.mapping.close()
}),
['<CR>'] = cmp.mapping(function (fallback)
if cmp.visible() then
cmp.confirm()
else
fallback()
end
end, {'i', 'c'}),
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.confirm({
select = true
})
elseif luasnip.expand_or_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, {'i', 'c'}),
['<S-Tab>'] = cmp.mapping(function(fallback)
if luasnip.jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, {'i', 's'})
},
completion = {
-- Highlight first item
completeopt = 'menu,menuone,noinsert'
},
experimental = {
-- ghost_text = true
},
sources = {{
name = 'nvim_lsp'
}, {
name = 'luasnip'
}, {
name = 'buffer'
}, {
name = 'path'
}, {
name = 'cmdline'
}}
})
require'cmp'.setup.cmdline(':', {
sources = {{
name = 'cmdline'
}}
})
require'cmp'.setup.cmdline('/', {
sources = {{
name = 'buffer'
}}
})
+8
View File
@@ -0,0 +1,8 @@
local present, gitsigns = pcall(require, "gitsigns")
if not present then
print "no gitsigns"
return
end
gitsigns.setup()
+72
View File
@@ -0,0 +1,72 @@
local present, lsp_installer = pcall(require, 'nvim-lsp-installer')
if not present then
print 'no lsp installer'
return
end
-- Use an on_attach function to only map the following keys
-- after the language server attaches to the current buffer
local on_attach = function(client, bufnr)
local opts = {
noremap = true,
silent = true
}
-- Enable completion triggered by <c-x><c-o>
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
-- Mappings.
-- See `:help vim.lsp.*` for documentation on any of the below functions
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>wl',
'<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
vim.api.nvim_buf_set_keymap(bufnr, 'n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
end
-- Register a handler that will be called for each installed server when it's ready (i.e. when installation is finished
-- or if the server is already installed).
lsp_installer.on_server_ready(function(server)
local opts = {
on_attach = on_attach,
flags = {
-- This will be the default in neovim 0.7+
debounce_text_changes = 150
},
capabilities = require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol.make_client_capabilities()),
}
if server.name == 'sumneko_lua' then
local sumneko_lua_opts = require('configs.plugins.lsp_settings.sumneko_lua')
opts.settings = sumneko_lua_opts
end
-- (optional) Customize the options passed to the server
-- if server.name == "tsserver" then
-- opts.root_dir = function() ... end
-- end
-- This setup() function will take the provided server configuration and decorate it with the necessary properties
-- before passing it onwards to lspconfig.
-- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
server:setup(opts)
end)
lsp_installer.settings({
ui = {
icons = {
server_installed = "✓",
server_pending = "➜",
server_uninstalled = "✗"
}
}
})
@@ -0,0 +1,7 @@
return {
Lua = {
diagnostics = {
globals = { "vim" },
},
}
}
+9
View File
@@ -0,0 +1,9 @@
local present, notify = pcall(requird, 'notify')
if not present then
print 'no notify'
return
end
vim.notify = notify
notify.setup()
+7
View File
@@ -0,0 +1,7 @@
local present, nvimtree = pcall(require, "nvim-tree")
if not present then
return
end
nvimtree.setup()
+70
View File
@@ -0,0 +1,70 @@
local fn = vim.fn
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if fn.empty(fn.glob(install_path)) > 0 then
packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim',
install_path})
end
-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]
local status_ok, packer = pcall(require, 'packer')
if not status_ok then
return
end
packer.init {
display = {
open_fn = function()
return require('packer.util').float {
border = 'rounded'
}
end
}
}
return packer.startup(function(use)
-- My plugins here
use 'wbthomason/packer.nvim'
use 'windwp/nvim-autopairs'
use {'lewis6991/gitsigns.nvim' -- tag = 'release' -- To use the latest release
}
use {'max397574/better-escape.nvim'}
use {'hrsh7th/nvim-cmp'}
use {'hrsh7th/cmp-nvim-lsp'}
use {'hrsh7th/cmp-buffer'}
use {'hrsh7th/cmp-path'}
use {'hrsh7th/cmp-cmdline'}
use {'L3MON4D3/LuaSnip'}
use {'rafamadriz/friendly-snippets'}
-- LSP
use {'neovim/nvim-lspconfig'}
use {'williamboman/nvim-lsp-installer'}
-- UI Plugins
use {
'kyazdani42/nvim-tree.lua',
requires = {'kyazdani42/nvim-web-devicons' -- optional, for file icon
}
}
use {
'nvim-telescope/telescope.nvim',
cmd = 'Telescope',
requires = {{'nvim-lua/plenary.nvim'}}
}
use {'rcarriga/nvim-notify'}
-- Themes
use {
"catppuccin/nvim",
as = "catppuccin"
}
use {'folke/tokyonight.nvim'}
-- use 'hrsh7th/cmp-cmdline'
-- use 'foo1/bar1.nvim'
-- use 'foo2/bar2.nvim'
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
if packer_bootstrap then
require('packer').sync()
end
end)
+8
View File
@@ -0,0 +1,8 @@
local catppuccin = require('catppuccin')
-- configure it
catppuccin.setup()
vim.g.tokyonight_style = "night"
-- vim.cmd[[colorscheme catppuccin]]
vim.cmd[[colorscheme tokyonight]]
+191
View File
@@ -0,0 +1,191 @@
-- Automatically generated packer.nvim plugin loader code
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return
end
vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function()
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
end
else
time = function(chunk, start) end
end
local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
end
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
local results = {}
for i, elem in ipairs(sorted_times) do
if not threshold or threshold and elem[2] > threshold then
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
_G._packer = _G._packer or {}
_G._packer.profile_output = results
end
time([[Luarocks path setup]], true)
local package_path_str = "C:\\Users\\CaiMY\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.0-beta3\\share\\lua\\5.1\\?.lua;C:\\Users\\CaiMY\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.0-beta3\\share\\lua\\5.1\\?\\init.lua;C:\\Users\\CaiMY\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.0-beta3\\lib\\luarocks\\rocks-5.1\\?.lua;C:\\Users\\CaiMY\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.0-beta3\\lib\\luarocks\\rocks-5.1\\?\\init.lua"
local install_cpath_pattern = "C:\\Users\\CaiMY\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.0-beta3\\lib\\lua\\5.1\\?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
end)
end
return result
end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
LuaSnip = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\LuaSnip",
url = "https://github.com/L3MON4D3/LuaSnip"
},
["better-escape.nvim"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\better-escape.nvim",
url = "https://github.com/max397574/better-escape.nvim"
},
catppuccin = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\catppuccin",
url = "https://github.com/catppuccin/nvim"
},
["cmp-buffer"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\cmp-buffer",
url = "https://github.com/hrsh7th/cmp-buffer"
},
["cmp-cmdline"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\cmp-cmdline",
url = "https://github.com/hrsh7th/cmp-cmdline"
},
["cmp-nvim-lsp"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
["cmp-path"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\cmp-path",
url = "https://github.com/hrsh7th/cmp-path"
},
["friendly-snippets"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\friendly-snippets",
url = "https://github.com/rafamadriz/friendly-snippets"
},
["gitsigns.nvim"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\gitsigns.nvim",
url = "https://github.com/lewis6991/gitsigns.nvim"
},
["nvim-autopairs"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\nvim-autopairs",
url = "https://github.com/windwp/nvim-autopairs"
},
["nvim-cmp"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-lsp-installer"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\nvim-lsp-installer",
url = "https://github.com/williamboman/nvim-lsp-installer"
},
["nvim-lspconfig"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-notify"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\nvim-notify",
url = "https://github.com/rcarriga/nvim-notify"
},
["nvim-tree.lua"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\nvim-tree.lua",
url = "https://github.com/kyazdani42/nvim-tree.lua"
},
["nvim-web-devicons"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\nvim-web-devicons",
url = "https://github.com/kyazdani42/nvim-web-devicons"
},
["packer.nvim"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
["plenary.nvim"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["telescope.nvim"] = {
commands = { "Telescope" },
loaded = false,
needs_bufread = true,
only_cond = false,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\opt\\telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
["tokyonight.nvim"] = {
loaded = true,
path = "C:\\Users\\CaiMY\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\tokyonight.nvim",
url = "https://github.com/folke/tokyonight.nvim"
}
}
time([[Defining packer_plugins]], false)
-- Command lazy-loads
time([[Defining lazy-load commands]], true)
pcall(vim.cmd, [[command -nargs=* -range -bang -complete=file Telescope lua require("packer.load")({'telescope.nvim'}, { cmd = "Telescope", l1 = <line1>, l2 = <line2>, bang = <q-bang>, args = <q-args>, mods = "<mods>" }, _G.packer_plugins)]])
time([[Defining lazy-load commands]], false)
if should_profile then save_profiles() end
end)
if not no_errors then
error_msg = error_msg:gsub('"', '\\"')
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end