Skip to content

Commit ccf1d07

Browse files
committed
chore: remove trouble.nvim, add more laziness
1 parent 73f6ff4 commit ccf1d07

File tree

7 files changed

+83
-105
lines changed

7 files changed

+83
-105
lines changed

lua/custom/plugins/editor.lua

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ return {
33
'airblade/vim-rooter',
44
{
55
'declancm/maximize.nvim',
6-
config = function()
7-
local maximize = require 'maximize'
8-
maximize.setup()
9-
10-
vim.keymap.set('n', '<F3>', function()
11-
maximize.toggle()
12-
end, { desc = 'Maximize split toggle' })
13-
end,
6+
opts = {},
7+
keys = { {
8+
'<F3>',
9+
function()
10+
require('maximize').toggle()
11+
end,
12+
desc = 'Maximize split toggle',
13+
} },
1414
},
1515
{
1616
'ggandor/leap.nvim',
@@ -77,6 +77,7 @@ return {
7777
},
7878
{
7979
'akinsho/toggleterm.nvim',
80+
keys = { 'F7' },
8081
opts = {
8182
size = 10,
8283
open_mapping = [[<F7>]],
@@ -90,6 +91,7 @@ return {
9091
},
9192
{
9293
'filipdutescu/renamer.nvim',
94+
lazy = true,
9395
dependencies = {
9496
'nvim-lua/plenary.nvim',
9597
},

lua/custom/plugins/splits.lua

Lines changed: 59 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,62 @@
11
return {
22
'mrjones2014/smart-splits.nvim',
3-
config = function()
4-
require('smart-splits').setup()
5-
vim.keymap.set('n', '<C-h>', function()
6-
require('smart-splits').move_cursor_left()
7-
end, { desc = 'Move to left split' })
8-
vim.keymap.set('n', '<C-j>', function()
9-
require('smart-splits').move_cursor_down()
10-
end, { desc = 'Move to below split' })
11-
vim.keymap.set('n', '<C-k>', function()
12-
require('smart-splits').move_cursor_up()
13-
end, { desc = 'Move to above split' })
14-
vim.keymap.set('n', '<C-l>', function()
15-
require('smart-splits').move_cursor_right()
16-
end, { desc = 'Move to right split' })
17-
vim.keymap.set('n', '<C-Up>', function()
18-
require('smart-splits').resize_up()
19-
end, { desc = 'Resize split up' })
20-
vim.keymap.set('n', '<C-Down>', function()
21-
require('smart-splits').resize_down()
22-
end, { desc = 'Resize split down' })
23-
vim.keymap.set('n', '<C-Left>', function()
24-
require('smart-splits').resize_left()
25-
end, { desc = 'Resize split left' })
26-
vim.keymap.set('n', '<C-Right>', function()
27-
require('smart-splits').resize_right()
28-
end, { desc = 'Resize split right' })
29-
end,
3+
opts = {},
4+
keys = {
5+
{
6+
'<C-h>',
7+
function()
8+
require('smart-splits').move_cursor_left()
9+
end,
10+
desc = 'Move to left split',
11+
},
12+
{
13+
'<C-j>',
14+
function()
15+
require('smart-splits').move_cursor_down()
16+
end,
17+
desc = 'Move to below split',
18+
},
19+
{
20+
'<C-k>',
21+
function()
22+
require('smart-splits').move_cursor_up()
23+
end,
24+
desc = 'Move to above split',
25+
},
26+
{
27+
'<C-l>',
28+
function()
29+
require('smart-splits').move_cursor_right()
30+
end,
31+
desc = 'Move to right split',
32+
},
33+
{
34+
'<C-Left>',
35+
function()
36+
require('smart-splits').resize_left()
37+
end,
38+
desc = 'Resize split left',
39+
},
40+
{
41+
'<C-Down>',
42+
function()
43+
require('smart-splits').resize_down()
44+
end,
45+
desc = 'Resize split down',
46+
},
47+
{
48+
'<C-Up>',
49+
function()
50+
require('smart-splits').resize_up()
51+
end,
52+
desc = 'Resize split up',
53+
},
54+
{
55+
'<C-Right>',
56+
function()
57+
require('smart-splits').resize_right()
58+
end,
59+
desc = 'Resize split right',
60+
},
61+
},
3062
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
return { 'wakatime/vim-wakatime', lazy = false }

lua/kickstart/plugins/lspconfig.lua

Lines changed: 1 addition & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -11,58 +11,6 @@ return {
1111
},
1212
},
1313
},
14-
{
15-
'folke/trouble.nvim',
16-
opts = {},
17-
specs = {
18-
'folke/snacks.nvim',
19-
opts = function(_, opts)
20-
return vim.tbl_deep_extend('force', opts or {}, {
21-
picker = {
22-
actions = require('trouble.sources.snacks').actions,
23-
win = {
24-
input = {
25-
keys = {
26-
['<c-t>'] = {
27-
'trouble_open',
28-
mode = { 'n', 'i' },
29-
},
30-
},
31-
},
32-
},
33-
},
34-
})
35-
end,
36-
},
37-
cmd = 'Trouble',
38-
keys = {
39-
{
40-
'<leader>td',
41-
'<cmd>Trouble diagnostics toggle filter.buf=0<cr>',
42-
desc = 'Toggle buffer diag',
43-
},
44-
{
45-
'<leader>tD',
46-
'<cmd>Trouble diagnostics toggle<cr>',
47-
desc = 'Toggle diagnostics',
48-
},
49-
{
50-
'<leader>tl',
51-
'<cmd>Trouble loclist toggle<cr>',
52-
'Toggle loclist',
53-
},
54-
{
55-
'<leader>tq',
56-
'<cmd>Trouble qflist toggle<cr>',
57-
'Toggle quickfix',
58-
},
59-
{
60-
'<leader>tt',
61-
'<cmd>TodoTrouble toggle<cr>',
62-
'Toggle TODO',
63-
},
64-
},
65-
},
6614
{ -- LSP Configuration & Plugins
6715
'neovim/nvim-lspconfig',
6816
dependencies = {
@@ -252,15 +200,7 @@ return {
252200
virtual_text = {
253201
source = 'if_many',
254202
spacing = 2,
255-
format = function(diagnostic)
256-
local diagnostic_message = {
257-
[vim.diagnostic.severity.ERROR] = diagnostic.message,
258-
[vim.diagnostic.severity.WARN] = diagnostic.message,
259-
[vim.diagnostic.severity.INFO] = diagnostic.message,
260-
[vim.diagnostic.severity.HINT] = diagnostic.message,
261-
}
262-
return diagnostic_message[diagnostic.severity]
263-
end,
203+
prefix = vim.g.virtual_symbol,
264204
},
265205
}
266206

lua/kickstart/plugins/snacks.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ return {
123123
end,
124124
desc = 'Find Diagnostics',
125125
},
126+
{
127+
'<leader>ft',
128+
function()
129+
Snacks.picker.todo_comments()
130+
end,
131+
desc = 'Find TODOs',
132+
},
126133
{
127134
'<leader>fr',
128135
function()

lua/kickstart/plugins/todo-comments.lua

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,9 @@ return {
1111
},
1212
},
1313
search = {
14-
args = {
15-
'--color=never',
16-
'--no-heading',
17-
'--with-filename',
18-
'--line-number',
19-
'--column',
20-
'--pcre2',
21-
},
22-
pattern = [[\b(?!(?:SAFETY\b))(KEYWORDS):]],
14+
-- manually exclude SAFETY from search results
15+
-- Snacks.picker.todo_comments compatible
16+
pattern = [[\b(PERFORMANCE|OPTIMIZE|TESTING|WARNING|PASSED|FAILED|OPTIM|ISSUE|FIXIT|FIXME|PERF|NOTE|WARN|HACK|TODO|TEST|INFO|XXX|FIX|BUG):]],
2317
},
2418
},
2519
}

lua/options.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ vim.o.splitbelow = true
5959
vim.o.list = true
6060
vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '' }
6161

62+
vim.g.virtual_symbol = ''
63+
6264
-- Preview substitutions live, as you type!
6365
vim.o.inccommand = 'split'
6466

0 commit comments

Comments
 (0)