|
|
|
local use = require('packer').use
|
|
|
|
require('packer').startup(function()
|
|
|
|
-- required
|
|
|
|
use 'wbthomason/packer.nvim'
|
|
|
|
use 'nvim-lua/plenary.nvim'
|
|
|
|
|
|
|
|
-- common/visual plugins
|
|
|
|
use 'powerline/powerline-fonts'
|
|
|
|
use {
|
|
|
|
'nvim-lualine/lualine.nvim',
|
|
|
|
requires = { 'kyazdani42/nvim-web-devicons', opt = true }
|
|
|
|
}
|
|
|
|
use 'kdheepak/tabline.nvim'
|
|
|
|
use 'junegunn/goyo.vim'
|
|
|
|
use 'gpanders/editorconfig.nvim'
|
|
|
|
use {
|
|
|
|
'nvim-telescope/telescope-fzf-native.nvim',
|
|
|
|
run = 'make'
|
|
|
|
}
|
|
|
|
use {
|
|
|
|
'nvim-telescope/telescope.nvim',
|
|
|
|
tag = '0.1.0',
|
|
|
|
}
|
|
|
|
use {
|
|
|
|
'williamboman/mason.nvim',
|
|
|
|
'williamboman/mason-lspconfig.nvim',
|
|
|
|
'RubixDev/mason-update-all',
|
|
|
|
'neovim/nvim-lspconfig'
|
|
|
|
}
|
|
|
|
use 'joshdick/onedark.vim'
|
|
|
|
|
|
|
|
use 'nvim-treesitter/nvim-treesitter'
|
|
|
|
|
|
|
|
use 'jose-elias-alvarez/null-ls.nvim'
|
|
|
|
|
|
|
|
use 'RRethy/vim-illuminate'
|
|
|
|
|
|
|
|
-- cmp
|
|
|
|
use "hrsh7th/nvim-cmp"
|
|
|
|
use "hrsh7th/cmp-buffer"
|
|
|
|
use "hrsh7th/cmp-path"
|
|
|
|
use "hrsh7th/cmp-nvim-lsp"
|
|
|
|
use 'L3MON4D3/LuaSnip'
|
|
|
|
use 'saadparwaiz1/cmp_luasnip'
|
|
|
|
use "hrsh7th/cmp-nvim-lua"
|
|
|
|
|
|
|
|
end)
|
|
|
|
|
|
|
|
require("user.basics")
|
|
|
|
|
|
|
|
local function map(mode, shortcut, command)
|
|
|
|
vim.keymap.set(mode, shortcut, command, { noremap = true })
|
|
|
|
end
|
|
|
|
|
|
|
|
local function nmap(shortcut, command)
|
|
|
|
map('n', shortcut, command)
|
|
|
|
end
|
|
|
|
|
|
|
|
local use builtin = require("telescope.builtin")
|
|
|
|
nmap("<C-P>", builtin.find_files)
|
|
|
|
|
|
|
|
require("lualine").setup{
|
|
|
|
options = {
|
|
|
|
theme = 'onedark'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
require("tabline").setup{
|
|
|
|
vim.cmd([[
|
|
|
|
set guioptions-=e
|
|
|
|
set sessionoptions+=tabpages,globals
|
|
|
|
]])
|
|
|
|
}
|
|
|
|
|
|
|
|
local status_ok, configs = pcall(require, "nvim-treesitter.configs")
|
|
|
|
if not status_ok then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
|
|
|
|
configs.setup({
|
|
|
|
ensure_installed = "all",
|
|
|
|
ignore_install = { "" },
|
|
|
|
sync_install = false,
|
|
|
|
highlight = {
|
|
|
|
enable = true,
|
|
|
|
disable = { "" },
|
|
|
|
additional_vim_regex_highlighting = true,
|
|
|
|
},
|
|
|
|
indent = { enable = true, disable = { "yaml" } }
|
|
|
|
})
|
|
|
|
|
|
|
|
nmap("<C-T>", "<cmd>TablineTabNew<cr>")
|
|
|
|
nmap("<C-L>", "<cmd>TablineBufferNext<cr>")
|
|
|
|
nmap("<C-H>", "<cmd>TablineBufferPrevious<cr>")
|
|
|
|
nmap("<C-Q>", "<cmd>bd<cr>")
|
|
|
|
nmap("<C-S-Q>", "<cmd>bd!<cr>")
|
|
|
|
nmap("<C-B>", "<cmd>ls<cr>")
|
|
|
|
nmap("<C-G>", "<cmd>Goyo<cr>")
|
|
|
|
|
|
|
|
require('user.cmp')
|
|
|
|
require('user.lsp')
|
|
|
|
|