--[[
-- Plugins
--]]
-- Bootstrap for Paq
local install_path = vim.fn.stdpath('data')..'/site/pack/paqs/start/paq-nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.fn.system({
'git', 'clone', '--depth=1',
'https://github.com/savq/paq-nvim.git',
install_path
})
vim.cmd 'packadd paq-nvim'
end
-- Enable Paq
vim.cmd 'packadd paq-nvim'
-- Plugin list
require('paq') {
{'savq/paq-nvim'};
-- lsp
{
'nvim-treesitter/nvim-treesitter',
run=':TSUpdate'
};
{
'neovim/nvim-lspconfig',
run='python3 -m pipx install python-lsp-server[all]'
};
{
'numirias/semshi',
run=':UpdateRemotePlugins'
};
-- utils
{'folke/trouble.nvim'};
{'hrsh7th/nvim-compe'};
-- org
{'TimUntersberger/neogit'};
{'kyazdani42/nvim-tree.lua'};
-- indent
{'lewis6991/gitsigns.nvim'};
{'glepnir/indent-guides.nvim'};
{'darazaki/indent-o-matic'};
-- dep
{'nvim-lua/plenary.nvim'};
}
-- Treesitter
local parser_configs = require('nvim-treesitter.parsers').get_parser_configs()
require('nvim-treesitter.configs').setup {
ensure_installed = 'maintained',
ignore_install = {
'verilog',
'kotlin'
},
highlight = {
enable = true,
}
}
-- completion
require('compe').setup {
enabled = true,
source = {
path = true;
buffer = true;
calc = true;
nvim_lsp = true;
nvim_lua = true;
vsnip = true;
ultisnips = true;
luasnip = true;
neorg = true;
};
}
-- LSP configuration
local lsputil = require('lspconfig/util')
local python_venv = require('utils').get_python_venv()
require('lspconfig').pylsp.setup{
cmd = {'pylsp', '-v'},
cmd_env = {
VIRTUAL_ENV = python_venv,
PATH = lsputil.path.join(python_venv, 'bin') .. ':' .. vim.env.PATH
},
}
require('lspconfig').clangd.setup{}
require('lspconfig').eslint.setup{}
require('lspconfig').terraformls.setup{}
-- org
require('trouble').setup{}
require('neogit').setup{}
-- syntactic sugar
require('indent_guides').setup{
indent_enable=true;
exclude_filetypes={
'help',
'calendar',
'NvimTree'
};
}
require('indent-o-matic').setup {
max_lines = 0,
standard_widths = { 2, 4, 8 },
filetype_typescript = {
max_lines = 4096,
},
filetype_javascript = {
max_lines = 4096,
},
filetype_ = {
standard_widths = { 2, 4 },
},
}
vim.g['semshi#update_delay_factor'] = 0.0001
require('gitsigns').setup{
signs = {
add = {hl = 'GitSignsAdd' , text = '▍', numhl='GitSignsAddNr' , linehl='GitSignsAddLn'},
change = {hl = 'GitSignsChange', text = '▍', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
delete = {hl = 'GitSignsDelete', text = '▍', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
topdelete = {hl = 'GitSignsDelete', text = '▍', numhl='GitSignsDeleteNr', linehl='GitSignsDeleteLn'},
changedelete = {hl = 'GitSignsChange', text = '▍', numhl='GitSignsChangeNr', linehl='GitSignsChangeLn'},
}
}