Skip to content

Commit e6207a9

Browse files
committed
Accidentally destroyed base .gitconfig
1 parent 2eedbb5 commit e6207a9

12 files changed

+139
-105
lines changed

.pre-commit-config.yaml

+4-10
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,7 @@ repos:
5050
- id: git-check
5151
- id: shellcheck
5252
- id: shfmt
53-
# - repo: https://github.com/lunarmodules/luacheck
54-
# rev: c795cbec5cbf022f2eb52f42cd1861c32d2b180f
55-
# hooks:
56-
# - id: luacheck
57-
# args: [--globals, --ignore 'accessing undefined variable', --filename]
58-
# - repo: https://github.com/JohnnyMorganz/StyLua
59-
# rev: v0.11.3
60-
# hooks:
61-
# - id: stylua-system
62-
# args: [--indent-type, Spaces]
53+
- repo: https://github.com/gitleaks/gitleaks
54+
rev: v8.21.2
55+
hooks:
56+
- id: gitleaks

tilde/.config/nvim/lua/pking/plugin/cmp.lua

+100-26
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,58 @@ return {
22
"hrsh7th/nvim-cmp",
33
event = "InsertEnter",
44
dependencies = {
5-
"hrsh7th/cmp-buffer", -- source for text in buffer
6-
"hrsh7th/cmp-path", -- source for file system paths
7-
"L3MON4D3/LuaSnip", -- snippet engine
8-
"saadparwaiz1/cmp_luasnip", -- for autocompletion
9-
"rafamadriz/friendly-snippets", -- useful snippets
10-
"onsails/lspkind.nvim", -- vs-code like pictograms
11-
"zbirenbaum/copilot.lua", -- copilot
12-
"zbirenbaum/copilot-cmp",
5+
"hrsh7th/cmp-buffer",
6+
"hrsh7th/cmp-path",
7+
"hrsh7th/cmp-cmdline",
138
"petertriho/cmp-git",
9+
"onsails/lspkind.nvim",
10+
{
11+
"saadparwaiz1/cmp_luasnip",
12+
dependencies = {
13+
{
14+
"L3MON4D3/LuaSnip",
15+
build = "make install_jsregexp",
16+
dependencies = { "rafamadriz/friendly-snippets" },
17+
},
18+
}
19+
},
20+
{
21+
"zbirenbaum/copilot-cmp",
22+
dependencies = { "zbirenbaum/copilot.lua" }
23+
},
1424
},
1525
config = function()
1626
local cmp = require("cmp")
1727
local luasnip = require("luasnip")
1828
local lspkind = require("lspkind")
19-
require("copilot_cmp").setup()
2029
require("cmp_git").setup()
2130
require("luasnip.loaders.from_vscode").lazy_load()
2231

32+
require('copilot').setup({
33+
suggestion = { enabled = false },
34+
panel = { enabled = false },
35+
filetypes = {
36+
[""] = false,
37+
commit = false,
38+
cvs = false,
39+
git = false,
40+
gitcommit = false,
41+
gitrebase = false,
42+
gitsendmail = false,
43+
help = false,
44+
hgcommit = false,
45+
man = false,
46+
markdown = false,
47+
md = false,
48+
mkd = false,
49+
svn = false,
50+
tex = false,
51+
text = false,
52+
yaml = false,
53+
},
54+
})
55+
56+
require("copilot_cmp").setup()
2357
-- Setup copilot icon in lspkind
2458
lspkind.init({
2559
symbol_map = {
@@ -46,34 +80,44 @@ return {
4680
["<C-e>"] = cmp.mapping.abort(), -- close completion window
4781
["<CR>"] = cmp.mapping.confirm({ select = false }),
4882
}),
49-
-- sources for autocompletion
5083
sources = cmp.config.sources({
5184
{ name = "copilot", group_index = 2, max_item_count = 3 },
5285
{ name = "nvim_lsp", group_index = 2 },
5386
{ name = "luasnip" }, -- snippets
54-
{ name = "buffer" }, -- text within current buffer
5587
{ name = "path" }, -- file system paths
88+
{
89+
name = 'buffer',
90+
option = {
91+
get_bufnrs = function()
92+
local bufs = {}
93+
for _, win in ipairs(vim.api.nvim_list_wins()) do
94+
bufs[vim.api.nvim_win_get_buf(win)] = true
95+
end
96+
return vim.tbl_keys(bufs)
97+
end
98+
}
99+
}
56100
}),
57101
-- configure lspkind for vs-code like pictograms in completion menu
58102
formatting = {
59103
format = lspkind.cmp_format({
60-
maxwidth = 50,
104+
maxwidth = 80,
61105
ellipsis_char = "...",
62106
}),
63107
},
64108
sorting = {
65109
priority_weight = 2,
66110
comparators = {
67111
require("copilot_cmp.comparators").prioritize,
68-
cmp.config.compare.offset,
69-
cmp.config.compare.exact,
70-
cmp.config.compare.sort_text,
71-
cmp.config.compare.score,
72-
cmp.config.compare.recently_used,
73-
cmp.config.compare.locality,
74-
cmp.config.compare.kind,
75-
cmp.config.compare.length,
76-
cmp.config.compare.order,
112+
cmp.config.compare.offset,
113+
cmp.config.compare.exact,
114+
cmp.config.compare.sort_text,
115+
cmp.config.compare.score,
116+
cmp.config.compare.recently_used,
117+
cmp.config.compare.locality,
118+
cmp.config.compare.kind,
119+
cmp.config.compare.length,
120+
cmp.config.compare.order,
77121
},
78122
},
79123
window = {
@@ -85,23 +129,53 @@ return {
85129
cmp.setup.filetype('gitcommit', {
86130
sources = cmp.config.sources({
87131
{ name = 'git' },
88-
}, {
89132
{ name = 'buffer' },
90133
})
91134
})
135+
136+
-- This doesn't work while using the cmd window. See below
137+
--[[
92138
cmp.setup.cmdline({ '/', '?' }, {
93139
mapping = cmp.mapping.preset.cmdline(),
94-
sources = {
140+
sources = cmp.config.sources({
95141
{ name = 'buffer' }
96-
}
142+
})
97143
})
144+
98145
cmp.setup.cmdline(':', {
99146
mapping = cmp.mapping.preset.cmdline(),
100147
sources = cmp.config.sources({
101-
{ name = 'path' }
102-
}, {
148+
{ name = 'path' },
103149
{ name = 'cmdline' }
104150
})
105151
})
152+
]]--
153+
154+
-- Hack to get cmp to work in command window https://github.com/hrsh7th/cmp-cmdline/pull/61#issuecomment-1243380455
155+
vim.api.nvim_create_augroup('CMP', { clear = true })
156+
vim.api.nvim_create_autocmd('CmdwinEnter', {
157+
group = 'CMP',
158+
pattern = '*',
159+
callback = function()
160+
cmp.setup.buffer({
161+
sources = cmp.config.sources({
162+
{ name = 'cmdline' },
163+
{ name = 'path' },
164+
{
165+
name = 'buffer',
166+
option = {
167+
get_bufnrs = function()
168+
local bufs = {}
169+
for _, win in ipairs(vim.api.nvim_list_wins()) do
170+
bufs[vim.api.nvim_win_get_buf(win)] = true
171+
end
172+
return vim.tbl_keys(bufs)
173+
end
174+
}
175+
},
176+
})
177+
})
178+
end
179+
})
106180
end
107181
}

tilde/.config/nvim/lua/pking/plugin/copilot.lua

-36
This file was deleted.

tilde/.config/nvim/lua/pking/plugin/lualine.lua

+11-6
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ return {
166166
modified = '',
167167
alternate_file = ' 󱞧 ',
168168
directory = '',
169+
readonly = '',
170+
unnamed = '[No Name]',
171+
newfile = '',
169172
},
170173
},
171174
},
@@ -187,10 +190,12 @@ return {
187190
file_status = true,
188191
newfile_status = true,
189192
symbols = {
190-
modified = '', -- Text to show when the file is modified.
191-
readonly = '', -- Text to show when the file is non-modifiable or readonly.
192-
unnamed = '[No Name]', -- Text to show for unnamed buffers.
193-
newfile = '', -- Text to show for new created file before first writting
193+
modified = '',
194+
alternate_file = ' 󱞧 ',
195+
directory = '',
196+
readonly = '',
197+
unnamed = '[No Name]',
198+
newfile = '',
194199
}
195200
},
196201
'location',
@@ -209,9 +214,9 @@ return {
209214
status = {
210215
hl = {
211216
enabled = "#859900",
212-
disabled = "#d70000",
217+
disabled = "#dc322f",
213218
warning = "#b58900",
214-
unknown = "#0087ff"
219+
unknown = "#268bd2"
215220
}
216221
},
217222
},

tilde/.config/nvim/lua/pking/plugin/solarized.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ return {
33
"ishan9299/nvim-solarized-lua",
44
lazy = false,
55
priority = 1000, -- make sure to load this before all the other start plugins
6-
commit = "8f9691b440c04325b37f8244215639939c36f285",
6+
commit = "d69a263c97cbc765ca442d682b3283aefd61d4ac",
77
config = function()
88
-- load the colorscheme here
99
vim.cmd([[

tilde/.config/nvim/lua/pking/plugin/spelling.lua

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
return {
22
{
33
"psliwka/vim-dirtytalk",
4-
build = ":DirtytalkUpdate"
4+
build = ":DirtytalkUpdate",
5+
config = function()
6+
vim.opt.spelllang = { "en", "programming" }
7+
vim.opt.spelloptions = { "camel", "noplainbuffer" }
8+
end,
59
},
610
{
711
"micarmst/vim-spellsync",

tilde/.config/nvim/lua/pking/plugin/telescope.lua

+3-13
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@ return {
66
{ "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find files" },
77
{ "<leader>rg", "<cmd>Telescope live_grep<cr>", desc = "Grep files" },
88
{ "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Grep files" },
9+
{ "<leader>b", "<cmd>Telescope buffers<cr>", desc = "Find buffers" },
910
{ "<leader>fb", "<cmd>Telescope buffers<cr>", desc = "Find buffers" },
1011
{ "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "Search help tags" },
1112
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "Find recent files" },
1213
{ "<leader>fs", "<cmd>Telescope grep_string<cr>", desc = "Grep current string" },
14+
{ "<leader>fl", "<cmd>Telescope highlights<cr>", desc = "Search vim highlights" },
1315
},
1416
cmd = "Telescope",
1517
branch = '0.1.x',
@@ -36,20 +38,8 @@ return {
3638
},
3739
})
3840

41+
-- Extension
3942
telescope.load_extension("fzf")
40-
41-
-- set keymaps
42-
local builtin = require('telescope.builtin')
43-
vim.keymap.set('n', '<leader>p', builtin.find_files, {})
44-
vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
45-
vim.keymap.set('n', '<leader>rg', builtin.live_grep, {})
46-
vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
47-
vim.keymap.set('n', '<leader>b', builtin.buffers, {})
48-
vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
49-
vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
50-
vim.keymap.set('n', '<leader>fr', builtin.oldfiles, {})
51-
vim.keymap.set('n', '<leader>fs', builtin.grep_string, {})
52-
vim.keymap.set('n', '<leader>fl', builtin.highlights, {})
5343
end,
5444
}
5545
}

tilde/.config/nvim/plugin/search-autocomplete.vim

-5
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
"augroup search_autocomplete
2+
" autocmd!
3+
" autocmd CmdlineEnter [/\?] call pking#plugins#search#search_mode_start()
4+
" autocmd CmdlineLeave [/\?] call pking#plugins#search#search_mode_stop()
5+
"augroup END

tilde/.config/nvim/spell/en.utf-8.add

+9-1
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,20 @@ Terraform
1313
autovacuum
1414
config
1515
configs
16+
cterm
17+
ctermbg
18+
ctermfg
19+
ctermfg
1620
datadoghq
1721
dotfiles
1822
downtime
1923
executables
24+
fzf
2025
github
2126
golang
27+
guibg
28+
guibg
29+
guifg
2230
hostname
2331
hostnames
2432
https
@@ -38,7 +46,7 @@ runbooks
3846
runtime
3947
scoremedia
4048
submodules
49+
sudo
4150
terraform
4251
theScore
43-
sudo
4452
uptime

tilde/.config/nvim/vimrc.vim

+1-6
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ set hlsearch
6868
autocmd customaugroup VimEnter,InsertLeave,BufEnter,BufWinEnter * setlocal cursorline
6969
autocmd customaugroup WinLeave,InsertEnter,BufLeave,BufWinLeave * setlocal nocursorline
7070

71-
set spelllang=en_us,programming
72-
set spelloptions=camel,noplainbuffer
73-
71+
" Other spelling options moves to `lua/pking/plugin/spelling.lua`
7472
set spell
7573

7674
" ========================================================================= }}}
@@ -191,9 +189,6 @@ nnoremap <leader>l >>
191189
nnoremap : q:
192190
nnoremap / q/
193191
nnoremap ? q?
194-
"map / <Plug>(incsearch-forward)
195-
"map ? <Plug>(incsearch-backward)
196-
"map g/ <Plug>(incsearch-stay)
197192
198193

199194
" Save a file as sudo

0 commit comments

Comments
 (0)