diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 388b2d0..868ce6e 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -1,8 +1,12 @@ local ensure_packer = function() local fn = vim.fn - local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' + local install_path = fn.stdpath('data') .. + '/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then - fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }) + fn.system({ + 'git', 'clone', '--depth', '1', + 'https://github.com/wbthomason/packer.nvim', install_path + }) vim.cmd [[packadd packer.nvim]] return true end @@ -12,11 +16,11 @@ end local packer_bootstrap = ensure_packer() -- Compile on plugin edits -vim.api.nvim_create_autocmd({ "BufWritePost" }, { +vim.api.nvim_create_autocmd({"BufWritePost"}, { pattern = "plugins.lua", command = "PackerCompile", desc = "Compile plugins after editing plugin list", - group = vim.api.nvim_create_augroup('compilepackages', { clear = true }) + group = vim.api.nvim_create_augroup('compilepackages', {clear = true}) }) local use = require("packer").use @@ -38,7 +42,7 @@ require("packer").startup(function() use 'vifm/vifm.vim' -- integrate file manager use { 'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter - requires = { 'nvim-lua/plenary.nvim' }, + requires = {'nvim-lua/plenary.nvim'}, tag = 'release', config = function() require('plug._gitsigns') end, event = "BufRead" @@ -94,26 +98,26 @@ require("packer").startup(function() -- statusline use { 'nvim-lualine/lualine.nvim', - requires = { 'kyazdani42/nvim-web-devicons', opt = true }, + requires = {'kyazdani42/nvim-web-devicons', opt = true}, config = function() require('plug._lualine') end } -- writing - use { 'vim-pandoc/vim-pandoc-syntax' } - use { 'vim-pandoc/vim-pandoc' } - use { 'vim-pandoc/vim-criticmarkup' } + use {'vim-pandoc/vim-pandoc-syntax'} + use {'vim-pandoc/vim-pandoc'} + use {'vim-pandoc/vim-criticmarkup'} use { "quarto-dev/quarto-vim", - requires = { { "vim-pandoc/vim-pandoc-syntax" } }, - ft = { "quarto" } + requires = {{"vim-pandoc/vim-pandoc-syntax"}}, + ft = {"quarto"} } use 'micarmst/vim-spellsync' -- personal dict improvements for git sync - use { 'folke/zen-mode.nvim', config = require('zen-mode').setup() } -- provide distraction free writing + use {'folke/zen-mode.nvim', config = require('zen-mode').setup()} -- provide distraction free writing use 'folke/twilight.nvim' -- provide even distraction free-er writing (lowlight paragraphs) use 'alok/notational-fzf-vim' -- quickly search through the wiki -- languages - use { 'euclidianAce/BetterLua.vim', ft = 'lua' } -- better syntax highlighting for lua + use {'euclidianAce/BetterLua.vim', ft = 'lua'} -- better syntax highlighting for lua use 'aliou/bats.vim' -- enable syntax for bats shell-code testing library -- REPL work @@ -134,7 +138,7 @@ require("packer").startup(function() 'hanschen/vim-ipython-cell', -- send code 'cells' to REPL ft = "python", config = function() - vim.g.ipython_cell_highlight_cells_ft = { 'python' } + vim.g.ipython_cell_highlight_cells_ft = {'python'} vim.g.ipython_cell_insert_tag = "## Cell" end } @@ -169,19 +173,19 @@ require("packer").startup(function() use { "nvim-telescope/telescope.nvim", requires = { - { "nvim-lua/popup.nvim" }, { "nvim-lua/plenary.nvim" }, - { "nvim-telescope/telescope-fzf-native.nvim", run = 'make' } + {"nvim-lua/popup.nvim"}, {"nvim-lua/plenary.nvim"}, + {"nvim-telescope/telescope-fzf-native.nvim", run = 'make'} }, config = function() require('plug._telescope') end } use { 'protex/better-digraphs.nvim', - requires = { { "nvim-telescope/telescope.nvim" } } + requires = {{"nvim-telescope/telescope.nvim"}} } -- snippeting - use { "hrsh7th/vim-vsnip", event = "InsertEnter" } -- snippet engine - use { "rafamadriz/friendly-snippets", event = "InsertEnter" } -- many snippets + use {"hrsh7th/vim-vsnip", event = "InsertEnter"} -- snippet engine + use {"rafamadriz/friendly-snippets", event = "InsertEnter"} -- many snippets -- treesitter use { @@ -194,7 +198,7 @@ require("packer").startup(function() use { 'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches config = function() - require 'nvim-treesitter.configs'.setup { + require'nvim-treesitter.configs'.setup { textsubjects = { enable = true, keymaps = { @@ -221,7 +225,7 @@ require("packer").startup(function() use 'ray-x/lsp_signature.nvim' use { 'ray-x/navigator.lua', - requires = { 'ray-x/guihua.lua', run = 'cd lua/fzy && make' }, + requires = {'ray-x/guihua.lua', run = 'cd lua/fzy && make'}, config = function() require('plug._lsp') end } -- and completion @@ -233,7 +237,6 @@ require("packer").startup(function() 'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip', 'hrsh7th/cmp-nvim-lua', 'kdheepak/cmp-latex-symbols', 'ray-x/cmp-treesitter', 'f3fora/cmp-spell', 'cbarrete/completion-vcard' - } } use { @@ -244,7 +247,5 @@ require("packer").startup(function() -- Automatically set up your configuration after cloning packer.nvim -- Put this at the end after all plugins - if packer_bootstrap then - require('packer').sync() - end + if packer_bootstrap then require('packer').sync() end end)