aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Berwaldt <zberwaldt@gmail.com>2023-02-21 23:40:09 -0500
committerZach Berwaldt <zberwaldt@gmail.com>2023-02-21 23:40:09 -0500
commitcf59818921085fc1e1434e3c8c3ed5cc972c8625 (patch)
tree41c1287ce9ea0954cd94b5dbb12dca7b20e4b011
first commit
-rw-r--r--after/plugin/telescope.lua6
-rw-r--r--init.lua1
-rw-r--r--lua/zberwaldt/init.lua3
-rw-r--r--lua/zberwaldt/packer.lua19
-rw-r--r--lua/zberwaldt/remap.lua2
-rw-r--r--lua/zberwaldt/set.lua29
-rw-r--r--plugin/packer_compiled.lua119
7 files changed, 179 insertions, 0 deletions
diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua
new file mode 100644
index 0000000..a39df98
--- /dev/null
+++ b/after/plugin/telescope.lua
@@ -0,0 +1,6 @@
1local builtin = require('telescope.builtin')
2vim.keymap.set('n', '<leader>pf', builtin.find_files, {})
3vim.keymap.set('n', '<C-p>', builtin.git_files, {})
4vim.keymap.set('n', '<leader>ps', function()
5 builtin.grep_string({ search = vim.fn.input("Grep > ") });
6end)
diff --git a/init.lua b/init.lua
new file mode 100644
index 0000000..9a7d361
--- /dev/null
+++ b/init.lua
@@ -0,0 +1 @@
require("zberwaldt")
diff --git a/lua/zberwaldt/init.lua b/lua/zberwaldt/init.lua
new file mode 100644
index 0000000..72e7237
--- /dev/null
+++ b/lua/zberwaldt/init.lua
@@ -0,0 +1,3 @@
1require('zberwaldt.packer')
2require('zberwaldt.remap')
3require('zberwaldt.set')
diff --git a/lua/zberwaldt/packer.lua b/lua/zberwaldt/packer.lua
new file mode 100644
index 0000000..276fbe8
--- /dev/null
+++ b/lua/zberwaldt/packer.lua
@@ -0,0 +1,19 @@
1vim.cmd [[packadd packer.nvim]]
2
3return require('packer').startup(function(use)
4 use 'wbthomason/packer.nvim'
5 use {
6 'nvim-telescope/telescope.nvim', tag = '0.1.1',
7 -- or , branch = '0.1.x',
8 requires = { {'nvim-lua/plenary.nvim'} }
9 }
10
11 use({
12 'navarasu/onedark.nvim',
13 as = 'onedark',
14 config = function()
15 vim.cmd('colorscheme onedark')
16 end
17 })
18
19end)
diff --git a/lua/zberwaldt/remap.lua b/lua/zberwaldt/remap.lua
new file mode 100644
index 0000000..b760350
--- /dev/null
+++ b/lua/zberwaldt/remap.lua
@@ -0,0 +1,2 @@
1vim.g.mapleader = " "
2vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
diff --git a/lua/zberwaldt/set.lua b/lua/zberwaldt/set.lua
new file mode 100644
index 0000000..f34f723
--- /dev/null
+++ b/lua/zberwaldt/set.lua
@@ -0,0 +1,29 @@
1vim.opt.nu = true
2vim.opt.relativenumber = true
3
4vim.opt.tabstop = 4
5vim.opt.softtabstop = 4
6vim.opt.shiftwidth = 4
7vim.opt.expandtab = true
8
9vim.smartindent = true
10
11vim.opt.wrap = true
12
13-- vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
14
15vim.opt.hlsearch = false
16vim.opt.incsearch = true
17
18vim.opt.termguicolors = true
19
20vim.opt.scrolloff = 8
21vim.opt.isfname:append("@-@")
22vim.opt.signcolumn = "yes"
23
24vim.opt.updatetime = 50
25
26vim.opt.colorcolumn = "80"
27
28vim.g.mapleader = " "
29
diff --git a/plugin/packer_compiled.lua b/plugin/packer_compiled.lua
new file mode 100644
index 0000000..bc432c6
--- /dev/null
+++ b/plugin/packer_compiled.lua
@@ -0,0 +1,119 @@
1-- Automatically generated packer.nvim plugin loader code
2
3if 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
6end
7
8vim.api.nvim_command('packadd packer.nvim')
9
10local no_errors, error_msg = pcall(function()
11
12_G._packer = _G._packer or {}
13_G._packer.inside_compile = true
14
15local time
16local profile_info
17local should_profile = false
18if 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
28else
29 time = function(chunk, start) end
30end
31
32local 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
49end
50
51time([[Luarocks path setup]], true)
52local package_path_str = "C:\\Users\\mephi\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.0-beta3\\share\\lua\\5.1\\?.lua;C:\\Users\\mephi\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.0-beta3\\share\\lua\\5.1\\?\\init.lua;C:\\Users\\mephi\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.0-beta3\\lib\\luarocks\\rocks-5.1\\?.lua;C:\\Users\\mephi\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.0-beta3\\lib\\luarocks\\rocks-5.1\\?\\init.lua"
53local install_cpath_pattern = "C:\\Users\\mephi\\AppData\\Local\\Temp\\nvim\\packer_hererocks\\2.1.0-beta3\\lib\\lua\\5.1\\?.so"
54if not string.find(package.path, package_path_str, 1, true) then
55 package.path = package.path .. ';' .. package_path_str
56end
57
58if not string.find(package.cpath, install_cpath_pattern, 1, true) then
59 package.cpath = package.cpath .. ';' .. install_cpath_pattern
60end
61
62time([[Luarocks path setup]], false)
63time([[try_loadstring definition]], true)
64local 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
72end
73
74time([[try_loadstring definition]], false)
75time([[Defining packer_plugins]], true)
76_G.packer_plugins = {
77 onedark = {
78 config = { "\27LJ\2\n7\0\0\3\0\3\0\0056\0\0\0009\0\1\0'\2\2\0B\0\2\1K\0\1\0\24colorscheme onedark\bcmd\bvim\0" },
79 loaded = true,
80 path = "C:\\Users\\mephi\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\onedark",
81 url = "https://github.com/navarasu/onedark.nvim"
82 },
83 ["packer.nvim"] = {
84 loaded = true,
85 path = "C:\\Users\\mephi\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\packer.nvim",
86 url = "https://github.com/wbthomason/packer.nvim"
87 },
88 ["plenary.nvim"] = {
89 loaded = true,
90 path = "C:\\Users\\mephi\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\plenary.nvim",
91 url = "https://github.com/nvim-lua/plenary.nvim"
92 },
93 ["telescope.nvim"] = {
94 loaded = true,
95 path = "C:\\Users\\mephi\\AppData\\Local\\nvim-data\\site\\pack\\packer\\start\\telescope.nvim",
96 url = "https://github.com/nvim-telescope/telescope.nvim"
97 }
98}
99
100time([[Defining packer_plugins]], false)
101-- Config for: onedark
102time([[Config for onedark]], true)
103try_loadstring("\27LJ\2\n7\0\0\3\0\3\0\0056\0\0\0009\0\1\0'\2\2\0B\0\2\1K\0\1\0\24colorscheme onedark\bcmd\bvim\0", "config", "onedark")
104time([[Config for onedark]], false)
105
106_G._packer.inside_compile = false
107if _G._packer.needs_bufread == true then
108 vim.cmd("doautocmd BufRead")
109end
110_G._packer.needs_bufread = false
111
112if should_profile then save_profiles() end
113
114end)
115
116if not no_errors then
117 error_msg = error_msg:gsub('"', '\\"')
118 vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
119end