summaryrefslogtreecommitdiffstats
path: root/.config/nvim/lua/plugins.lua
blob: 24736eba93c98da99888ee8b8a707c89aba0ba7c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
--[[
-- 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'},
  }
}
remember that computers suck.