Skip to content

Commit

Permalink
Remove unused plugins from nvim
Browse files Browse the repository at this point in the history
  • Loading branch information
miszo committed Nov 24, 2023
1 parent a2049b5 commit 8a7a479
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 71 deletions.
6 changes: 3 additions & 3 deletions home/dot_config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"friendly-snippets": { "branch": "main", "commit": "43727c2ff84240e55d4069ec3e6158d74cb534b6" },
"gitsigns.nvim": { "branch": "main", "commit": "5fc573f2d2a49aec74dd6dc977e8b137429d1897" },
"headlines.nvim": { "branch": "master", "commit": "e3d7bfdf40e41a020d966d35f8b48d75b90367d2" },
"inc-rename.nvim": { "branch": "main", "commit": "ed0f6f2b917cac4eb3259f907da0a481b27a3b7e" },
"incline.nvim": { "branch": "main", "commit": "fdd7e08a6e3d0dd8d9aa02428861fa30c37ba306" },
"indent-blankline.nvim": { "branch": "master", "commit": "29be0919b91fb59eca9e90690d76014233392bef" },
"lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" },
Expand Down Expand Up @@ -68,7 +67,7 @@
"overseer.nvim": { "branch": "master", "commit": "6f462a61ce9a5f47743cbf78454bed14a855eb03" },
"persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" },
"playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
"plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
"plenary.nvim": { "branch": "master", "commit": "c47e1a21d235a422034012935febd2d078d77ac6" },
"project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" },
"refactoring.nvim": { "branch": "master", "commit": "156532476deb10b1b2a32cb38e1078b3f9951c42" },
"rest.nvim": { "branch": "main", "commit": "c186d3e5bc5f962fd026daf087fec8364101db57" },
Expand All @@ -81,7 +80,7 @@
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" },
"telescope-undo.nvim": { "branch": "main", "commit": "d3afc1c105535a90caec092ce27a113f77ba7b84" },
"telescope.nvim": { "branch": "master", "commit": "18774ec7929c8a8003a91e9e1f69f6c32258bbfe" },
"text-case.nvim": { "branch": "main", "commit": "8a7fc1d4d7ddeec59e142ea97a1a746fd335e241" },
"text-case.nvim": { "branch": "main", "commit": "38f362b121952529f921abbf7c91b7cf748e136d" },
"todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" },
"tokyonight.nvim": { "branch": "main", "commit": "f247ee700b569ed43f39320413a13ba9b0aef0db" },
"trouble.nvim": { "branch": "main", "commit": "f1168feada93c0154ede4d1fe9183bf69bac54ea" },
Expand All @@ -92,6 +91,7 @@
"vim-dadbod-ui": { "branch": "master", "commit": "95fd22469507e86b78aa55d868c14108adee2881" },
"vim-illuminate": { "branch": "master", "commit": "3bd2ab64b5d63b29e05691e624927e5ebbf0fb86" },
"vim-startuptime": { "branch": "master", "commit": "454b3de856b7bd298700de33d79774ca9b9e3875" },
"vim-wordmotion": { "branch": "master", "commit": "81d9bd298376ab0dc465c85d55afa4cb8d5f47a1" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
"yanky.nvim": { "branch": "main", "commit": "5ba331de8a8d18e1ec345d26e865bc3a0db2e8be" },
"zen-mode.nvim": { "branch": "main", "commit": "50e2e2a36cc97847d9ab3b1a3555ba2ef6839b50" }
Expand Down
4 changes: 3 additions & 1 deletion home/dot_config/nvim/lua/config/autocmds.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ vim.api.nvim_create_autocmd('FileType', {

vim.api.nvim_create_autocmd('VimLeavePre', {
callback = function()
require('util.tasks').dispose_all_tasks()
local tasks = require('util.tasks')
tasks.stop_all_task()
tasks.dispose_all_tasks()
end,
})
28 changes: 21 additions & 7 deletions home/dot_config/nvim/lua/plugins/coding.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ return {
},
opts = { snippet_engine = 'luasnip' },
},
-- Incremental rename
{
'smjonas/inc-rename.nvim',
cmd = 'IncRename',
config = true,
},
-- Refactoring
{
'ThePrimeagen/refactoring.nvim',
Expand Down Expand Up @@ -110,6 +104,10 @@ return {
'johmsalas/text-case.nvim',
config = true,
},
-- Word navigation
{
'chaoren/vim-wordmotion',
},
-- Tasks
{
'stevearc/overseer.nvim',
Expand All @@ -131,12 +129,28 @@ return {
desc = 'Task Action',
},
{
'<leader>rq',
'<leader>rs',
function()
require('util.tasks').stop_all_tasks()
end,
desc = 'Stop All Tasks',
},
{
'<leader>rd',
function()
require('util.tasks').dispose_all_tasks()
end,
desc = 'Dispose All Tasks',
},
{
'<leader>rq',
function()
local tasks = require('util.tasks')
tasks.stop_all_tasks()
tasks.dispose_all_tasks()
end,
desc = 'Stop and Dispose All Tasks',
},
},
opts = {
templates = {
Expand Down
13 changes: 0 additions & 13 deletions home/dot_config/nvim/lua/plugins/icons.lua

This file was deleted.

16 changes: 0 additions & 16 deletions home/dot_config/nvim/lua/plugins/noice.lua

This file was deleted.

11 changes: 0 additions & 11 deletions home/dot_config/nvim/lua/plugins/notify.lua

This file was deleted.

7 changes: 0 additions & 7 deletions home/dot_config/nvim/lua/plugins/statuscol.lua

This file was deleted.

16 changes: 8 additions & 8 deletions home/dot_config/nvim/lua/plugins/ui.lua
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
return {
{
'folke/noice.nvim',
opts = {
presets = {
opts = function(_, opts)
table.insert(opts.presets, {
lsp_doc_border = true,
},
lsp = {
})
opts.lsp.progress = vim.tbl_extend('keep', opts.lsp, {
progress = {
enabled = true,
},
},
messages = {
})
opts.messages = {
enabled = false,
},
},
}
end,
},
{
'rcarriga/nvim-notify',
Expand Down
3 changes: 0 additions & 3 deletions home/dot_config/nvim/lua/plugins/zen.lua

This file was deleted.

16 changes: 14 additions & 2 deletions home/dot_config/nvim/lua/util/tasks.lua
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
local M = {}

function M.dispose_all_tasks()
--- Iterate over all tasks and run an action on each one
--- @param actionName string
function M.run_on_every_task(actionName)
local status, overseer = pcall(require, 'overseer')
if not status then
return
end

local tasks = overseer.list_tasks({ unique = false })
for _, task in ipairs(tasks) do
overseer.run_action(task, 'dispose')
overseer.run_action(task, actionName)
end
end

--- Dispose all tasks
function M.dispose_all_tasks()
M.run_on_every_task('dispose')
end

--- Stop all tasks
function M.stop_all_tasks()
M.run_on_every_task('stop')
end

return M

0 comments on commit 8a7a479

Please sign in to comment.