diff options
author | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-03-20 18:51:25 +0100 |
---|---|---|
committer | Gustaf Rydholm <gustaf.rydholm@gmail.com> | 2021-03-20 18:51:25 +0100 |
commit | ca562c5deac5ac40627ce58f690b432a200e7546 (patch) | |
tree | 56d64ab7bd4e03f870aeb87752e8b4d902e35fef /.config/nvim | |
parent | 697cc10961f687f3762c82c8a46f128c25471d67 (diff) |
refactor nvim config
Diffstat (limited to '.config/nvim')
-rw-r--r-- | .config/nvim/init.lua | 4 | ||||
-rw-r--r-- | .config/nvim/lua/plugins.lua | 21 | ||||
-rw-r--r-- | .config/nvim/lua/utils.lua | 38 |
3 files changed, 14 insertions, 49 deletions
diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index 45826ca..0e5e099 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -18,15 +18,15 @@ require('_gitsigns') require('_hop') require('_illuminate') require('_matchup') --- require('_limeligth') require('_neogit') require('_nvimtree') require('_quickscope') require('_rnvimr') require('_startify') --- require('_treesitter') +require('_treesitter') require('_vim-rooter') require('_vim-bbye') +require('_peekup') -- bufferline and statusline require('_galaxyline') diff --git a/.config/nvim/lua/plugins.lua b/.config/nvim/lua/plugins.lua index fece949..7687b1f 100644 --- a/.config/nvim/lua/plugins.lua +++ b/.config/nvim/lua/plugins.lua @@ -74,25 +74,27 @@ return require('packer').startup(function() -- Easily Create Gists use 'mattn/vim-gist' use 'mattn/webapi-vim' + + -- Registers + use 'gennaro-tedesco/nvim-peekup' -- General Plugins + use 'turbio/bracey.vim' + use 'metakirby5/codi.vim' use 'windwp/nvim-autopairs' use 'kevinhwang91/nvim-bqf' use 'unblevable/quick-scope' use 'airblade/vim-rooter' - use 'b3nj5m1n/kommentary' use 'kevinhwang91/rnvimr' - use 'mhinz/vim-startify' - use 'metakirby5/codi.vim' - use 'psliwka/vim-smoothie' - use {'iamcco/markdown-preview.nvim', run = 'cd app && yarn install', cmd = 'MarkdownPreview'} use 'moll/vim-bbye' - use 'turbio/bracey.vim' - use 'AndrewRadev/tagalong.vim' use 'alvan/vim-closetag' - use 'liuchengxu/vim-which-key' - use 'tpope/vim-sleuth' use 'voldikss/vim-floaterm' + use 'tpope/vim-sleuth' + use 'psliwka/vim-smoothie' + use 'mhinz/vim-startify' + use 'liuchengxu/vim-which-key' + use {'iamcco/markdown-preview.nvim', run = 'cd app && yarn install', cmd = 'MarkdownPreview'} + use 'AndrewRadev/tagalong.vim' use 'liuchengxu/vista.vim' use 'terrortylor/nvim-comment' use 'bfredl/nvim-miniyank' @@ -101,4 +103,5 @@ return require('packer').startup(function() use 'junegunn/goyo.vim' use 'junegunn/limelight.vim' use 'vimwiki/vimwiki' + end) diff --git a/.config/nvim/lua/utils.lua b/.config/nvim/lua/utils.lua deleted file mode 100644 index d892729..0000000 --- a/.config/nvim/lua/utils.lua +++ /dev/null @@ -1,38 +0,0 @@ -local function define_augroups(definitions) -- {{{1 - -- Create autocommand groups based on the passed definitions - -- - -- The key will be the name of the group, and each definition - -- within the group should have: - -- 1. Trigger - -- 2. Pattern - -- 3. Text - -- just like how they would normally be defined from Vim itself - for group_name, definition in pairs(definitions) do - vim.cmd('augroup ' .. group_name) - vim.cmd('autocmd!') - - for _, def in pairs(definition) do - local command = table.concat(vim.tbl_flatten {'autocmd', def}, ' ') - vim.cmd(command) - end - - vim.cmd('augroup END') - end -end - -define_augroups( - {_general_settings = { - {'TextYankPost', '*', 'lua require(\'vim.highlight\').on_yank({higroup = \'IncSearch\', timeout = 200})'}, - {'BufWinEnter', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'}, - {'BufRead', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'}, - {'BufNewFile', '*', 'setlocal formatoptions-=c formatoptions-=r formatoptions-=o'}, - }, - } -) - -define_augroups({ - numbertoggle = { - {'BufEnter,FocusGained,InsertLeave', '*', 'set relativenumber'}, - {'BufLeave,FocusLost,InsertEnter', '*', 'set norelativenumber'}, - }, -}) |