began nvim migration to lua
This commit is contained in:
parent
01a46e588f
commit
5ea3f3c345
6 changed files with 513 additions and 0 deletions
125
.config/nvim/lua/plugins.lua
Normal file
125
.config/nvim/lua/plugins.lua
Normal file
|
@ -0,0 +1,125 @@
|
|||
-- Load plugins
|
||||
-- Bootstrap packer if needed
|
||||
local fn = vim.fn
|
||||
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})
|
||||
vim.cmd 'packadd packer.nvim'
|
||||
end
|
||||
|
||||
return require('packer').startup(function()
|
||||
-- Packer
|
||||
use { -- plugins
|
||||
'wbthomason/packer.nvim'
|
||||
}
|
||||
|
||||
-- Colors
|
||||
use { -- syntax highlighting
|
||||
'nvim-treesitter/nvim-treesitter', run = ':TSUpdate',
|
||||
config = function()
|
||||
require("lsp").treesitter()
|
||||
end,
|
||||
}
|
||||
use { -- onedark theme
|
||||
'navarasu/onedark.nvim',
|
||||
config = function()
|
||||
vim.cmd 'colorscheme onedark'
|
||||
end
|
||||
}
|
||||
use { -- color tag highlighter
|
||||
'norcalli/nvim-colorizer.lua'
|
||||
}
|
||||
|
||||
-- IDE features
|
||||
---- LSP
|
||||
use { -- lsp installer
|
||||
"kabouzeid/nvim-lspinstall",
|
||||
-- opt = true,
|
||||
-- setup = function()
|
||||
-- require("other").packer_lazy_load "nvim-lspinstall"
|
||||
-- -- reload the current file so lsp actually starts for it
|
||||
-- vim.defer_fn(function()
|
||||
-- vim.cmd "silent! e %"
|
||||
-- end, 0)
|
||||
-- end,
|
||||
}
|
||||
use { -- Default LSP configs
|
||||
"neovim/nvim-lspconfig",
|
||||
after = "nvim-lspinstall",
|
||||
config = function()
|
||||
require("lsp").lspconfig()
|
||||
end
|
||||
}
|
||||
use { -- function parameter previews
|
||||
"ray-x/lsp_signature.nvim",
|
||||
after = "nvim-lspconfig",
|
||||
config = function()
|
||||
require("lsp").signature()
|
||||
end,
|
||||
}
|
||||
use { -- Use the % key for more things
|
||||
"andymass/vim-matchup",
|
||||
-- setup = function()
|
||||
-- require("other").packer_lazy_load "vim-matchup"
|
||||
-- end,
|
||||
}
|
||||
use 'dense-analysis/ale'
|
||||
|
||||
---- Other IDE fratures
|
||||
use { -- git integration
|
||||
'lewis6991/gitsigns.nvim',
|
||||
requires = {
|
||||
'nvim-lua/plenary.nvim'
|
||||
},
|
||||
-- config = function()
|
||||
-- require('other').gitsigns()
|
||||
-- end
|
||||
}
|
||||
use { -- file manager
|
||||
'kyazdani42/nvim-tree.lua',
|
||||
requires = 'kyazdani42/nvim-web-devicons',
|
||||
config = function()
|
||||
require('other').nvimtree()
|
||||
end
|
||||
}
|
||||
use { -- terminal
|
||||
"akinsho/toggleterm.nvim",
|
||||
config = function()
|
||||
require('other').toggleterm()
|
||||
end
|
||||
}
|
||||
|
||||
-- Conveniences
|
||||
use { -- Undo tree
|
||||
'mbbill/undotree',
|
||||
}
|
||||
use { -- Quote pairing
|
||||
'jiangmiao/auto-pairs'
|
||||
}
|
||||
use { -- Alignment
|
||||
'junegunn/vim-easy-align',
|
||||
}
|
||||
use { -- Quote/parenthesis changing
|
||||
'tpope/vim-surround'
|
||||
}
|
||||
-- use { -- Some sensible defaults
|
||||
-- 'tpope/vim-sensible'
|
||||
-- }
|
||||
use { -- Comments
|
||||
'tpope/vim-commentary'
|
||||
}
|
||||
-- use { -- Comments (lua)
|
||||
-- "terrortylor/nvim-comment",
|
||||
-- require('conveniences').nvim_comment()
|
||||
-- }
|
||||
use { -- git integration
|
||||
'tpope/vim-fugitive'
|
||||
}
|
||||
use { -- Repeatability for various tpope plugins
|
||||
'tpope/vim-repeat',
|
||||
}
|
||||
|
||||
end)
|
||||
|
||||
-- vim:fdm=marker:fmr={,}:expandtab:tabstop=3:sw=3
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue