Skip to content

Commit

Permalink
use vim-rooter as global root plugin
Browse files Browse the repository at this point in the history
- rm project.nvim & pounce
- improve startup time
  • Loading branch information
aceforeverd committed Aug 22, 2024
1 parent 5f2833c commit 0240fa5
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 40 deletions.
8 changes: 4 additions & 4 deletions autoload/aceforeverd/plugin.vim
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,10 @@ function! s:config_plugins() abort

let g:slime_no_mappings = 1

" vim rooter
PackAdd! vim-rooter
let g:rooter_cd_cmd = 'lcd'

call aceforeverd#tags#setup()
endfunction

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

call s:coc()

" vim rooter
PackAdd! vim-rooter
let g:rooter_cd_cmd = 'lcd'

" startify
PackAdd! vim-startify
let g:startify_session_dir = '~/.vim/sessions/'
Expand Down
6 changes: 3 additions & 3 deletions lua/aceforeverd/config/finder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ function M.telescope()
show_unindexed = false,
},
fzf = {
fuzzy = true, -- false will only do exact matching
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = 'smart_case', -- or "ignore_case" or "respect_case"
override_file_sorter = true, -- override the file sorter
case_mode = 'smart_case', -- or "ignore_case" or "respect_case"
-- the default case_mode is "smart_case"
},
},
Expand Down
1 change: 0 additions & 1 deletion lua/aceforeverd/lsp/common.lua
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ local lsp_maps = {
['<space>S'] = function()
require('telescope.builtin').lsp_workspace_symbols()
end,
['<space>v'] = [[<cmd>Navbuddy<cr>]],

-- vim defaults
['<space>gi'] = 'gi',
Expand Down
52 changes: 28 additions & 24 deletions lua/aceforeverd/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ M.plugin_list = {
'SmiteshP/nvim-navic',
config = function()
require('nvim-navic').setup({
click = true,
click = true, -- Single click to goto element, double click to open nvim-navbuddy
lsp = { auto_attach = true },
})

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

-- {
Expand Down Expand Up @@ -187,6 +186,7 @@ M.plugin_list = {
{
-- LSP signature hint as you type
'ray-x/lsp_signature.nvim',
event = 'VeryLazy',
config = function()
require('lsp_signature').setup({
bind = true,
Expand All @@ -209,7 +209,6 @@ M.plugin_list = {
-- lsp enhance
'b0o/schemastore.nvim',
'SmiteshP/nvim-navic',
'SmiteshP/nvim-navbuddy',
'MunifTanjim/nui.nvim',
},
config = function()
Expand Down Expand Up @@ -317,12 +316,27 @@ M.plugin_list = {
event = 'VeryLazy',
},

{
'nvimtools/none-ls.nvim',
dependencies = {
'nvim-lua/plenary.nvim',
},
config = function()
require('aceforeverd.plugins.null-ls').setup()
end,
},

{
'mfussenegger/nvim-lint',
config = function()
require('lint').linters_by_ft = {
cpp = { 'cpplint' },
c = { 'cpplint' },
sh = {'shellcheck'},
vim = { 'vint' },
dockerfile = {'hadolint'},
python = { 'pylint' },
yaml = { 'actionlint' },
}

vim.api.nvim_create_user_command('Lint', function() require('lint').try_lint() end, {})
Expand All @@ -343,6 +357,11 @@ M.plugin_list = {
opts = {
formatters_by_ft = {
lua = { "stylua" },
sh = { 'shfmt', 'shellharden' },
python = { 'yapf' },
cmake = { 'cmake_format' },
c = { 'clang-format' },
cpp = { 'clang-format' },
},
},
cmd = { 'ConformInfo', 'Conform' }
Expand Down Expand Up @@ -669,11 +688,6 @@ M.plugin_list = {
},
},

{
'rlane/pounce.nvim',
cmd = { 'Pounce', 'PounceRepeat', 'PounceReg', 'PounceExpand' },
keys = { { mode = { 'n', 'x', 'o' }, ';p', '<cmd>Pounce<cr>', desc = 'Pounce' } }
},
-- ==============================================
-- MOTIONS END
-- ==============================================
Expand Down Expand Up @@ -724,18 +738,6 @@ M.plugin_list = {
},
},

{
'ahmedkhalf/project.nvim',
config = function()
require('project_nvim').setup({
manual_mode = false,
silent_chdir = true,
scope_chdir = 'win',
detection_methods = { 'pattern', 'lsp' },
})
end,
},

{
'nvim-neo-tree/neo-tree.nvim',
branch = 'v3.x',
Expand Down Expand Up @@ -1088,6 +1090,7 @@ M.plugin_list = {
{
'stevearc/overseer.nvim',
opts = {},
cmd = { 'OverseerRun', 'OverseerRunCmd', 'OverseerBuild', 'OverseerTaskAction' }
},

-- colors
Expand Down Expand Up @@ -1167,13 +1170,14 @@ M.plugin_list = {
}
},

{
{
'MagicDuck/grug-far.nvim',
config = function()
require('grug-far').setup({
engine = 'ripgrep'
});
end
end,
cmd = { 'GrugFar' }
},

}
Expand Down
14 changes: 6 additions & 8 deletions lua/aceforeverd/plugins/null-ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,8 @@ function M.setup()
local null_ls = require('null-ls')

local sources = {
-- code actions
-- line comment to disable shellcheck error/warning
-- null_ls.builtins.code_actions.shellcheck,

null_ls.builtins.formatting.shfmt.with({
extra_args = { '-i', '4' },
}),
null_ls.builtins.formatting.shellharden,
-- null_ls.builtins.formatting.shfmt.with({ extra_args = { '-i', '4' }, }),
-- null_ls.builtins.formatting.shellharden,
null_ls.builtins.formatting.stylua,
null_ls.builtins.formatting.protolint,
null_ls.builtins.formatting.yapf,
Expand All @@ -52,7 +46,11 @@ function M.setup()
)
end,
}),

-- bashls includes shellcheck integration, skip it
-- null_ls.builtins.diagnostics.shellcheck,

-- diagnosticsls sets more accurate errorformat for cpplint
-- null_ls.builtins.diagnostics.cpplint.with({
-- condition = function(utils)
-- return utils.root_has_file({ 'CPPLINT.cfg' })
Expand Down

0 comments on commit 0240fa5

Please sign in to comment.