IT'S ALIVE!
This commit is contained in:
commit
56cb5b3c25
20
README.md
Normal file
20
README.md
Normal file
|
@ -0,0 +1,20 @@
|
|||
# neovim on archlinux
|
||||
|
||||
Install neovim and some useful packages
|
||||
|
||||
```
|
||||
pikaur -Sy neovim-bin python-pynvim python-neovim nodejs-neovim
|
||||
```
|
||||
|
||||
Install `packer.nvim`:
|
||||
|
||||
```
|
||||
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
|
||||
~/.local/share/nvim/site/pack/packer/start/packer.nvim
|
||||
```
|
||||
|
||||
Install language servers:
|
||||
|
||||
```
|
||||
pikaur -Sy community/python-lsp-server
|
||||
```
|
155
init.lua
Normal file
155
init.lua
Normal file
|
@ -0,0 +1,155 @@
|
|||
-- Blallo neovim configuration
|
||||
|
||||
local g = vim.g
|
||||
local cmd = vim.cmd
|
||||
local o, wo, bo = vim.o, vim.wo, vim.bo
|
||||
local utils = require 'config.utils'
|
||||
local opt = utils.opt
|
||||
local autocmd = utils.autocmd
|
||||
local map = utils.map
|
||||
local let = utils.let
|
||||
local tilde = os.getenv('HOME')
|
||||
|
||||
-- Copied from https://medium.com/geekculture/neovim-configuration-for-beginners-b2116dbbde84
|
||||
opt('compatible', false)
|
||||
opt('showmatch', true)
|
||||
opt('ignorecase', true)
|
||||
opt('hlsearch', true)
|
||||
opt('incsearch', true)
|
||||
opt('tabstop', 4)
|
||||
opt('softtabstop', 4)
|
||||
opt('expandtab', true)
|
||||
opt('shiftwidth', 4)
|
||||
opt('textwidth', 0)
|
||||
opt('autoindent', true)
|
||||
opt('number', true)
|
||||
opt('wildmode', 'longest,list')
|
||||
opt('cc', '88')
|
||||
cmd [[filetype plugin indent on]]
|
||||
opt('smartindent', true, buffer)
|
||||
cmd [[syntax on]]
|
||||
opt('clipboard', 'unnamedplus')
|
||||
cmd [[filetype plugin on]]
|
||||
opt('cursorline', true)
|
||||
opt('ttyfast', true)
|
||||
opt('hidden', true)
|
||||
opt('termguicolors', true)
|
||||
opt('autoread', true)
|
||||
-- opt('mouse', v)
|
||||
-- opt('mouse', a)
|
||||
-- opt('spell', true)
|
||||
-- Configure swap
|
||||
opt('swapfile', true)
|
||||
opt('directory', tilde .. '/.cache/nvim/swap')
|
||||
-- Configure backup
|
||||
opt('backupdir', tilde .. '/.cache/nvim/backup')
|
||||
-- Configure undo
|
||||
opt('undofile', true)
|
||||
opt('undodir', tilde .. '/.cache/nvim/undo')
|
||||
opt('undolevels', 1000)
|
||||
opt('undoreload', 100000)
|
||||
|
||||
-- cmd([[set listchars=tab:›\ ,trail:•,extends:#,nbsp:.•]])
|
||||
cmd([[
|
||||
set showbreak=↪\
|
||||
set listchars=tab:›\ ,eol:↲,nbsp:␣,trail:•,extends:⟩,precedes:⟨
|
||||
]])
|
||||
|
||||
cmd([[
|
||||
augroup packer_user_config
|
||||
autocmd!
|
||||
autocmd BufWritePost plugins.lua source <afile> | PackerCompile
|
||||
augroup end
|
||||
]])
|
||||
|
||||
cmd [[command! WhatHighlight :call util#syntax_stack()]]
|
||||
cmd [[command! PackerInstall packadd packer.nvim | lua require('plugins').install()]]
|
||||
cmd [[command! PackerUpdate packadd packer.nvim | lua require('plugins').update()]]
|
||||
cmd [[command! PackerSync packadd packer.nvim | lua require('plugins').sync()]]
|
||||
cmd [[command! PackerClean packadd packer.nvim | lua require('plugins').clean()]]
|
||||
cmd [[command! PackerCompile packadd packer.nvim | lua require('plugins').compile()]]
|
||||
|
||||
-- Colortheme
|
||||
|
||||
require('config.theme')
|
||||
|
||||
-- Treesitter configuration
|
||||
|
||||
require('config.treesitter')
|
||||
|
||||
|
||||
-- LSP configuration
|
||||
|
||||
require('config.lspconfig')
|
||||
|
||||
-- Keybinds
|
||||
|
||||
let(nil, 'mapleader', ',')
|
||||
Mapper = require("nvim-mapper")
|
||||
local map = Mapper.map
|
||||
|
||||
-- - Telescope-related
|
||||
local opts = {noremap = true, silent = true}
|
||||
map('n', '<Leader>ff', '<cmd>Telescope find_files<cr>', opts, "Telescope", "find_files", "Find files from current position")
|
||||
map('n', '<Leader>fg', '<cmd>Telescope git_files<cr>', opts, "Telescope", "git_files", "Find git-tracked files")
|
||||
map('n', '<Leader>fb', '<cmd>Telescope buffers<cr>', opts, "Telescope", "buffers", "Search in current opened buffers")
|
||||
map('n', '<Leader>fc', '<cmd>Telescope grep_string<cr>', opts, "Telescope", "grep_string", "Search string from current position")
|
||||
map('n', '<Leader>fr', '<cmd>Telescope live_grep<cr>', opts, "Telescope", "live_grep", "Search string in real time")
|
||||
map('n', '<Leader>fR', '<cmd>Telescope live_grep grep_open_files=true<cr>', opts, "Telescope", "live_grep_open_buffers", "Search string in real time (only on the open buffers)")
|
||||
map('n', '<Leader>ft', '<cmd>Telescope treesitter<cr>', opts, "Telescope", "treesitter", "Explore treesitter")
|
||||
map('n', '<Leader>fC', '<cmd>Telescope git_bcommits<cr>', opts, "Telescope", "git_bcommits", "Show diff of current buffer")
|
||||
map('n', '<Leader>fh', '<cmd>Telescope builtin<cr>', opts, "Telescope", "builtin", "Show Telescope builtins")
|
||||
map('n', '<Leader>lr', '<cmd>Telescope lsp_references<cr>', opts, "Telescope", "lsp_references", "Show references using LSP")
|
||||
map('n', '<Leader>li', '<cmd>Telescope lsp_implementations<cr>', opts, "Telescope", "lsp_implementations", "Show implementations using LSP")
|
||||
map('n', '<Leader>ld', '<cmd>Telescope lsp_definitions<cr>', opts, "Telescope", "lsp_definitions", "Show definitions using LSP")
|
||||
map('n', '<Leader>ls', '<cmd>Telescope lsp_document_symbols<cr>', opts, "Telescope", "lsp_document_symbols", "Show symbols in document using LSP")
|
||||
|
||||
-- Undo tree
|
||||
map('n', '<Leader>u', '<cmd>UndotreeToggle<cr><cmd>UndotreeFocus<cr>', {noremap = true}, "UndoTree", "undo_tree_toggle", "Toggle UndoTree browser")
|
||||
|
||||
-- Split maximizer
|
||||
map('n', '<Leader>mm', '<cmd>MaximizerToggle<cr>', opts, "MaximizerToggle", "maximizer_toggle_n", "Toggle maximal view of current split")
|
||||
map('v', '<Leader>mm', '<cmd>MaximizerToggle<cr>', opts, "MaximizerToggle", "maximizer_toggle_v", "Toggle maximal view of current split")
|
||||
|
||||
-- Split movement and management
|
||||
map('n', '<C-l>', '<C-w>l', opts, "Movement", "move_right_n", "Move to the split to the right")
|
||||
map('v', '<C-l>', '<C-w>l', opts, "Movement", "move_right_v", "Move to the split to the right")
|
||||
map('i', '<C-l>', '<C-w>l', opts, "Movement", "move_right_i", "Move to the split to the right")
|
||||
|
||||
map('n', '<C-k>', '<C-w>k', opts, "Movement", "move_up_n", "Move to the upper split")
|
||||
map('v', '<C-k>', '<C-w>k', opts, "Movement", "move_up_v", "Move to the upper split")
|
||||
map('i', '<C-k>', '<C-w>k', opts, "Movement", "move_up_i", "Move to the upper split")
|
||||
|
||||
map('n', '<C-j>', '<C-w>j', opts, "Movement", "move_down_n", "Move to the lower split")
|
||||
map('v', '<C-j>', '<C-w>j', opts, "Movement", "move_down_v", "Move to the lower split")
|
||||
map('i', '<C-j>', '<C-w>j', opts, "Movement", "move_down_i", "Move to the lower split")
|
||||
|
||||
map('n', '<C-h>', '<C-w>h', opts, "Movement", "move_left_n", "Move to the split to the left")
|
||||
map('v', '<C-h>', '<C-w>h', opts, "Movement", "move_left_v", "Move to the split to the left")
|
||||
map('i', '<C-h>', '<C-w>h', opts, "Movement", "move_left_i", "Move to the split to the left")
|
||||
|
||||
map('n', '<C-d>', '<cmd>bd<cr>', opts, "Management", "full_close_n", "Close current split and associated buffer")
|
||||
map('v', '<C-d>', '<cmd>bd<cr>', opts, "Management", "full_close_v", "Close current split and associated buffer")
|
||||
map('i', '<C-d>', '<cmd>bd<cr>', opts, "Management", "full_close_i", "Close current split and associated buffer")
|
||||
|
||||
map('n', '<Leader><Tab>', '<cmd>bnext<cr>', {}, "Movement", "go_to_next_buf", "Switch to the next buffer")
|
||||
map('n', '<Leader>\\', '<cmd>bprev<cr>', {}, "Movement", "go_to_prev_buf", "Switch to the previous buffer")
|
||||
|
||||
-- Move selection around
|
||||
cmd ([[
|
||||
nnoremap <silent> <C-Down> :m .+1<CR>==
|
||||
nnoremap <silent> <C-Up> :m .-2<CR>==
|
||||
inoremap <silent> <C-Down> <Esc>:m .+1<CR>==gi
|
||||
inoremap <silent> <C-Up> <Esc>:m .-2<CR>==gi
|
||||
vnoremap <silent> <C-Down> :m '>+1<CR>gv=gv
|
||||
vnoremap <silent> <C-Up> :m '<-2<CR>gv=gv
|
||||
]])
|
||||
-- map('n', '<C-Down>', '<cmd>m .+1<CR>==', opts, "MoveText", "move_text_up_n", "")
|
||||
-- map('n', '<C-Up>', '<cmd>m .-2<CR>==', opts, "MoveText", "move_text_down_n", "")
|
||||
-- map('i', '<C-Down>', '<Esc><cmd>m .+1<CR>==gi', opts, "MoveText", "move_text_up_i", "")
|
||||
-- map('i', '<C-Up>', '<Esc><cmd>m .-2<CR>==gi', opts, "MoveText", "move_text_down_i", "")
|
||||
-- map('v', '<C-Down>', "<cmd>m '>+1<CR>gv=gv", opts, "MoveText", "move_text_up_v", "")
|
||||
-- map('v', '<C-Up>', "<cmd>m '<-2<CR>gv=gv", opst, "MoveText", "move_text_down_v", "")
|
||||
|
||||
-- Clean highlight
|
||||
map('n', '<leader><esc>', '<cmd>nohls<CR><cmd>call clearmatches()<cr>', opts, "CleanHighlights", "clear_all", "Clear all highlights and matches")
|
45
lua/config/lspconfig.lua
Normal file
45
lua/config/lspconfig.lua
Normal file
|
@ -0,0 +1,45 @@
|
|||
local nvim_lsp = require('lspconfig')
|
||||
|
||||
local on_attach = function(client, bufrn)
|
||||
Mapper = require("nvim-mapper")
|
||||
local function buf_set_keymap(...) Mapper.map_buf(bufrn, ...) end
|
||||
local function buf_set_option(...) vim.api.nvim_buf_set_option(bufrn, ...) end
|
||||
|
||||
buf_set_option('omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||
|
||||
-- Mappings
|
||||
local opts = { noremap=true, silent=true }
|
||||
|
||||
-- See `:help vim.lsp.*` for documentation on any of the below functions
|
||||
buf_set_keymap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<CR>', opts, "LSP", "declaration", "Go to declaration")
|
||||
buf_set_keymap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<CR>', opts, "LSP", "definition", "Go to definition")
|
||||
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts, "LSP", "hover", "Hover")
|
||||
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts, "LSP", "implementation", "Go to implementation")
|
||||
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts, "LSP", "signature_help", "Show signature help")
|
||||
buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts, "LSP", "add_workspace_folder", "Add workspace folder")
|
||||
buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts, "LSP", "remove_workspace_folder", "Remove workspace folder")
|
||||
buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts, "LSP", "list_workspace_folders", "List workspace folder")
|
||||
buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts, "LSP", "type_definition", "Show type definition")
|
||||
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts, "LSP", "rename", "Rename")
|
||||
buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts, "LSP", "code_action", "Show code actions")
|
||||
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts, "LSP", "references", "Show references")
|
||||
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts, "LSP", "show_line_diagnostics", "Show line diagnostic")
|
||||
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts, "LSP", "goto_prev", "Go to previous")
|
||||
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts, "LSP", "goto_next", "Go to next")
|
||||
buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts, "LSP", "set_loclist", "Set loclist")
|
||||
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts, "LSP", "formatting", "Format")
|
||||
end
|
||||
|
||||
-- Launch language servers
|
||||
local servers = { 'pylsp', 'gopls', 'rls', 'tsserver', 'elixirls', 'dartls', 'denols', 'clangd' }
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {
|
||||
on_attach = on_attach,
|
||||
flags = {
|
||||
debounce_text_changes = 150,
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
-- Format on save
|
||||
vim.cmd [[autocmd BufWritePre <buffer> lua vim.lsp.buf.formatting_sync()]]
|
23
lua/config/theme.lua
Normal file
23
lua/config/theme.lua
Normal file
|
@ -0,0 +1,23 @@
|
|||
local cmd = vim.cmd
|
||||
local utils = require 'config.utils'
|
||||
local let = utils.let
|
||||
|
||||
-- Nortia
|
||||
-- cmd([[
|
||||
-- color nortia-nvim
|
||||
-- let g:nortia_bat_light_theme=1
|
||||
-- let g:nortia_bat_dark_theme=1
|
||||
-- ]])
|
||||
-- require('nortia.theme').tint_bg(0, 0.05)
|
||||
-- require('nortia.theme').tint_bg(190, 0.1)
|
||||
-- require('nortia.theme').tint_fg(190, 0.1)
|
||||
-- require('nortia.theme').tint(190, 0.1)
|
||||
|
||||
|
||||
-- Gruvbox
|
||||
let('g', 'gruvbox_italic', 1)
|
||||
let('g', 'gruvbox_transparent_bg', 1)
|
||||
cmd [[colorscheme gruvbox]]
|
||||
|
||||
-- Airline
|
||||
let('g', 'airline_powerline_fonts ', 1)
|
26
lua/config/treesitter.lua
Normal file
26
lua/config/treesitter.lua
Normal file
|
@ -0,0 +1,26 @@
|
|||
require('nvim-treesitter.configs').setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
custom_captures = {
|
||||
-- Highlight the @foo.bar capture group with the "Identifier" highlight group.
|
||||
["foo.bar"] = "Identifier",
|
||||
},
|
||||
-- Setting this to true will run `:h syntax` and tree-sitter at the same time.
|
||||
-- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
|
||||
-- Using this option may slow down your editor, and you may see some duplicate highlights.
|
||||
-- Instead of true it can also be a list of languages
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
keymaps = {
|
||||
init_selection = "gnn",
|
||||
node_incremental = "grn",
|
||||
scope_incremental = "grc",
|
||||
node_decremental = "grm",
|
||||
},
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
},
|
||||
}
|
42
lua/config/utils.lua
Normal file
42
lua/config/utils.lua
Normal file
|
@ -0,0 +1,42 @@
|
|||
local cmd = vim.cmd
|
||||
local o_s = vim.o
|
||||
local map_key = vim.api.nvim_set_keymap
|
||||
local set_g = vim.api.nvim_set_var
|
||||
|
||||
local function opt(o, v, scopes)
|
||||
scopes = scopes or {o_s}
|
||||
for _, s in ipairs(scopes) do s[o] = v end
|
||||
end
|
||||
|
||||
local function autocmd(group, cmds, clear)
|
||||
clear = clear == nil and false or clear
|
||||
if type(cmds) == 'string' then cmds = {cmds} end
|
||||
cmd('augroup ' .. group)
|
||||
if clear then cmd [[au!]] end
|
||||
for _, c in ipairs(cmds) do cmd('autocmd ' .. c) end
|
||||
cmd [[augroup END]]
|
||||
end
|
||||
|
||||
local function map(modes, lhs, rhs, opts)
|
||||
opts = opts or {}
|
||||
opts.noremap = opts.noremap == nil and true or opts.noremap
|
||||
if type(modes) == 'string' then modes = {modes} end
|
||||
for _, mode in ipairs(modes) do map_key(mode, lhs, rhs, opts) end
|
||||
end
|
||||
|
||||
local function let(mode, name, value)
|
||||
local assignment = 'let '
|
||||
if mode == nil then
|
||||
assignment = assignment .. name .. ' = '
|
||||
else
|
||||
assignment = assignment .. mode .. ':' .. name .. ' = '
|
||||
end
|
||||
if type(value) == 'string' then
|
||||
assignment = assignment .. '"' .. value .. '"'
|
||||
else
|
||||
assignment = assignment .. value
|
||||
end
|
||||
cmd(assignment)
|
||||
end
|
||||
|
||||
return {opt = opt, autocmd = autocmd, map = map, set_g = set_g, let = let}
|
76
lua/plugins.lua
Normal file
76
lua/plugins.lua
Normal file
|
@ -0,0 +1,76 @@
|
|||
local packer = nil
|
||||
local function init()
|
||||
if packer == nil then
|
||||
packer = require 'packer'
|
||||
packer.init { disable_commands = true }
|
||||
end
|
||||
|
||||
local use = packer.use
|
||||
packer.reset()
|
||||
|
||||
-- Packer can manage itself
|
||||
use 'wbthomason/packer.nvim'
|
||||
|
||||
-- nvim-mapper to explore mappings
|
||||
use {
|
||||
"lazytanuki/nvim-mapper",
|
||||
config = function() require("nvim-mapper").setup{} end,
|
||||
before = "telescope.nvim"
|
||||
}
|
||||
|
||||
-- telescope.nvim
|
||||
use {
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = {{'nvim-lua/popup.nvim'}, {'nvim-lua/plenary.nvim'}},
|
||||
config = function() require("telescope").load_extension("mapper") end
|
||||
}
|
||||
|
||||
-- Highlight
|
||||
use {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
requires = {
|
||||
'nvim-treesitter/nvim-treesitter-refactor',
|
||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||
},
|
||||
run = ':TSUpdate',
|
||||
}
|
||||
|
||||
-- Colortheme
|
||||
use 'rktjmp/lush.nvim'
|
||||
use 'alaric/nortia.nvim'
|
||||
use 'morhetz/gruvbox'
|
||||
use 'vim-airline/vim-airline'
|
||||
use 'vim-airline/vim-airline-themes'
|
||||
|
||||
-- Coc
|
||||
use {
|
||||
'neoclide/coc.nvim',
|
||||
branch = 'master',
|
||||
run = 'yarn install --frozen-lockfile',
|
||||
}
|
||||
|
||||
-- Wrapping/delimiters
|
||||
use 'andymass/vim-matchup'
|
||||
use 'machakann/vim-sandwich'
|
||||
|
||||
-- Undo tree
|
||||
use 'mbbill/undotree'
|
||||
|
||||
-- LSP stuff
|
||||
use 'neovim/nvim-lspconfig'
|
||||
|
||||
-- Split maximizer
|
||||
use 'szw/vim-maximizer'
|
||||
|
||||
-- Auto pair
|
||||
use 'jiangmiao/auto-pairs'
|
||||
end
|
||||
|
||||
local plugins = setmetatable({}, {
|
||||
__index = function(_, key)
|
||||
init()
|
||||
return packer[key]
|
||||
end,
|
||||
})
|
||||
|
||||
return plugins
|
167
plugin/packer_compiled.lua
Normal file
167
plugin/packer_compiled.lua
Normal file
|
@ -0,0 +1,167 @@
|
|||
-- 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 = "/home/leo/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?.lua;/home/leo/.cache/nvim/packer_hererocks/2.0.5/share/lua/5.1/?/init.lua;/home/leo/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?.lua;/home/leo/.cache/nvim/packer_hererocks/2.0.5/lib/luarocks/rocks-5.1/?/init.lua"
|
||||
local install_cpath_pattern = "/home/leo/.cache/nvim/packer_hererocks/2.0.5/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))
|
||||
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 = {
|
||||
["coc.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/coc.nvim"
|
||||
},
|
||||
gruvbox = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/gruvbox"
|
||||
},
|
||||
["lush.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/lush.nvim"
|
||||
},
|
||||
["nortia.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/nortia.nvim"
|
||||
},
|
||||
["nvim-lspconfig"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/nvim-lspconfig"
|
||||
},
|
||||
["nvim-mapper"] = {
|
||||
config = { "\27LJ\1\2=\0\0\2\0\3\0\a4\0\0\0%\1\1\0>\0\2\0027\0\2\0002\1\0\0>\0\2\1G\0\1\0\nsetup\16nvim-mapper\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/nvim-mapper"
|
||||
},
|
||||
["nvim-treesitter"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/nvim-treesitter"
|
||||
},
|
||||
["nvim-treesitter-refactor"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/nvim-treesitter-refactor"
|
||||
},
|
||||
["nvim-treesitter-textobjects"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/nvim-treesitter-textobjects"
|
||||
},
|
||||
["packer.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/packer.nvim"
|
||||
},
|
||||
["plenary.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/plenary.nvim"
|
||||
},
|
||||
["popup.nvim"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/popup.nvim"
|
||||
},
|
||||
["telescope.nvim"] = {
|
||||
config = { "\27LJ\1\2K\0\0\2\0\4\0\a4\0\0\0%\1\1\0>\0\2\0027\0\2\0%\1\3\0>\0\2\1G\0\1\0\vmapper\19load_extension\14telescope\frequire\0" },
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/telescope.nvim"
|
||||
},
|
||||
undotree = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/undotree"
|
||||
},
|
||||
["vim-airline"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/vim-airline"
|
||||
},
|
||||
["vim-airline-themes"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/vim-airline-themes"
|
||||
},
|
||||
["vim-matchup"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/vim-matchup"
|
||||
},
|
||||
["vim-maximizer"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/vim-maximizer"
|
||||
},
|
||||
["vim-sandwich"] = {
|
||||
loaded = true,
|
||||
path = "/home/leo/.local/share/nvim/site/pack/packer/start/vim-sandwich"
|
||||
}
|
||||
}
|
||||
|
||||
time([[Defining packer_plugins]], false)
|
||||
-- Config for: telescope.nvim
|
||||
time([[Config for telescope.nvim]], true)
|
||||
try_loadstring("\27LJ\1\2K\0\0\2\0\4\0\a4\0\0\0%\1\1\0>\0\2\0027\0\2\0%\1\3\0>\0\2\1G\0\1\0\vmapper\19load_extension\14telescope\frequire\0", "config", "telescope.nvim")
|
||||
time([[Config for telescope.nvim]], false)
|
||||
-- Config for: nvim-mapper
|
||||
time([[Config for nvim-mapper]], true)
|
||||
try_loadstring("\27LJ\1\2=\0\0\2\0\3\0\a4\0\0\0%\1\1\0>\0\2\0027\0\2\0002\1\0\0>\0\2\1G\0\1\0\nsetup\16nvim-mapper\frequire\0", "config", "nvim-mapper")
|
||||
time([[Config for nvim-mapper]], false)
|
||||
if should_profile then save_profiles() end
|
||||
|
||||
end)
|
||||
|
||||
if not no_errors then
|
||||
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
|
||||
end
|
Loading…
Reference in New Issue
Block a user