diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2023-07-14 22:49:04 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2023-07-14 22:49:04 +0530 |
commit | 0cc4ed7dd6fc5b06de245246723138996d449571 (patch) | |
tree | b8de0f83a99e0123bf740b9c8a278c9cbdc039e9 /.config | |
parent | 193034436557fb26adbc26f5fbd847016f6fe0be (diff) |
nvim: Adding basic neovim config
Diffstat (limited to '.config')
-rw-r--r-- | .config/nvim/init.lua | 12 | ||||
-rw-r--r-- | .config/nvim/lua/justsaumit/bufferline-config.lua | 71 | ||||
-rw-r--r-- | .config/nvim/lua/justsaumit/colorizer-config.lua | 27 | ||||
-rw-r--r-- | .config/nvim/lua/justsaumit/colorscheme.lua | 33 | ||||
-rw-r--r-- | .config/nvim/lua/justsaumit/keymaps.lua | 72 | ||||
-rw-r--r-- | .config/nvim/lua/justsaumit/lastplace-config.lua | 5 | ||||
-rw-r--r-- | .config/nvim/lua/justsaumit/lualine-config.lua | 40 | ||||
-rw-r--r-- | .config/nvim/lua/justsaumit/nvim-tree-config.lua | 75 | ||||
-rw-r--r-- | .config/nvim/lua/justsaumit/options.lua | 46 | ||||
-rw-r--r-- | .config/nvim/lua/justsaumit/plugins.lua | 97 | ||||
-rw-r--r-- | .config/nvim/lua/justsaumit/treesitter-config.lua | 20 | ||||
-rw-r--r-- | .config/nvim/lua/justsaumit/which-key-config.lua | 11 | ||||
-rw-r--r-- | .config/nvim/plugin/packer_compiled.lua | 164 |
13 files changed, 673 insertions, 0 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..eccbfdf --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1,12 @@ +require("justsaumit.options") +require("justsaumit.keymaps") +require("justsaumit.plugins") +require("justsaumit.colorscheme") +require("justsaumit.treesitter-config") +require("justsaumit.lualine-config") +require("justsaumit.bufferline-config") +require("justsaumit.nvim-tree-config") +require("justsaumit.lastplace-config") +require("justsaumit.which-key-config") +require("justsaumit.colorizer-config") +print ("while(!(succeed = try() ) );") diff --git a/.config/nvim/lua/justsaumit/bufferline-config.lua b/.config/nvim/lua/justsaumit/bufferline-config.lua new file mode 100644 index 0000000..493bafc --- /dev/null +++ b/.config/nvim/lua/justsaumit/bufferline-config.lua @@ -0,0 +1,71 @@ +--vim.opt.termguicolors = true + +local status, bufferline = pcall(require, "bufferline") +if not status then + return +end + +require('bufferline').setup { + options = { + mode = "buffers", + numbers = "none", + close_command = "bdelete! %d", -- can be a string | function, see "Mouse actions" + right_mouse_command = "bdelete! %d", -- can be a string | function, see "Mouse actions" + left_mouse_command = "buffer %d", -- can be a string | function, see "Mouse actions" + middle_mouse_command = nil, -- can be a string | function, see "Mouse actions" + indicator = { + icon = '▎', + style = 'icon', + }, + buffer_close_icon = '', + modified_icon = '●', + close_icon = '', + -- close_icon = '', + left_trunc_marker = '', + right_trunc_marker = '', + max_name_length = 30, + max_prefix_length = 30, -- prefix used when a buffer is de-duplicated + tab_size = 22, + diagnostics = false, + diagnostics_update_in_insert = false, + offsets = { { filetype = "NvimTree", text = "", padding = 1 } }, + color_icons = true, + show_buffer_icons = true, + show_buffer_close_icons = true, + show_close_icon = true, + show_tab_indicators = true, + persist_buffer_sort = true, + separator_style = "thin", -- | "thick" | "thin" | slant, + enforce_regular_tabs = true, + always_show_bufferline = true, + name_formatter = function(buf) -- buf contains a "name", "path" and "bufnr" + -- remove extension from markdown files for example + if buf.name:match('%.md') then + return vim.fn.fnamemodify(buf.name, ':t:r') + end + end + } +} + +local opts = { noremap = true, silent = true } +local keymap = vim.keymap.set +keymap("", "<Space>", "<Nop>", opts) +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +--Leader+number -> tab change +for i = 1, 9 do + keymap("n", "<leader>" .. i, function() + require("bufferline").go_to_buffer(i, true) + end, opts) +end + +--Ctrl+W to close a buffer +keymap("n", "W", ":bdelete!<CR>", opts) + + +--Tab or Ctrl+Tab for Forward Cycle //terminals don't see a difference between <Tab> and <C-Tab> +--Shift+Tab for Backward Cycle +keymap("n", "<Tab>", ":BufferLineCycleNext<CR>", opts) +keymap("n", "<S-Tab>", ":BufferLineCyclePrev<CR>", opts) + diff --git a/.config/nvim/lua/justsaumit/colorizer-config.lua b/.config/nvim/lua/justsaumit/colorizer-config.lua new file mode 100644 index 0000000..569021d --- /dev/null +++ b/.config/nvim/lua/justsaumit/colorizer-config.lua @@ -0,0 +1,27 @@ +require("colorizer").setup { + filetypes = { "*" }, + user_default_options = { + RGB = true, -- #RGB hex codes + RRGGBB = true, -- #RRGGBB hex codes + names = true, -- "Name" codes like Blue or blue + RRGGBBAA = false, -- #RRGGBBAA hex codes + AARRGGBB = false, -- 0xAARRGGBB hex codes + rgb_fn = false, -- CSS rgb() and rgba() functions + hsl_fn = false, -- CSS hsl() and hsla() functions + css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB + css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn + -- Available modes for `mode`: foreground, background, virtualtext + mode = "background", -- Set the display mode. + -- Available methods are false / true / "normal" / "lsp" / "both" + -- True is same as normal + tailwind = false, -- Enable tailwind colors + -- parsers can contain values used in |user_default_options| + sass = { enable = false, parsers = { "css" }, }, -- Enable sass colors + virtualtext = "■", + -- update color values even if buffer is not focused + -- example use: cmp_menu, cmp_docs + always_update = false + }, + -- all the sub-options of filetypes apply to buftypes + buftypes = {}, +} diff --git a/.config/nvim/lua/justsaumit/colorscheme.lua b/.config/nvim/lua/justsaumit/colorscheme.lua new file mode 100644 index 0000000..67c166f --- /dev/null +++ b/.config/nvim/lua/justsaumit/colorscheme.lua @@ -0,0 +1,33 @@ +--configuration needs to be set BEFORE loading the color scheme with colorscheme tokyonight +vim.g.tokyonight_style = "night" +tokyonight_terminal_colors=true +tokyonight_italic_comments=true +tokyonight_italic_keywords=true +tokyonight_italic_functions=false +tokyonight_italic_variables=false +tokyonight_transparent=false +tokyonight_hide_inactive_statusline=false +tokyonight_sidebars={} +tokyonight_transparent_sidebar=false +tokyonight_dark_sidebar=true +tokyonight_dark_float=true +tokyonight_colors={} +tokyonight_lualine_bold=false + +--protected call +local colorscheme = "tokyonight" +local pywal = require('pywal') + +local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme) +if not status_ok then + vim.notify("colorscheme " .. colorscheme .. " not found! :(") + pywal.setup() + return +end + +-- init.lua +vim.g.tokyodark_transparent_background = false +vim.g.tokyodark_enable_italic_comment = true +vim.g.tokyodark_enable_italic = true +vim.g.tokyodark_color_gamma = "1.0" +vim.cmd("colorscheme tokyodark") diff --git a/.config/nvim/lua/justsaumit/keymaps.lua b/.config/nvim/lua/justsaumit/keymaps.lua new file mode 100644 index 0000000..ebe355a --- /dev/null +++ b/.config/nvim/lua/justsaumit/keymaps.lua @@ -0,0 +1,72 @@ +local opts = { noremap = true, silent = true } + +-- Shorten function name +local keymap = vim.keymap.set + +--Remap space as leader key +keymap("", "<Space>", "<Nop>", opts) +vim.g.mapleader = " " +vim.g.maplocalleader = " " + +---Autocompile and Execute +--ANSI C +vim.cmd([[autocmd BufEnter *.c map <F4> :w <CR> :!gcc % -ansi -o %< && ./%< <CR>]]) +--C99 +vim.cmd([[autocmd BufEnter *.c map <F5> :w <CR> :!gcc -std=c99 % -o %< && ./%< <CR>]]) +--C +vim.cmd([[autocmd BufEnter *.c map <F6> :w <CR> :!gcc % -o %< && ./%< <CR>]]) + +--C++ +vim.cmd([[autocmd BufEnter *.cpp map <F4> :w <CR> :!g++ % -o %< && ./%< <CR>]]) + +-- Modes +-- normal_mode = "n", +-- insert_mode = "i", +-- visual_mode = "v", +-- visual_block_mode = "x", +-- command_mode = "c", + +-- Normal -- +-- +-- +--Save file with Ctrl+S +keymap("n", "<C-s>", ":w<CR>", opts) +--Toggle nvim-tree +keymap("n", "<m-e>", ":NvimTreeToggle<CR>", opts) +--Disable C-e +keymap("n", "<c-e>", ":<CR>", opts) + +-- Better window navigation for split +keymap("n", "<C-h>", "<C-w>h", opts) +keymap("n", "<C-j>", "<C-w>j", opts) +keymap("n", "<C-k>", "<C-w>k", opts) +keymap("n", "<C-l>", "<C-w>l", opts) + +-- Resize with arrows +keymap("n", "<C-Up>", ":resize +2<CR>", opts) +keymap("n", "<C-Down>", ":resize -2<CR>", opts) +keymap("n", "<C-Left>", ":vertical resize +2<CR>", opts) +keymap("n", "<C-Right>", ":vertical resize -2<CR>", opts) + +-- Move text up and down(better implementation in visual mode) +--keymap("n", "<A-j>", "<Esc>:m .+1<CR>==gi", opts) +--keymap("n", "<A-k>", "<Esc>:m .-2<CR>==gi", opts) + +-- Insert -- + +-- Visual -- +-- Stay in indent mode +keymap("v", "<", "<gv", opts) +keymap("v", ">", ">gv", opts) + +-- Move text up and down +keymap("v", "<A-j>", ":m .+1<CR>==", opts) +keymap("v", "<A-k>", ":m .-2<CR>==", opts) +keymap("v", "p", '"_dP', opts) + +-- Visual Block -- +-- Move text up and down +keymap("x", "J", ":move '>+1<CR>gv-gv", opts) +keymap("x", "K", ":move '<-2<CR>gv-gv", opts) +keymap("x", "<A-j>", ":move '>+1<CR>gv-gv", opts) +keymap("x", "<A-k>", ":move '<-2<CR>gv-gv", opts) diff --git a/.config/nvim/lua/justsaumit/lastplace-config.lua b/.config/nvim/lua/justsaumit/lastplace-config.lua new file mode 100644 index 0000000..4fa6a83 --- /dev/null +++ b/.config/nvim/lua/justsaumit/lastplace-config.lua @@ -0,0 +1,5 @@ +require'nvim-lastplace'.setup { + lastplace_ignore_buftype = {"quickfix", "nofile", "help"}, + lastplace_ignore_filetype = {"gitcommit", "gitrebase", "svn", "hgcommit"}, + lastplace_open_folds = true +} diff --git a/.config/nvim/lua/justsaumit/lualine-config.lua b/.config/nvim/lua/justsaumit/lualine-config.lua new file mode 100644 index 0000000..56c426a --- /dev/null +++ b/.config/nvim/lua/justsaumit/lualine-config.lua @@ -0,0 +1,40 @@ +require('lualine').setup { + options = { + icons_enabled = true, + theme = 'auto', + component_separators = { left = '', right = ''}, + section_separators = { left = '', right = ''}, + disabled_filetypes = { + statusline = {}, + winbar = {}, + }, + ignore_focus = {}, + always_divide_middle = true, + globalstatus = false, + refresh = { + statusline = 1000, + tabline = 1000, + winbar = 1000, + } + }, + sections = { + lualine_a = {'mode'}, + lualine_b = {'branch', 'diff', 'diagnostics'}, + lualine_c = {'filename'}, + lualine_x = {'encoding', 'fileformat', 'filetype'}, + lualine_y = {'progress'}, + lualine_z = {'location'} + }, + inactive_sections = { + lualine_a = {}, + lualine_b = {}, + lualine_c = {'filename'}, + lualine_x = {'location'}, + lualine_y = {}, + lualine_z = {} + }, + tabline = {}, + winbar = {}, + inactive_winbar = {}, + extensions = {} +} diff --git a/.config/nvim/lua/justsaumit/nvim-tree-config.lua b/.config/nvim/lua/justsaumit/nvim-tree-config.lua new file mode 100644 index 0000000..c83a1b7 --- /dev/null +++ b/.config/nvim/lua/justsaumit/nvim-tree-config.lua @@ -0,0 +1,75 @@ +-- disable netrw at the very start of your init.lua +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 + +-- set termguicolors to enable highlight groups +vim.opt.termguicolors = true + +-- empty setup using defaults +require("nvim-tree").setup() + +-- OR setup with some options +require("nvim-tree").setup({ + sort_by = "case_sensitive", + view = { + adaptive_size = true, + }, + renderer = { + group_empty = true, + highlight_git = false, + full_name = false, + highlight_opened_files = "none", + root_folder_modifier = ":~", + indent_width = 2, + indent_markers = { + enable = true, + inline_arrows = true, + icons = { + corner = "└", + edge = "│", + item = "│", + bottom = "─", + none = " ", + }, + }, + icons = { + webdev_colors = true, + git_placement = "before", + padding = " ", + symlink_arrow = " ➛ ", + show = { + file = true, + folder = true, + folder_arrow = true, + git = true, + }, + glyphs = { + default = "", + symlink = "", + bookmark = "", + folder = { + arrow_closed = "", + arrow_open = "", + default = "", + open = "", + empty = "", + empty_open = "", + symlink = "", + symlink_open = "", + }, + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★", + deleted = "", + ignored = "◌", + }, + }, + }, + }, + filters = { + dotfiles = true, + }, +}) diff --git a/.config/nvim/lua/justsaumit/options.lua b/.config/nvim/lua/justsaumit/options.lua new file mode 100644 index 0000000..4eae867 --- /dev/null +++ b/.config/nvim/lua/justsaumit/options.lua @@ -0,0 +1,46 @@ +local options = { + number=true, -- Shows absolute linenumber + relativenumber=true, -- Shows linenumber relative to cursor + --combination of both^ for hybrid linenumber +-- textwidth=100, + numberwidth=4, + scrolloff=8, -- keeps cursor in middle of screen/scrolls 8lines in advance + sidescroll=18, + mouse="a", -- enable mouse support + splitbelow=true, -- on horizontal split instead of opening window to left open it at right + splitright=true, -- on vertical split instead of opening window to left open it at right + termguicolors=true, + showmode=false, -- lualine does the job + cmdheight=1, + wrap=false, + whichwrap='b,s,<,>,[,],h,l', + clipboard="unnamedplus", -- allows neovim to access system clipboard using yank + fileencoding="UTF-8", + --spaces/tabs/indents + softtabstop=4, -- No. of spaces per tab + shiftwidth=4, -- No. of auto-indent space + expandtab=true, -- spaces inplace of tabs + autoindent=true, -- New line copies indentation from past line + smartindent=true, -- Indents in accordance to the syntax/style of the code extension + --searches + ignorecase=true, -- Ignore case-sensitivity during search + smartcase=true, -- If searching capital search only capital + hlsearch=false, -- no perma highlight post search + incsearch=true, -- searches for strings incrementally + showmatch=true, -- Highlight matching braces + --git integration/lsp/diagnostic + signcolumn="yes", + --undo/backup + backup=false, + swapfile=false, + undodir=os.getenv("HOME") .. "/.local/state/nvim/undodir", + undofile=true +-- showbreak="+++", -- wrap broken line prefix +} +--forloop for table 'options' +for key, value in pairs(options) do + vim.opt[key] = value +end + +--to 'cw/'dw' a word containing '-' in between +vim.cmd [[set iskeyword+=-]] diff --git a/.config/nvim/lua/justsaumit/plugins.lua b/.config/nvim/lua/justsaumit/plugins.lua new file mode 100644 index 0000000..6a34a50 --- /dev/null +++ b/.config/nvim/lua/justsaumit/plugins.lua @@ -0,0 +1,97 @@ +local fn = vim.fn + +-- Automatically install packer +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, + } + print "Installing packer close and reopen Neovim..." + vim.cmd [[packadd packer.nvim]] +end + +-- Autocommand that reloads neovim whenever you save (:w) the plugins.lua file +vim.cmd [[ + augroup packer_user_config + autocmd! + autocmd BufWritePost plugins.lua source <afile> | PackerSync + augroup end +]] + +-- Use a protected call so we don't error out! +local status_ok, packer = pcall(require, "packer") +if not status_ok then + return +end + +-- Have packer use a popup window +packer.init { + display = { + open_fn = function() + return require("packer.util").float { border = "rounded" } + end, + }, +} + +--Actual good stuff +--Install all your plugins here +return packer.startup(function(use) +--Necessities + use "wbthomason/packer.nvim" -- Have packer manage itself + use "nvim-lua/popup.nvim" -- An implementation of the Popup API from vim in Neovim + use "nvim-lua/plenary.nvim" -- Useful lua functions used ny lots of plugins + use "ethanholz/nvim-lastplace" -- Preserve last editing position in nvim +--TreeSitter + use {'nvim-treesitter/nvim-treesitter',run = ':TSUpdate'} +--ColorSchemes + use "folke/tokyonight.nvim" + use "tiagovla/tokyodark.nvim" + use { 'AlphaTechnolog/pywal.nvim', as = 'pywal' } +--Web-devicons + use "kyazdani42/nvim-web-devicons" +--Lualine + use {'nvim-lualine/lualine.nvim', requires = { 'kyazdani42/nvim-web-devicons', opt = true }} +--Bufferline + use {'akinsho/bufferline.nvim', tag = "v2.*", requires = 'kyazdani42/nvim-web-devicons'} +--Nvim-tree File explorer for nvim + use {'nvim-tree/nvim-tree.lua', requires = { 'nvim-tree/nvim-web-devicons'}} +--Whick-key - displays a popup with possible key bindings + use 'folke/which-key.nvim' +--HTML +-- use 'windwp/nvim-ts-autotag' +--Markdown + Zenmode +--Telescope +-- use {'nvim-telescope/telescope.nvim', tag = '0.1.0', requires = { {'nvim-lua/plenary.nvim'} }} +--cmp +-- use 'hrsh7th/nvim-cmp' +--cmp plugins +-- use 'hrsh7th/cmp-buffer' +-- use 'hrsh7th/cmp-path' +-- use 'hrsh7th/cmp-cmdline' +-- use 'hrsh7th/cmp-nvim-lsp' + -- use 'neovim/nvim-lspconfig' + +-- use "saadparwaiz1/cmp_luasnip" -- snippet completions + + -- snippets +-- use "L3MON4D3/LuaSnip" --snippet engine +-- use "rafamadriz/friendly-snippets" -- a bunch of snippets to use + +--Autopairs for HTML + --use {"windwp/nvim-autopairs", wants = "nvim-treesitter", module = { "nvim-autopairs.completion.cmp", "nvim-autopairs" }, config = function() + --require("config.autopairs").setup() end,} +--CSS + use 'NvChad/nvim-colorizer.lua' + + +-- 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) diff --git a/.config/nvim/lua/justsaumit/treesitter-config.lua b/.config/nvim/lua/justsaumit/treesitter-config.lua new file mode 100644 index 0000000..17dbc62 --- /dev/null +++ b/.config/nvim/lua/justsaumit/treesitter-config.lua @@ -0,0 +1,20 @@ +require'nvim-treesitter.configs'.setup { + -- A list of parser names, or "all" + ensure_installed = { "bash", "c", "cpp","lua", "rust", "python", "go","html", "javascript", "latex", "markdown", "solidity", "sxhkdrc" }, + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- Automatically install missing parsers when entering buffer + auto_install = true, + + -- List of parsers to ignore installing (for "all") + highlight = { + -- `false` will disable the whole extension + enable = true, + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, + autotag = { + enable = true, + } +} diff --git a/.config/nvim/lua/justsaumit/which-key-config.lua b/.config/nvim/lua/justsaumit/which-key-config.lua new file mode 100644 index 0000000..b438f7e --- /dev/null +++ b/.config/nvim/lua/justsaumit/which-key-config.lua @@ -0,0 +1,11 @@ +local wk = require("which-key") +local mappings = { + q = {":q<CR>", "Quit"}, + Z = {":wq<CR>", "Save and Quit"}, + w = {":w<CR>", "Save"}, + x ={":bdelete<CR>", "Close"}, + f = { ":Telescope find_files<cr>", "Telescope Find Files" }, + g = { ":Telescope live_grep<cr>", "Telescope Live Grep" } +} +local opts = {prefix = '<leader>'} +wk.register(mappings, opts) diff --git a/.config/nvim/plugin/packer_compiled.lua b/.config/nvim/plugin/packer_compiled.lua new file mode 100644 index 0000000..23f432a --- /dev/null +++ b/.config/nvim/plugin/packer_compiled.lua @@ -0,0 +1,164 @@ +-- 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() + +_G._packer = _G._packer or {} +_G._packer.inside_compile = true + +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 + if threshold then + table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)') + end + + _G._packer.profile_output = results +end + +time([[Luarocks path setup]], true) +local package_path_str = "/home/saumit/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/saumit/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/saumit/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/saumit/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" +local install_cpath_pattern = "/home/saumit/.cache/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 = { + ["bufferline.nvim"] = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/bufferline.nvim", + url = "https://github.com/akinsho/bufferline.nvim" + }, + ["lualine.nvim"] = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/lualine.nvim", + url = "https://github.com/nvim-lualine/lualine.nvim" + }, + ["nvim-colorizer.lua"] = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/nvim-colorizer.lua", + url = "https://github.com/NvChad/nvim-colorizer.lua" + }, + ["nvim-lastplace"] = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/nvim-lastplace", + url = "https://github.com/ethanholz/nvim-lastplace" + }, + ["nvim-tree.lua"] = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/nvim-tree.lua", + url = "https://github.com/nvim-tree/nvim-tree.lua" + }, + ["nvim-treesitter"] = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/nvim-treesitter", + url = "https://github.com/nvim-treesitter/nvim-treesitter" + }, + ["nvim-web-devicons"] = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/nvim-web-devicons", + url = "https://github.com/kyazdani42/nvim-web-devicons" + }, + ["packer.nvim"] = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/packer.nvim", + url = "https://github.com/wbthomason/packer.nvim" + }, + ["plenary.nvim"] = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/plenary.nvim", + url = "https://github.com/nvim-lua/plenary.nvim" + }, + ["popup.nvim"] = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/popup.nvim", + url = "https://github.com/nvim-lua/popup.nvim" + }, + pywal = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/pywal", + url = "https://github.com/AlphaTechnolog/pywal.nvim" + }, + ["tokyodark.nvim"] = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/tokyodark.nvim", + url = "https://github.com/tiagovla/tokyodark.nvim" + }, + ["tokyonight.nvim"] = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/tokyonight.nvim", + url = "https://github.com/folke/tokyonight.nvim" + }, + ["which-key.nvim"] = { + loaded = true, + path = "/home/saumit/.local/share/nvim/site/pack/packer/start/which-key.nvim", + url = "https://github.com/folke/which-key.nvim" + } +} + +time([[Defining packer_plugins]], false) + +_G._packer.inside_compile = false +if _G._packer.needs_bufread == true then + vim.cmd("doautocmd BufRead") +end +_G._packer.needs_bufread = 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 |