diff --git a/home/dot_config/nvim/lazy-lock.json b/home/dot_config/nvim/lazy-lock.json index 4beee3f..3cea536 100644 --- a/home/dot_config/nvim/lazy-lock.json +++ b/home/dot_config/nvim/lazy-lock.json @@ -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" }, @@ -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" }, @@ -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" }, @@ -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" } diff --git a/home/dot_config/nvim/lua/config/autocmds.lua b/home/dot_config/nvim/lua/config/autocmds.lua index 8e12f03..4c654ea 100644 --- a/home/dot_config/nvim/lua/config/autocmds.lua +++ b/home/dot_config/nvim/lua/config/autocmds.lua @@ -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, }) diff --git a/home/dot_config/nvim/lua/plugins/coding.lua b/home/dot_config/nvim/lua/plugins/coding.lua index 4f433c0..4e4ee34 100644 --- a/home/dot_config/nvim/lua/plugins/coding.lua +++ b/home/dot_config/nvim/lua/plugins/coding.lua @@ -13,12 +13,6 @@ return { }, opts = { snippet_engine = 'luasnip' }, }, - -- Incremental rename - { - 'smjonas/inc-rename.nvim', - cmd = 'IncRename', - config = true, - }, -- Refactoring { 'ThePrimeagen/refactoring.nvim', @@ -110,6 +104,10 @@ return { 'johmsalas/text-case.nvim', config = true, }, + -- Word navigation + { + 'chaoren/vim-wordmotion', + }, -- Tasks { 'stevearc/overseer.nvim', @@ -131,12 +129,28 @@ return { desc = 'Task Action', }, { - 'rq', + 'rs', + function() + require('util.tasks').stop_all_tasks() + end, + desc = 'Stop All Tasks', + }, + { + 'rd', function() require('util.tasks').dispose_all_tasks() end, desc = 'Dispose All Tasks', }, + { + 'rq', + function() + local tasks = require('util.tasks') + tasks.stop_all_tasks() + tasks.dispose_all_tasks() + end, + desc = 'Stop and Dispose All Tasks', + }, }, opts = { templates = { diff --git a/home/dot_config/nvim/lua/plugins/icons.lua b/home/dot_config/nvim/lua/plugins/icons.lua deleted file mode 100644 index 8a6a908..0000000 --- a/home/dot_config/nvim/lua/plugins/icons.lua +++ /dev/null @@ -1,13 +0,0 @@ -return { - 'nvim-tree/nvim-web-devicons', - config = function() - require('nvim-web-devicons').set_icon({ - gql = { - icon = '', - color = '#e535ab', - cterm_color = '199', - name = 'GraphQL', - }, - }) - end, -} diff --git a/home/dot_config/nvim/lua/plugins/noice.lua b/home/dot_config/nvim/lua/plugins/noice.lua deleted file mode 100644 index 667c65f..0000000 --- a/home/dot_config/nvim/lua/plugins/noice.lua +++ /dev/null @@ -1,16 +0,0 @@ -return { - 'folke/noice.nvim', - opts = { - presets = { - lsp_doc_border = true, - }, - lsp = { - progress = { - enabled = true, - }, - }, - messages = { - enabled = false, - }, - }, -} diff --git a/home/dot_config/nvim/lua/plugins/notify.lua b/home/dot_config/nvim/lua/plugins/notify.lua deleted file mode 100644 index 8481c3a..0000000 --- a/home/dot_config/nvim/lua/plugins/notify.lua +++ /dev/null @@ -1,11 +0,0 @@ -return { - { - 'rcarriga/nvim-notify', - opts = { - -- background_colour = '#000000', - level = vim.log.levels.ERROR, -- help vim.log.levels - render = 'default', - stages = 'fade_in_slide_out', - }, - }, -} diff --git a/home/dot_config/nvim/lua/plugins/statuscol.lua b/home/dot_config/nvim/lua/plugins/statuscol.lua deleted file mode 100644 index 43c7509..0000000 --- a/home/dot_config/nvim/lua/plugins/statuscol.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - -- https://github.com/luukvbaal/statuscol.nvim - { - 'luukvbaal/statuscol.nvim', - config = true, - }, -} diff --git a/home/dot_config/nvim/lua/plugins/ui.lua b/home/dot_config/nvim/lua/plugins/ui.lua index 34835e7..1049344 100644 --- a/home/dot_config/nvim/lua/plugins/ui.lua +++ b/home/dot_config/nvim/lua/plugins/ui.lua @@ -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', diff --git a/home/dot_config/nvim/lua/plugins/zen.lua b/home/dot_config/nvim/lua/plugins/zen.lua deleted file mode 100644 index 95af00c..0000000 --- a/home/dot_config/nvim/lua/plugins/zen.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - { 'folke/zen-mode.nvim' }, -} diff --git a/home/dot_config/nvim/lua/util/tasks.lua b/home/dot_config/nvim/lua/util/tasks.lua index 5d6d916..1b6cd7c 100644 --- a/home/dot_config/nvim/lua/util/tasks.lua +++ b/home/dot_config/nvim/lua/util/tasks.lua @@ -1,6 +1,8 @@ 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 @@ -8,8 +10,18 @@ function M.dispose_all_tasks() 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