Skip to content

Commit 72de0e5

Browse files
committed
chore: format
feat(oil): autoload only when `<afile>` is a dir
1 parent 9a643bc commit 72de0e5

23 files changed

+456
-221
lines changed

.stylua.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
column_width = 119
1+
column_width = 79
22
indent_type = 'Spaces'
33
indent_width = 2
44
quote_style = 'AutoPreferSingle'

init.lua

+3-9
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,6 @@ vim.g.maplocalleader = ' '
142142

143143
require('core.options')
144144
require('core.packages')
145-
146-
vim.api.nvim_create_autocmd('User', {
147-
pattern = 'VeryLazy',
148-
callback = function ()
149-
require('core.autocmds')
150-
require('core.keymaps')
151-
require('core.commands')
152-
end
153-
})
145+
require('core.autocmds')
146+
require('core.keymaps')
147+
require('core.commands')

lua/configs/catppuccin.lua

+20-4
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,26 @@ require('catppuccin').setup({
115115
IblScope = { fg = colors.surface2 },
116116

117117
Todo = { fg = colors.mauve, bg = colors.none, style = { 'bold' } },
118-
['@comment.error'] = { fg = colors.red, bg = colors.none, style = { 'bold' } },
119-
['@comment.warning'] = { fg = colors.yellow, bg = colors.none, style = { 'bold' } },
120-
['@comment.note'] = { fg = colors.blue, bg = colors.none, style = { 'bold' } },
121-
['@comment.todo'] = { fg = colors.mauve, bg = colors.none, style = { 'bold' } },
118+
['@comment.error'] = {
119+
fg = colors.red,
120+
bg = colors.none,
121+
style = { 'bold' },
122+
},
123+
['@comment.warning'] = {
124+
fg = colors.yellow,
125+
bg = colors.none,
126+
style = { 'bold' },
127+
},
128+
['@comment.note'] = {
129+
fg = colors.blue,
130+
bg = colors.none,
131+
style = { 'bold' },
132+
},
133+
['@comment.todo'] = {
134+
fg = colors.mauve,
135+
bg = colors.none,
136+
style = { 'bold' },
137+
},
122138

123139
-- carbon
124140
Structure = { fg = colors.pink },

lua/configs/cmp.lua

+154-154
Original file line numberDiff line numberDiff line change
@@ -1,156 +1,156 @@
11
local cmp = require('cmp')
22

3-
cmp.setup({
4-
performance = {
5-
async_budget = 64,
6-
max_view_entries = 64,
7-
},
8-
snippet = {
9-
expand = function(args)
10-
vim.snippet.expand(args.body)
11-
end,
12-
},
13-
mapping = {
14-
['<C-p>'] = {
15-
['c'] = cmp.mapping.select_prev_item(),
16-
['i'] = function()
17-
if cmp.visible() then
18-
cmp.select_prev_item()
19-
else
20-
cmp.complete()
21-
end
22-
end,
23-
},
24-
['<C-n>'] = {
25-
['c'] = cmp.mapping.select_next_item(),
26-
['i'] = function()
27-
if cmp.visible() then
28-
cmp.select_next_item()
29-
else
30-
cmp.complete()
31-
end
32-
end,
33-
},
34-
['<Down>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c' }),
35-
['<Up>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c' }),
36-
['<PageDown>'] = cmp.mapping(
37-
cmp.mapping.select_next_item({
38-
count = vim.o.pumheight ~= 0 and math.ceil(vim.o.pumheight / 2) or 8,
39-
}),
40-
{ 'i', 'c' }
41-
),
42-
['<PageUp>'] = cmp.mapping(
43-
cmp.mapping.select_prev_item({
44-
count = vim.o.pumheight ~= 0 and math.ceil(vim.o.pumheight / 2) or 8,
45-
}),
46-
{ 'i', 'c' }
47-
),
48-
['<C-u>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
49-
['<C-d>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
50-
['<C-w>'] = cmp.mapping(function(fallback)
51-
if cmp.visible() then
52-
cmp.abort()
53-
else
54-
fallback()
55-
end
56-
end, { 'i', 'c' }),
57-
['<C-y>'] = cmp.mapping(
58-
cmp.mapping.confirm({
59-
behavior = cmp.ConfirmBehavior.Replace,
60-
select = false,
61-
}),
62-
{ 'i', 'c' }
63-
),
64-
65-
['<Tab>'] = {
66-
['c'] = function()
67-
if cmp.visible() then
68-
cmp.select_next_item()
69-
else
70-
cmp.complete()
71-
end
72-
end,
73-
['i'] = function(fallback)
74-
if vim.snippet.active({ direction = 1 }) then
75-
vim.snippet.jump(1)
76-
else
77-
fallback()
78-
end
79-
end,
80-
},
81-
['<S-Tab>'] = {
82-
['c'] = function()
83-
if cmp.visible() then
84-
cmp.select_prev_item()
85-
else
86-
cmp.complete()
87-
end
88-
end,
89-
['i'] = function(fallback)
90-
if vim.snippet.active({ direction = -1 }) then
91-
vim.snippet.jump(-1)
92-
else
93-
fallback()
94-
end
95-
end,
96-
},
97-
},
98-
sources = {
99-
{ name = 'nvim_lsp_signature_help' },
100-
{ name = 'nvim_lsp', max_item_count = 20 },
101-
{
102-
name = 'buffer',
103-
max_item_count = 8,
104-
},
105-
{ name = 'path' },
106-
{ name = 'calc' },
107-
},
108-
window = {
109-
documentation = {
110-
max_width = 80,
111-
max_height = 20,
112-
border = 'solid',
113-
},
114-
},
115-
formatting = {
116-
fields = { 'abbr', 'kind', 'menu' },
117-
format = function(entry, cmp_item)
118-
cmp_item.kind = ' ' .. (entry.source.name == 'calc' and icons.ui.Calculator .. 'Calculator'
119-
or entry.source.name == 'cmdline' and icons.ui.Cmd .. 'Command'
120-
or icons.kinds[cmp_item.kind] .. cmp_item.kind or '')
121-
return cmp_item
122-
end,
123-
},
124-
})
125-
126-
-- Use buffer source for `/`.
127-
cmp.setup.cmdline('/', {
128-
enabled = true,
129-
sources = { { name = 'buffer' } },
130-
})
131-
cmp.setup.cmdline('?', {
132-
enabled = true,
133-
sources = { { name = 'buffer' } },
134-
})
135-
-- Use cmdline & path source for ':'.
136-
cmp.setup.cmdline(':', {
137-
enabled = true,
138-
sources = {
139-
{
140-
name = 'path',
141-
group_index = 1,
142-
},
143-
{
144-
name = 'cmdline',
145-
option = {
146-
ignore_cmds = {},
147-
},
148-
group_index = 2,
149-
},
150-
},
151-
})
152-
153-
cmp.setup.cmdline('@', { enabled = false })
154-
cmp.setup.cmdline('>', { enabled = false })
155-
cmp.setup.cmdline('-', { enabled = false })
156-
cmp.setup.cmdline('=', { enabled = false })
3+
-- cmp.setup({
4+
-- performance = {
5+
-- async_budget = 64,
6+
-- max_view_entries = 64,
7+
-- },
8+
-- snippet = {
9+
-- expand = function(args)
10+
-- vim.snippet.expand(args.body)
11+
-- end,
12+
-- },
13+
-- mapping = {
14+
-- ['<C-p>'] = {
15+
-- ['c'] = cmp.mapping.select_prev_item(),
16+
-- ['i'] = function()
17+
-- if cmp.visible() then
18+
-- cmp.select_prev_item()
19+
-- else
20+
-- cmp.complete()
21+
-- end
22+
-- end,
23+
-- },
24+
-- ['<C-n>'] = {
25+
-- ['c'] = cmp.mapping.select_next_item(),
26+
-- ['i'] = function()
27+
-- if cmp.visible() then
28+
-- cmp.select_next_item()
29+
-- else
30+
-- cmp.complete()
31+
-- end
32+
-- end,
33+
-- },
34+
-- ['<Down>'] = cmp.mapping(cmp.mapping.select_next_item(), { 'i', 'c' }),
35+
-- ['<Up>'] = cmp.mapping(cmp.mapping.select_prev_item(), { 'i', 'c' }),
36+
-- ['<PageDown>'] = cmp.mapping(
37+
-- cmp.mapping.select_next_item({
38+
-- count = vim.o.pumheight ~= 0 and math.ceil(vim.o.pumheight / 2) or 8,
39+
-- }),
40+
-- { 'i', 'c' }
41+
-- ),
42+
-- ['<PageUp>'] = cmp.mapping(
43+
-- cmp.mapping.select_prev_item({
44+
-- count = vim.o.pumheight ~= 0 and math.ceil(vim.o.pumheight / 2) or 8,
45+
-- }),
46+
-- { 'i', 'c' }
47+
-- ),
48+
-- ['<C-u>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
49+
-- ['<C-d>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
50+
-- ['<C-w>'] = cmp.mapping(function(fallback)
51+
-- if cmp.visible() then
52+
-- cmp.abort()
53+
-- else
54+
-- fallback()
55+
-- end
56+
-- end, { 'i', 'c' }),
57+
-- ['<C-y>'] = cmp.mapping(
58+
-- cmp.mapping.confirm({
59+
-- behavior = cmp.ConfirmBehavior.Replace,
60+
-- select = false,
61+
-- }),
62+
-- { 'i', 'c' }
63+
-- ),
64+
--
65+
-- ['<Tab>'] = {
66+
-- ['c'] = function()
67+
-- if cmp.visible() then
68+
-- cmp.select_next_item()
69+
-- else
70+
-- cmp.complete()
71+
-- end
72+
-- end,
73+
-- ['i'] = function(fallback)
74+
-- if vim.snippet.active({ direction = 1 }) then
75+
-- vim.snippet.jump(1)
76+
-- else
77+
-- fallback()
78+
-- end
79+
-- end,
80+
-- },
81+
-- ['<S-Tab>'] = {
82+
-- ['c'] = function()
83+
-- if cmp.visible() then
84+
-- cmp.select_prev_item()
85+
-- else
86+
-- cmp.complete()
87+
-- end
88+
-- end,
89+
-- ['i'] = function(fallback)
90+
-- if vim.snippet.active({ direction = -1 }) then
91+
-- vim.snippet.jump(-1)
92+
-- else
93+
-- fallback()
94+
-- end
95+
-- end,
96+
-- },
97+
-- },
98+
-- sources = {
99+
-- { name = 'nvim_lsp_signature_help' },
100+
-- { name = 'nvim_lsp', max_item_count = 20 },
101+
-- {
102+
-- name = 'buffer',
103+
-- max_item_count = 8,
104+
-- },
105+
-- { name = 'path' },
106+
-- { name = 'calc' },
107+
-- },
108+
-- window = {
109+
-- documentation = {
110+
-- max_width = 80,
111+
-- max_height = 20,
112+
-- border = 'solid',
113+
-- },
114+
-- },
115+
-- formatting = {
116+
-- fields = { 'abbr', 'kind', 'menu' },
117+
-- format = function(entry, cmp_item)
118+
-- cmp_item.kind = ' ' .. (entry.source.name == 'calc' and icons.ui.Calculator .. 'Calculator'
119+
-- or entry.source.name == 'cmdline' and icons.ui.Cmd .. 'Command'
120+
-- or icons.kinds[cmp_item.kind] .. cmp_item.kind or '')
121+
-- return cmp_item
122+
-- end,
123+
-- },
124+
-- })
125+
--
126+
-- -- Use buffer source for `/`.
127+
-- cmp.setup.cmdline('/', {
128+
-- enabled = true,
129+
-- sources = { { name = 'buffer' } },
130+
-- })
131+
-- cmp.setup.cmdline('?', {
132+
-- enabled = true,
133+
-- sources = { { name = 'buffer' } },
134+
-- })
135+
-- -- Use cmdline & path source for ':'.
136+
-- cmp.setup.cmdline(':', {
137+
-- enabled = true,
138+
-- sources = {
139+
-- {
140+
-- name = 'path',
141+
-- group_index = 1,
142+
-- },
143+
-- {
144+
-- name = 'cmdline',
145+
-- option = {
146+
-- ignore_cmds = {},
147+
-- },
148+
-- group_index = 2,
149+
-- },
150+
-- },
151+
-- })
152+
--
153+
-- cmp.setup.cmdline('@', { enabled = false })
154+
-- cmp.setup.cmdline('>', { enabled = false })
155+
-- cmp.setup.cmdline('-', { enabled = false })
156+
-- cmp.setup.cmdline('=', { enabled = false })

lua/configs/neorg.lua

+9-5
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ require('neorg').setup({
22
load = {
33
['core.defaults'] = {},
44
['core.concealer'] = {},
5-
['core.dirman'] = { config = { workspaces = {
6-
todos = '~/Documents/Todos',
7-
notes = '~/Documents/Notes',
8-
} } }
9-
}
5+
['core.dirman'] = {
6+
config = {
7+
workspaces = {
8+
todos = '~/Documents/Todos',
9+
notes = '~/Documents/Notes',
10+
},
11+
},
12+
},
13+
},
1014
})

0 commit comments

Comments
 (0)