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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
--
-- IDE-like features
--
-- Load required tools
local pk_use = require 'packer'.use
--
-- Tree Sitter
--
--[[
pk_use {
'nvim-treesitter/nvim-treesitter',
run = ':TSUpdate',
config = function()
require('nvim-treesitter.configs').setup{
ensure_installed = {
"bash",
"bibtex",
"c",
"cpp",
"css",
"go",
"html",
"javascript",
"json",
"latex",
"python",
"typescript",
"vim",
},
sync_install = false,
highlight = {
enable = true,
}
}
end
}
]]--
--
-- Autocompletion
--
pk_use {
'ms-jpq/coq_nvim',
branch = 'coq',
config = function()
vim.cmd([[autocmd VimEnter * COQnow -s]])
end
}
pk_use {
'ms-jpq/coq.artifacts',
branch = 'artifacts'
}
--
-- Language Configurations
--
pk_use 'ap/vim-css-color'
-- close tags in html languages
pk_use {
'alvan/closetag.vim',
ft = {"html", "vue"}
}
pk_use {
'fatih/vim-go',
ft = 'go'
}
pk_use 'udalov/kotlin-vim'
--
-- Language Server
--
-- Basic commands
pk_use 'nanotee/nvim-lsp-basics'
-- Show Code Outline/Symbols tree window
pk_use {
'stevearc/aerial.nvim',
config = function()
require('aerial').setup({
backends = {'lsp', 'markdown', 'man'},
layout = {
max_width = {25, 0.2}
}
})
end
}
-- Language Server Installer
pk_use {
'williamboman/mason.nvim',
config = function()
require('mason').setup {
ui = {
icons = {
package_installed = "i",
package_pending = "p",
package_uninstalled = "u"
}
}
}
end
}
pk_use {
'williamboman/mason-lspconfig.nvim',
requires = {
'williamboman/mason.nvim',
'ms-jpq/coq_nvim',
'stevearc/aerial.nvim'
},
config = function()
local masonlsp = require 'mason-lspconfig'
masonlsp.setup {
ensure_installed = {
"sumneko_lua",
"gopls",
"vimls"
}
}
masonlsp.setup_handlers {
function(server_name)
require('lspconfig')[server_name].setup(require('coq').lsp_ensure_capabilities {
on_attach = function(client, bufnr)
local basics = require('lsp_basics')
basics.make_lsp_commands(client, bufnr)
basics.make_lsp_mappings(client, bufnr)
end
})
end
}
end
}
pk_use {
'neovim/nvim-lspconfig',
config = function()
-- disable inline error messages
vim.diagnostic.config({virtual_text = false})
end
}
-- Show code diagnostics in a separate buffer window
pk_use {
'folke/trouble.nvim',
config = function()
require('trouble').setup {
height = 5,
icons = false,
fold_open = "v",
fold_closed = ">",
signs = {
error = "E:",
warning = "W:",
hint = "H:",
information = "I:"
},
use_diagnostic_signs = false
}
require('conftool').map('n', '<C-S-`>', ':TroubleToggle<CR>')
end
}
--
-- Latex Live Preview
--
pk_use {
'xuhdev/vim-latex-live-preview',
ft = 'tex',
setup = function()
vim.g.livepreview_previewer = require('defs').external_pdfviewer
vim.g.livepreview_engine = "xelatex"
end
}
-- Debugger Adapter Protocol
--[[
pk_use {
'mfussenegger/nvim-dap',
config = function()
local dap = require('dap')
end
}
--]]
|