diff options
| author | Kyren223 <ulmliad223@gmail.com> | 2024-07-07 11:48:41 +0300 |
|---|---|---|
| committer | Kyren223 <ulmliad223@gmail.com> | 2024-07-07 11:48:41 +0300 |
| commit | d0766aa55fa9638d980a1f1e6c67388dcd2cb571 (patch) | |
| tree | cba4b086208d716dac182f8f5baca85f8bfce9bd /.config/nvim | |
| parent | 403aa74f8ad7fab227c3dd282ac9143da9b25b7b (diff) | |
Neovim: refactored more files, including trouble, neotree, edgy and oil
Diffstat (limited to '.config/nvim')
| -rw-r--r-- | .config/nvim/TODO.md | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/TODO-edgy.lua | 3 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/TODO-lazydev.lua | 12 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/edgy.lua | 38 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/motions.lua | 15 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/neotree.lua (renamed from .config/nvim/lua/custom/plugins/TODO-neotree.lua) | 0 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/oil.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/trouble.lua (renamed from .config/nvim/lua/custom/plugins/TODO-trouble.lua) | 5 | ||||
| -rw-r--r-- | .config/nvim/lua/custom/plugins/utility.lua | 6 |
9 files changed, 64 insertions, 19 deletions
diff --git a/.config/nvim/TODO.md b/.config/nvim/TODO.md index 28cc687..eb359e6 100644 --- a/.config/nvim/TODO.md +++ b/.config/nvim/TODO.md @@ -11,6 +11,8 @@ - TODO: Remove the vsc*de snippets/completions and make my own luasnip snippets [tutorial](https://www.youtube.com/watch?v=FmHhonPjvvA) - TODO: Setup [nvim spectre](https://github.com/nvim-pack/nvim-spectre) +- TODO: learn what dot repeat is + # VERY IMPORTANT ## TODO: Code actions diff --git a/.config/nvim/lua/custom/plugins/TODO-edgy.lua b/.config/nvim/lua/custom/plugins/TODO-edgy.lua index ab91d31..05f0b98 100644 --- a/.config/nvim/lua/custom/plugins/TODO-edgy.lua +++ b/.config/nvim/lua/custom/plugins/TODO-edgy.lua @@ -12,7 +12,8 @@ return { return vim.bo[buf].buftype == 'help' end, }, - { ft = 'spectre_panel', size = { height = 0.4 } }, + -- TODO: Add spectral + -- { ft = 'spectre_panel', size = { height = 0.4 } }, }, left = { { diff --git a/.config/nvim/lua/custom/plugins/TODO-lazydev.lua b/.config/nvim/lua/custom/plugins/TODO-lazydev.lua deleted file mode 100644 index 988bf32..0000000 --- a/.config/nvim/lua/custom/plugins/TODO-lazydev.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - { 'Bilal2453/luvit-meta', lazy = true }, - { - 'folke/lazydev.nvim', - ft = 'lua', - opts = { - library = { - { path = 'luvit-meta/library', words = { 'vim%.uv' } }, - }, - }, - }, -} diff --git a/.config/nvim/lua/custom/plugins/edgy.lua b/.config/nvim/lua/custom/plugins/edgy.lua new file mode 100644 index 0000000..05f0b98 --- /dev/null +++ b/.config/nvim/lua/custom/plugins/edgy.lua @@ -0,0 +1,38 @@ +return { + 'folke/edgy.nvim', + event = 'VeryLazy', + opts = { + bottom = { + 'Trouble', + { ft = 'qf', title = 'QuickFix' }, + { + ft = 'help', + size = { height = 20 }, + filter = function(buf) -- only show help buffers + return vim.bo[buf].buftype == 'help' + end, + }, + -- TODO: Add spectral + -- { ft = 'spectre_panel', size = { height = 0.4 } }, + }, + left = { + { + title = 'Neo-Tree', + ft = 'neo-tree', + filter = function(buf) + return vim.b[buf].neo_tree_source == 'filesystem' + end, + size = { height = 0.5 }, + }, + { + title = 'Neo-Tree Git', + ft = 'neo-tree', + filter = function(buf) + return vim.b[buf].neo_tree_source == 'git_status' + end, + pinned = true, + open = 'Neotree position=right git_status', + }, + }, + }, +} diff --git a/.config/nvim/lua/custom/plugins/motions.lua b/.config/nvim/lua/custom/plugins/motions.lua index 3cfcfcf..f36e735 100644 --- a/.config/nvim/lua/custom/plugins/motions.lua +++ b/.config/nvim/lua/custom/plugins/motions.lua @@ -12,9 +12,14 @@ return { 'ggandor/leap.nvim', dependencies = { 'tpope/vim-repeat' }, config = function() - vim.keymap.set({ 'n', 'x', 'o' }, 's', '<Plug>(leap-forward)') - vim.keymap.set({ 'n', 'x', 'o' }, 'S', '<Plug>(leap-backward)') - vim.keymap.set({ 'n', 'x', 'o' }, 'gs', '<Plug>(leap-from-window)') + -- vim.keymap.set({ 'n', 'x', 'o' }, 's', '<Plug>(leap-forward)') + -- vim.keymap.set({ 'n', 'x', 'o' }, 'S', '<Plug>(leap-backward)') + -- vim.keymap.set({ 'n', 'x', 'o' }, 'gs', '<Plug>(leap-from-window)') + + vim.keymap.set('n', 's', '<Plug>(leap)') + vim.keymap.set('n', 'S', '<Plug>(leap-from-window)') + vim.keymap.set({ 'x', 'o' }, 's', '<Plug>(leap-forward)') + vim.keymap.set({ 'x', 'o' }, 'S', '<Plug>(leap-backward)') -- Define equivalence classes for brackets and quotes, in addition to -- the default whitespace group. @@ -68,8 +73,8 @@ return { vim.keymap.set('v', '{', '<Plug>(nvim-surround-visual){') vim.keymap.set('v', '}', '<Plug>(nvim-surround-visual)}') -- I still want to be able to do < and > for indentation - -- vim.keymap.set('v', '<', '<Plug>(nvim-surround-visual)<', opts) - -- vim.keymap.set('v', '>', '<Plug>(nvim-surround-visual)>', opts) + -- vim.keymap.set('v', '<', '<Plug>(nvim-surround-visual)<') + -- vim.keymap.set('v', '>', '<Plug>(nvim-surround-visual)>') vim.keymap.set('v', '[', '<Plug>(nvim-surround-visual)[') vim.keymap.set('v', ']', '<Plug>(nvim-surround-visual)]') vim.keymap.set('v', "'", "<Plug>(nvim-surround-visual)'") diff --git a/.config/nvim/lua/custom/plugins/TODO-neotree.lua b/.config/nvim/lua/custom/plugins/neotree.lua index b8a4ee9..b8a4ee9 100644 --- a/.config/nvim/lua/custom/plugins/TODO-neotree.lua +++ b/.config/nvim/lua/custom/plugins/neotree.lua diff --git a/.config/nvim/lua/custom/plugins/oil.lua b/.config/nvim/lua/custom/plugins/oil.lua index 1bf5672..714701c 100644 --- a/.config/nvim/lua/custom/plugins/oil.lua +++ b/.config/nvim/lua/custom/plugins/oil.lua @@ -10,6 +10,8 @@ return { ['<C-k>'] = false, ['<C-j>'] = false, ['<M-h>'] = 'actions.select_split', + ['<C-r>'] = 'actions.refresh', + ['<C-q>'] = "actions.close" }, view_options = { show_hidden = true, diff --git a/.config/nvim/lua/custom/plugins/TODO-trouble.lua b/.config/nvim/lua/custom/plugins/trouble.lua index 858572e..3239aa7 100644 --- a/.config/nvim/lua/custom/plugins/TODO-trouble.lua +++ b/.config/nvim/lua/custom/plugins/trouble.lua @@ -2,9 +2,12 @@ return { 'folke/trouble.nvim', opts = {}, cmd = 'Trouble', + -- TODO: Consider maybe using this for outlines (code structure) + -- and also configuring some of the keys to better fit me + -- and probably removing most of them in the process keys = { { - '<leader>xx', + '<leader>xx', '<cmd>Trouble diagnostics toggle<cr>', desc = 'Diagnostics (Trouble)', }, diff --git a/.config/nvim/lua/custom/plugins/utility.lua b/.config/nvim/lua/custom/plugins/utility.lua index 8b336ee..53a8c06 100644 --- a/.config/nvim/lua/custom/plugins/utility.lua +++ b/.config/nvim/lua/custom/plugins/utility.lua @@ -37,4 +37,10 @@ return { vim.keymap.set('n', '<leader>nc', ':Telescope neoclip plus<cr>', { desc = '[N]eo[c]lip History' }) end, }, + { 'Bilal2453/luvit-meta', lazy = true }, + { + 'folke/lazydev.nvim', + ft = 'lua', + opts = { library = { { path = 'luvit-meta/library', words = { 'vim%.uv' } } } }, + }, } |
