Skip to content

Commit 0240fa5

Browse files
committed
use vim-rooter as global root plugin
- rm project.nvim & pounce - improve startup time
1 parent 5f2833c commit 0240fa5

File tree

5 files changed

+41
-40
lines changed

5 files changed

+41
-40
lines changed

autoload/aceforeverd/plugin.vim

+4-4
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,10 @@ function! s:config_plugins() abort
518518

519519
let g:slime_no_mappings = 1
520520

521+
" vim rooter
522+
PackAdd! vim-rooter
523+
let g:rooter_cd_cmd = 'lcd'
524+
521525
call aceforeverd#tags#setup()
522526
endfunction
523527

@@ -546,10 +550,6 @@ function! s:config_vim_only() abort
546550

547551
call s:coc()
548552

549-
" vim rooter
550-
PackAdd! vim-rooter
551-
let g:rooter_cd_cmd = 'lcd'
552-
553553
" startify
554554
PackAdd! vim-startify
555555
let g:startify_session_dir = '~/.vim/sessions/'

lua/aceforeverd/config/finder.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ function M.telescope()
5151
show_unindexed = false,
5252
},
5353
fzf = {
54-
fuzzy = true, -- false will only do exact matching
54+
fuzzy = true, -- false will only do exact matching
5555
override_generic_sorter = true, -- override the generic sorter
56-
override_file_sorter = true, -- override the file sorter
57-
case_mode = 'smart_case', -- or "ignore_case" or "respect_case"
56+
override_file_sorter = true, -- override the file sorter
57+
case_mode = 'smart_case', -- or "ignore_case" or "respect_case"
5858
-- the default case_mode is "smart_case"
5959
},
6060
},

lua/aceforeverd/lsp/common.lua

-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ local lsp_maps = {
184184
['<space>S'] = function()
185185
require('telescope.builtin').lsp_workspace_symbols()
186186
end,
187-
['<space>v'] = [[<cmd>Navbuddy<cr>]],
188187

189188
-- vim defaults
190189
['<space>gi'] = 'gi',

lua/aceforeverd/plugins/init.lua

+28-24
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ M.plugin_list = {
6969
'SmiteshP/nvim-navic',
7070
config = function()
7171
require('nvim-navic').setup({
72-
click = true,
72+
click = true, -- Single click to goto element, double click to open nvim-navbuddy
7373
lsp = { auto_attach = true },
7474
})
7575

@@ -90,9 +90,8 @@ M.plugin_list = {
9090
'MunifTanjim/nui.nvim',
9191
},
9292
opts = { lsp = { auto_attach = true } },
93-
cond = function()
94-
return vim.fn.has('nvim-0.10') == 1
95-
end
93+
cmd = { 'Navbuddy' },
94+
keys = { { '<space>v', '<cmd>Navbuddy<cr>', desc = 'navbuddy' } }
9695
},
9796

9897
-- {
@@ -187,6 +186,7 @@ M.plugin_list = {
187186
{
188187
-- LSP signature hint as you type
189188
'ray-x/lsp_signature.nvim',
189+
event = 'VeryLazy',
190190
config = function()
191191
require('lsp_signature').setup({
192192
bind = true,
@@ -209,7 +209,6 @@ M.plugin_list = {
209209
-- lsp enhance
210210
'b0o/schemastore.nvim',
211211
'SmiteshP/nvim-navic',
212-
'SmiteshP/nvim-navbuddy',
213212
'MunifTanjim/nui.nvim',
214213
},
215214
config = function()
@@ -317,12 +316,27 @@ M.plugin_list = {
317316
event = 'VeryLazy',
318317
},
319318

319+
{
320+
'nvimtools/none-ls.nvim',
321+
dependencies = {
322+
'nvim-lua/plenary.nvim',
323+
},
324+
config = function()
325+
require('aceforeverd.plugins.null-ls').setup()
326+
end,
327+
},
328+
320329
{
321330
'mfussenegger/nvim-lint',
322331
config = function()
323332
require('lint').linters_by_ft = {
324333
cpp = { 'cpplint' },
325334
c = { 'cpplint' },
335+
sh = {'shellcheck'},
336+
vim = { 'vint' },
337+
dockerfile = {'hadolint'},
338+
python = { 'pylint' },
339+
yaml = { 'actionlint' },
326340
}
327341

328342
vim.api.nvim_create_user_command('Lint', function() require('lint').try_lint() end, {})
@@ -343,6 +357,11 @@ M.plugin_list = {
343357
opts = {
344358
formatters_by_ft = {
345359
lua = { "stylua" },
360+
sh = { 'shfmt', 'shellharden' },
361+
python = { 'yapf' },
362+
cmake = { 'cmake_format' },
363+
c = { 'clang-format' },
364+
cpp = { 'clang-format' },
346365
},
347366
},
348367
cmd = { 'ConformInfo', 'Conform' }
@@ -669,11 +688,6 @@ M.plugin_list = {
669688
},
670689
},
671690

672-
{
673-
'rlane/pounce.nvim',
674-
cmd = { 'Pounce', 'PounceRepeat', 'PounceReg', 'PounceExpand' },
675-
keys = { { mode = { 'n', 'x', 'o' }, ';p', '<cmd>Pounce<cr>', desc = 'Pounce' } }
676-
},
677691
-- ==============================================
678692
-- MOTIONS END
679693
-- ==============================================
@@ -724,18 +738,6 @@ M.plugin_list = {
724738
},
725739
},
726740

727-
{
728-
'ahmedkhalf/project.nvim',
729-
config = function()
730-
require('project_nvim').setup({
731-
manual_mode = false,
732-
silent_chdir = true,
733-
scope_chdir = 'win',
734-
detection_methods = { 'pattern', 'lsp' },
735-
})
736-
end,
737-
},
738-
739741
{
740742
'nvim-neo-tree/neo-tree.nvim',
741743
branch = 'v3.x',
@@ -1088,6 +1090,7 @@ M.plugin_list = {
10881090
{
10891091
'stevearc/overseer.nvim',
10901092
opts = {},
1093+
cmd = { 'OverseerRun', 'OverseerRunCmd', 'OverseerBuild', 'OverseerTaskAction' }
10911094
},
10921095

10931096
-- colors
@@ -1167,13 +1170,14 @@ M.plugin_list = {
11671170
}
11681171
},
11691172

1170-
{
1173+
{
11711174
'MagicDuck/grug-far.nvim',
11721175
config = function()
11731176
require('grug-far').setup({
11741177
engine = 'ripgrep'
11751178
});
1176-
end
1179+
end,
1180+
cmd = { 'GrugFar' }
11771181
},
11781182

11791183
}

lua/aceforeverd/plugins/null-ls.lua

+6-8
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,8 @@ function M.setup()
1919
local null_ls = require('null-ls')
2020

2121
local sources = {
22-
-- code actions
23-
-- line comment to disable shellcheck error/warning
24-
-- null_ls.builtins.code_actions.shellcheck,
25-
26-
null_ls.builtins.formatting.shfmt.with({
27-
extra_args = { '-i', '4' },
28-
}),
29-
null_ls.builtins.formatting.shellharden,
22+
-- null_ls.builtins.formatting.shfmt.with({ extra_args = { '-i', '4' }, }),
23+
-- null_ls.builtins.formatting.shellharden,
3024
null_ls.builtins.formatting.stylua,
3125
null_ls.builtins.formatting.protolint,
3226
null_ls.builtins.formatting.yapf,
@@ -52,7 +46,11 @@ function M.setup()
5246
)
5347
end,
5448
}),
49+
50+
-- bashls includes shellcheck integration, skip it
5551
-- null_ls.builtins.diagnostics.shellcheck,
52+
53+
-- diagnosticsls sets more accurate errorformat for cpplint
5654
-- null_ls.builtins.diagnostics.cpplint.with({
5755
-- condition = function(utils)
5856
-- return utils.root_has_file({ 'CPPLINT.cfg' })

0 commit comments

Comments
 (0)