nvim: Format plugins file
This commit is contained in:
parent
565a356ea8
commit
50264c2eac
1 changed files with 26 additions and 25 deletions
|
@ -1,8 +1,12 @@
|
||||||
local ensure_packer = function()
|
local ensure_packer = function()
|
||||||
local fn = vim.fn
|
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
|
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]]
|
vim.cmd [[packadd packer.nvim]]
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -12,11 +16,11 @@ end
|
||||||
local packer_bootstrap = ensure_packer()
|
local packer_bootstrap = ensure_packer()
|
||||||
|
|
||||||
-- Compile on plugin edits
|
-- Compile on plugin edits
|
||||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
vim.api.nvim_create_autocmd({"BufWritePost"}, {
|
||||||
pattern = "plugins.lua",
|
pattern = "plugins.lua",
|
||||||
command = "PackerCompile",
|
command = "PackerCompile",
|
||||||
desc = "Compile plugins after editing plugin list",
|
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
|
local use = require("packer").use
|
||||||
|
@ -38,7 +42,7 @@ require("packer").startup(function()
|
||||||
use 'vifm/vifm.vim' -- integrate file manager
|
use 'vifm/vifm.vim' -- integrate file manager
|
||||||
use {
|
use {
|
||||||
'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter
|
'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter
|
||||||
requires = { 'nvim-lua/plenary.nvim' },
|
requires = {'nvim-lua/plenary.nvim'},
|
||||||
tag = 'release',
|
tag = 'release',
|
||||||
config = function() require('plug._gitsigns') end,
|
config = function() require('plug._gitsigns') end,
|
||||||
event = "BufRead"
|
event = "BufRead"
|
||||||
|
@ -94,26 +98,26 @@ require("packer").startup(function()
|
||||||
-- statusline
|
-- statusline
|
||||||
use {
|
use {
|
||||||
'nvim-lualine/lualine.nvim',
|
'nvim-lualine/lualine.nvim',
|
||||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
requires = {'kyazdani42/nvim-web-devicons', opt = true},
|
||||||
config = function() require('plug._lualine') end
|
config = function() require('plug._lualine') end
|
||||||
}
|
}
|
||||||
|
|
||||||
-- writing
|
-- writing
|
||||||
use { 'vim-pandoc/vim-pandoc-syntax' }
|
use {'vim-pandoc/vim-pandoc-syntax'}
|
||||||
use { 'vim-pandoc/vim-pandoc' }
|
use {'vim-pandoc/vim-pandoc'}
|
||||||
use { 'vim-pandoc/vim-criticmarkup' }
|
use {'vim-pandoc/vim-criticmarkup'}
|
||||||
use {
|
use {
|
||||||
"quarto-dev/quarto-vim",
|
"quarto-dev/quarto-vim",
|
||||||
requires = { { "vim-pandoc/vim-pandoc-syntax" } },
|
requires = {{"vim-pandoc/vim-pandoc-syntax"}},
|
||||||
ft = { "quarto" }
|
ft = {"quarto"}
|
||||||
}
|
}
|
||||||
use 'micarmst/vim-spellsync' -- personal dict improvements for git sync
|
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 'folke/twilight.nvim' -- provide even distraction free-er writing (lowlight paragraphs)
|
||||||
use 'alok/notational-fzf-vim' -- quickly search through the wiki
|
use 'alok/notational-fzf-vim' -- quickly search through the wiki
|
||||||
|
|
||||||
-- languages
|
-- 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
|
use 'aliou/bats.vim' -- enable syntax for bats shell-code testing library
|
||||||
|
|
||||||
-- REPL work
|
-- REPL work
|
||||||
|
@ -134,7 +138,7 @@ require("packer").startup(function()
|
||||||
'hanschen/vim-ipython-cell', -- send code 'cells' to REPL
|
'hanschen/vim-ipython-cell', -- send code 'cells' to REPL
|
||||||
ft = "python",
|
ft = "python",
|
||||||
config = function()
|
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"
|
vim.g.ipython_cell_insert_tag = "## Cell"
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
@ -169,19 +173,19 @@ require("packer").startup(function()
|
||||||
use {
|
use {
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
requires = {
|
requires = {
|
||||||
{ "nvim-lua/popup.nvim" }, { "nvim-lua/plenary.nvim" },
|
{"nvim-lua/popup.nvim"}, {"nvim-lua/plenary.nvim"},
|
||||||
{ "nvim-telescope/telescope-fzf-native.nvim", run = 'make' }
|
{"nvim-telescope/telescope-fzf-native.nvim", run = 'make'}
|
||||||
},
|
},
|
||||||
config = function() require('plug._telescope') end
|
config = function() require('plug._telescope') end
|
||||||
}
|
}
|
||||||
use {
|
use {
|
||||||
'protex/better-digraphs.nvim',
|
'protex/better-digraphs.nvim',
|
||||||
requires = { { "nvim-telescope/telescope.nvim" } }
|
requires = {{"nvim-telescope/telescope.nvim"}}
|
||||||
}
|
}
|
||||||
|
|
||||||
-- snippeting
|
-- snippeting
|
||||||
use { "hrsh7th/vim-vsnip", event = "InsertEnter" } -- snippet engine
|
use {"hrsh7th/vim-vsnip", event = "InsertEnter"} -- snippet engine
|
||||||
use { "rafamadriz/friendly-snippets", event = "InsertEnter" } -- many snippets
|
use {"rafamadriz/friendly-snippets", event = "InsertEnter"} -- many snippets
|
||||||
|
|
||||||
-- treesitter
|
-- treesitter
|
||||||
use {
|
use {
|
||||||
|
@ -194,7 +198,7 @@ require("packer").startup(function()
|
||||||
use {
|
use {
|
||||||
'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches
|
'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches
|
||||||
config = function()
|
config = function()
|
||||||
require 'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
textsubjects = {
|
textsubjects = {
|
||||||
enable = true,
|
enable = true,
|
||||||
keymaps = {
|
keymaps = {
|
||||||
|
@ -221,7 +225,7 @@ require("packer").startup(function()
|
||||||
use 'ray-x/lsp_signature.nvim'
|
use 'ray-x/lsp_signature.nvim'
|
||||||
use {
|
use {
|
||||||
'ray-x/navigator.lua',
|
'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
|
config = function() require('plug._lsp') end
|
||||||
}
|
}
|
||||||
-- and completion
|
-- and completion
|
||||||
|
@ -233,7 +237,6 @@ require("packer").startup(function()
|
||||||
'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip', 'hrsh7th/cmp-nvim-lua',
|
'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip', 'hrsh7th/cmp-nvim-lua',
|
||||||
'kdheepak/cmp-latex-symbols', 'ray-x/cmp-treesitter',
|
'kdheepak/cmp-latex-symbols', 'ray-x/cmp-treesitter',
|
||||||
'f3fora/cmp-spell', 'cbarrete/completion-vcard'
|
'f3fora/cmp-spell', 'cbarrete/completion-vcard'
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
use {
|
use {
|
||||||
|
@ -244,7 +247,5 @@ require("packer").startup(function()
|
||||||
|
|
||||||
-- Automatically set up your configuration after cloning packer.nvim
|
-- Automatically set up your configuration after cloning packer.nvim
|
||||||
-- Put this at the end after all plugins
|
-- Put this at the end after all plugins
|
||||||
if packer_bootstrap then
|
if packer_bootstrap then require('packer').sync() end
|
||||||
require('packer').sync()
|
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
Loading…
Reference in a new issue