From e6a8b67e6e69f8edebb5253a2d4f7830205bc872 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Fri, 21 Jan 2022 18:35:32 -0600 Subject: [PATCH 1/2] Re-arranged nvim packages Made them have a bit of a more logical strucutre. --- neovim/.config/nvim/foldtext.vimrc | 9 -- neovim/.config/nvim/lua/packages.lua | 148 ++++++++++++++++----------- 2 files changed, 86 insertions(+), 71 deletions(-) delete mode 100644 neovim/.config/nvim/foldtext.vimrc diff --git a/neovim/.config/nvim/foldtext.vimrc b/neovim/.config/nvim/foldtext.vimrc deleted file mode 100644 index f9d58f9..0000000 --- a/neovim/.config/nvim/foldtext.vimrc +++ /dev/null @@ -1,9 +0,0 @@ -"TODO: cleanup this function! -function! Minimal_foldtext() - let lines_count = v:foldend - v:foldstart + 1 - let lines_count_text = '+' . v:folddashes . '| ' . printf("%10S" , lines_count) . ' lines |' - let line_level_text = '| ' . printf("%8S" , 'level ' . v:foldlevel) . ' |' - let fold_text_end = line_level_text . repeat('-',8) - let fold_text_length = strlen(lines_count_text . fold_text_end) + &foldcolumn - return lines_count_text . repeat('-' , winwidth(0) - fold_text_length - 4) . fold_text_end -endfunction diff --git a/neovim/.config/nvim/lua/packages.lua b/neovim/.config/nvim/lua/packages.lua index 76a94eb..d49f56a 100644 --- a/neovim/.config/nvim/lua/packages.lua +++ b/neovim/.config/nvim/lua/packages.lua @@ -6,18 +6,50 @@ if fn.empty(fn.glob(install_path)) > 0 then end return require('packer').startup(function(use) + + --base plugins. + use 'wbthomason/packer.nvim' - use { - 'nvim-treesitter/nvim-treesitter', + use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate' } use 'neovim/nvim-lspconfig' - use 'yamatsum/nvim-cursorline' + use {'hrsh7th/nvim-cmp', + requires = { + 'neovim/nvim-lspconfig', + 'hrsh7th/cmp-nvim-lsp', + 'saadparwaiz1/cmp_luasnip', + 'L3MON4D3/LuaSnip' + } + } - use 'simrat39/rust-tools.nvim' + use {'nvim-telescope/telescope.nvim', + requires = { + {'nvim-lua/plenary.nvim'}, + {'nvim-lua/popup.nvim'}, + {'nvim-treesitter/nvim-treesitter'}, + {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }, + {'nvim-telescope/telescope-symbols.nvim'}, + {'nvim-telescope/telescope-file-browser.nvim'}, + }, + config=function() + require'telescope'.load_extension('fzf') + end + } + + use {'kyazdani42/nvim-tree.lua', + requires = { + 'kyazdani42/nvim-web-devicons', -- optional, for file icon + }, + config = function() require'nvim-tree'.setup {} end + } + + --UI stuff + + use 'yamatsum/nvim-cursorline' use {'stevearc/dressing.nvim', config=function() @@ -56,6 +88,7 @@ return require('packer').startup(function(use) extensions = {} } end, } + use {'kdheepak/tabline.nvim', config = function() require'tabline'.setup { @@ -81,59 +114,17 @@ return require('packer').startup(function(use) requires = { { 'hoob3rt/lualine.nvim', opt=true }, {'kyazdani42/nvim-web-devicons', opt = true} } } - - use {'numToStr/Comment.nvim', - config = function() - require('Comment').setup() - end - } - - use {'glepnir/lspsaga.nvim', - requires = { - 'neovim/nvim-lspconfig', + use { + "folke/trouble.nvim", + requires = "kyazdani42/nvim-web-devicons", + config = function() + require("trouble").setup { } - } - - use {'hrsh7th/nvim-cmp', - requires = { - 'neovim/nvim-lspconfig', - 'hrsh7th/cmp-nvim-lsp', - 'saadparwaiz1/cmp_luasnip', - 'L3MON4D3/LuaSnip' - } - } - - use {'folke/todo-comments.nvim', - requires = 'nvim-lua/plenary.nvim', - config = function() - require('todo-comments').setup() - end - } - - use {'nvim-telescope/telescope.nvim', - requires = { - {'nvim-lua/plenary.nvim'}, - {'nvim-lua/popup.nvim'}, - {'nvim-treesitter/nvim-treesitter'}, - {'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }, - {'nvim-telescope/telescope-symbols.nvim'}, - {'https://github.com/nvim-telescope/telescope-file-browser.nvim'}, - }, - config=function() - require'telescope'.load_extension('fzf') - end + end } use {'romgrk/nvim-treesitter-context', requires = 'nvim-treesitter/nvim-treesitter', - config=function() require('treesitter-context').setup() end, - } - - use {'kyazdani42/nvim-tree.lua', - requires = { - 'kyazdani42/nvim-web-devicons', -- optional, for file icon - }, - config = function() require'nvim-tree'.setup {} end } use {'lewis6991/gitsigns.nvim', @@ -146,16 +137,6 @@ return require('packer').startup(function(use) use 'tversteeg/registers.nvim' - use { - 'sudormrfbin/cheatsheet.nvim', - - requires = { - {'nvim-telescope/telescope.nvim'}, - {'nvim-lua/popup.nvim'}, - {'nvim-lua/plenary.nvim'}, - } - } - use {'lewis6991/spellsitter.nvim', config=function() require('spellsitter').setup() end } @@ -171,10 +152,53 @@ return require('packer').startup(function(use) end } + --editing utilities + + use {'numToStr/Comment.nvim', + config = function() + require('Comment').setup() + end + } + + --misc + + use {'folke/todo-comments.nvim', + requires = 'nvim-lua/plenary.nvim', + config = function() + require('todo-comments').setup() + end + } + + use {'sudormrfbin/cheatsheet.nvim', + + requires = { + {'nvim-telescope/telescope.nvim'}, + {'nvim-lua/popup.nvim'}, + {'nvim-lua/plenary.nvim'}, + } + } + + --color scheme stuff. + use 'bluz71/vim-moonfly-colors' use 'bluz71/vim-nightfly-guicolors' + --language specific tools. + + use{'eddiebergman/nvim-treesitter-pyfold', + config=function () + require('nvim-treesitter.configs').setup { + pyfold = { + enable = true, + custom_foldtext = true -- Sets provided foldtext on window where module is active + } + } + end + } + + use 'simrat39/rust-tools.nvim' + if Packer_Bootstrap then require('packer').sync() end From 92ecc029978fbd8723a39b590ee2764a7f4eff54 Mon Sep 17 00:00:00 2001 From: Gabe Venberg Date: Sun, 23 Jan 2022 21:15:03 -0600 Subject: [PATCH 2/2] added compitest pluging for neovim. --- neovim/.config/nvim/lua/packages.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/neovim/.config/nvim/lua/packages.lua b/neovim/.config/nvim/lua/packages.lua index d49f56a..7d6d636 100644 --- a/neovim/.config/nvim/lua/packages.lua +++ b/neovim/.config/nvim/lua/packages.lua @@ -162,6 +162,12 @@ return require('packer').startup(function(use) --misc + use { + 'xeluxee/competitest.nvim', + requires = 'MunifTanjim/nui.nvim', + config = function() require'competitest'.setup() end + } + use {'folke/todo-comments.nvim', requires = 'nvim-lua/plenary.nvim', config = function()