mirror of
https://github.com/d0zingcat/dotfiles.git
synced 2026-05-14 07:26:44 +00:00
init
This commit is contained in:
241
nvim/lua/plugins.lua
Normal file
241
nvim/lua/plugins.lua
Normal file
@@ -0,0 +1,241 @@
|
||||
local fn = vim.fn
|
||||
local g = vim.g
|
||||
local cmd = vim.cmd
|
||||
local lsp = vim.lsp
|
||||
local api = vim.api
|
||||
local map = require('utils').map
|
||||
|
||||
-- Ensure packer installed
|
||||
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 })
|
||||
cmd('packadd packer.nvim')
|
||||
end
|
||||
|
||||
return require('packer').startup(function(use)
|
||||
use('wbthomason/packer.nvim')
|
||||
use('folke/lua-dev.nvim')
|
||||
|
||||
use('folke/tokyonight.nvim')
|
||||
use('kyazdani42/nvim-web-devicons')
|
||||
use('tpope/vim-fugitive') -- git fugitive
|
||||
use({
|
||||
'lewis6991/gitsigns.nvim',
|
||||
requires = { 'nvim-lua/plenary.nvim' },
|
||||
config = function()
|
||||
require('config.gitsigns')
|
||||
end,
|
||||
})
|
||||
use({
|
||||
'folke/which-key.nvim',
|
||||
config = function()
|
||||
require('which-key').setup({
|
||||
-- your configuration comes here
|
||||
-- or leave it empty to use the default settings
|
||||
-- refer to the configuration section below
|
||||
})
|
||||
end,
|
||||
})
|
||||
use({
|
||||
'folke/trouble.nvim',
|
||||
config = function()
|
||||
require('trouble').setup({})
|
||||
end,
|
||||
})
|
||||
--use({
|
||||
--'TimUntersberger/neogit',
|
||||
--requires = 'nvim-lua/plenary.nvim',
|
||||
--config = function()
|
||||
--local neogit = require('neogit')
|
||||
--neogit.setup({
|
||||
--integrations = {
|
||||
--diffview = true,
|
||||
--},
|
||||
--})
|
||||
--end,
|
||||
--})
|
||||
--use({
|
||||
--'sindrets/diffview.nvim',
|
||||
--requires = 'nvim-lua/plenary.nvim',
|
||||
--config = function()
|
||||
--require('diffview').setup({})
|
||||
--end,
|
||||
--})
|
||||
use({
|
||||
'MattesGroeger/vim-bookmarks',
|
||||
requires = 'tom-anders/telescope-vim-bookmarks.nvim',
|
||||
config = function()
|
||||
require('config.nvim_bookmarks')
|
||||
end,
|
||||
})
|
||||
use('junegunn/vim-easy-align') -- 可以快速对齐的插件
|
||||
use({
|
||||
't9md/vim-choosewin',
|
||||
})
|
||||
-- use "easymotion/vim-easymotion"
|
||||
--use {
|
||||
--"voldikss/vim-floaterm",
|
||||
--config = function()
|
||||
--require "config.nvim_floaterm"
|
||||
--end
|
||||
--}
|
||||
use({
|
||||
'akinsho/toggleterm.nvim',
|
||||
config = function()
|
||||
require('config.toggleterm')
|
||||
end,
|
||||
})
|
||||
use('wakatime/vim-wakatime')
|
||||
use('psf/black')
|
||||
use({
|
||||
'preservim/nerdcommenter',
|
||||
config = function()
|
||||
require('config.nvim_vimgo')
|
||||
end,
|
||||
})
|
||||
use({
|
||||
'windwp/nvim-autopairs',
|
||||
config = function()
|
||||
-- nvim-autopairs
|
||||
require('nvim-autopairs').setup({})
|
||||
end,
|
||||
})
|
||||
use({
|
||||
'kyazdani42/nvim-tree.lua',
|
||||
requires = 'kyazdani42/nvim-web-devicons',
|
||||
config = function()
|
||||
require('config.nvim-tree')
|
||||
end,
|
||||
})
|
||||
use({
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = 'nvim-lua/plenary.nvim',
|
||||
config = function()
|
||||
require('config.nvim_telescope')
|
||||
end,
|
||||
})
|
||||
use({
|
||||
'hrsh7th/nvim-cmp',
|
||||
config = function()
|
||||
require('config.nvim_cmp')
|
||||
end,
|
||||
requires = {
|
||||
'hrsh7th/cmp-vsnip',
|
||||
'hrsh7th/vim-vsnip',
|
||||
'hrsh7th/vim-vsnip-integ',
|
||||
},
|
||||
})
|
||||
use('hrsh7th/cmp-buffer')
|
||||
use('hrsh7th/cmp-nvim-lsp')
|
||||
use({
|
||||
'github/copilot.vim',
|
||||
setup = function() end,
|
||||
config = function()
|
||||
require('config.copilot')
|
||||
end,
|
||||
})
|
||||
--use('sbdchd/neoformat')
|
||||
use({
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
run = ':TSUpdate',
|
||||
config = function()
|
||||
require('config.nvim_treesitter')
|
||||
end,
|
||||
})
|
||||
use({
|
||||
'iamcco/markdown-preview.nvim',
|
||||
run = 'cd app && yarn install',
|
||||
cmd = { 'MarkdownPreview', 'MarkdownPreviewStop' },
|
||||
})
|
||||
--use {"glepnir/spaceline.vim", requires = "kyazdani42/nvim-web-devicons"}
|
||||
use({
|
||||
'nvim-lualine/lualine.nvim',
|
||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
||||
config = function()
|
||||
require('config.lualine')
|
||||
end,
|
||||
})
|
||||
use({
|
||||
'j-hui/fidget.nvim',
|
||||
config = function()
|
||||
require('fidget').setup({})
|
||||
end,
|
||||
})
|
||||
-- use 'arkav/lualine-lsp-progress'
|
||||
use({
|
||||
'romgrk/barbar.nvim',
|
||||
requires = { 'kyazdani42/nvim-web-devicons' },
|
||||
})
|
||||
use({
|
||||
'folke/todo-comments.nvim',
|
||||
requires = 'nvim-lua/plenary.nvim',
|
||||
config = function()
|
||||
require('todo-comments').setup({})
|
||||
end,
|
||||
})
|
||||
use({
|
||||
'phaazon/hop.nvim',
|
||||
as = 'hop',
|
||||
config = function()
|
||||
-- you can configure Hop the way you like here; see :h hop-config
|
||||
require('config.nvim_hop')
|
||||
end,
|
||||
})
|
||||
--use {
|
||||
--"ray-x/lsp_signature.nvim",
|
||||
--config = function()
|
||||
--require "lsp_signature".setup {
|
||||
--transpancy = 10,
|
||||
--hint_prefix = "😼",
|
||||
---- zindex = 50,
|
||||
--}
|
||||
--end
|
||||
--}
|
||||
use({
|
||||
'preservim/tagbar',
|
||||
config = function()
|
||||
require('config.tagbar')
|
||||
end,
|
||||
})
|
||||
--use {
|
||||
--"liuchengxu/vista.vim",
|
||||
--config = function()
|
||||
--require "config.vista"
|
||||
--end
|
||||
--}
|
||||
|
||||
-- LANGUAGES
|
||||
use({
|
||||
'neovim/nvim-lspconfig',
|
||||
})
|
||||
use({
|
||||
'jose-elias-alvarez/null-ls.nvim',
|
||||
})
|
||||
use({
|
||||
'williamboman/nvim-lsp-installer',
|
||||
config = function()
|
||||
require('config.lspconfig')
|
||||
end,
|
||||
})
|
||||
use({
|
||||
'fatih/vim-go',
|
||||
run = ':GoUpdateBinaries',
|
||||
config = function()
|
||||
require('config.nvim_vimgo')
|
||||
end,
|
||||
})
|
||||
-- erlang
|
||||
use('vim-erlang/vim-erlang-tags')
|
||||
-- markdown
|
||||
use('iamcco/mathjax-support-for-mkdp')
|
||||
use('iamcco/markdown-preview.vim')
|
||||
--beancount
|
||||
use('nathangrigg/vim-beancount')
|
||||
-- python
|
||||
use('Vimjas/vim-python-pep8-indent')
|
||||
-- rust
|
||||
use('rust-lang/rust.vim')
|
||||
use('andrewstuart/vim-kubernetes')
|
||||
end)
|
||||
|
||||
-- require("todo-comments").setup {}
|
||||
Reference in New Issue
Block a user