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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
|
require("lazy").setup({
--
-- ColourScheme Setup
--
{
"rebelot/kanagawa.nvim",
config = function()
vim.cmd.colorscheme("kanagawa-wave")
end,
},
{
'goolord/alpha-nvim',
dependencies = { 'nvim-tree/nvim-web-devicons' },
config = function ()
require'alpha'.setup(require'alpha.themes.startify'.config)
end
},
{
"sam4llis/nvim-lua-gf"
},
--
-- Nvim-tree Setup
--
{
"nvim-tree/nvim-tree.lua",
dependencies = {
"nvim-tree/nvim-web-devicons"
},
config = function()
require("nvim-tree").setup({})
end,
},
{
"nvim-tree/nvim-web-devicons",
},
--
-- Telescope Setup
--
{
"nvim-lua/plenary.nvim",
cmd = { "PlenaryBustedFile", "PlenaryBustedDirectory" },
lazy = true
},
{
'nvim-telescope/telescope.nvim',
dependencies = {
"nvim-lua/plenary.nvim",
"telescope-fzf-native.nvim"
},
lazy = true,
},
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
lazy = true
},
{
"folke/neodev.nvim",
lazy = true,
},
-- Autopairs
{
"windwp/nvim-autopairs",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"hrsh7th/nvim-cmp"
},
},
--
-- Treesitter Setup
--
{
"nvim-treesitter/nvim-treesitter",
config = function()
require("config.nvim_treesitter_config_setup")
end,
},
{
"nvim-treesitter/nvim-treesitter-textobjects"
},
--
-- Language Server Setup
--
{
"neovim/nvim-lspconfig",
lazy = true,
dependencies = { "mason-lspconfig.nvim", "nlsp-settings.nvim" },
},
{
"williamboman/mason.nvim",
config = function ()
require("mason").setup()
end,
},
{
"williamboman/mason-lspconfig.nvim",
dependencies = { "mason.nvim"},
config = function ()
require("config.mason_lspconfig_setup")
end,
},
{
"tamago324/nlsp-settings.nvim",
lazy = true,
},
{
"nvimtools/none-ls.nvim",
lazy = true,
},
--
-- Completion Engine Setup
--
{
"hrsh7th/cmp-nvim-lsp",
lazy = true,
},
{
"saadparwaiz1/cmp_luasnip",
lazy = true,
},
{
"hrsh7th/cmp-buffer",
lazy = true,
},
{
"hrsh7th/cmp-path",
lazy = true,
},
{
"hrsh7th/cmp-cmdline",
lazy = true,
},
{
"L3MON4D3/LuaSnip",
config = function()
-- require("luasnip.loaders.from_lua").lazy_load()
require("luasnip.loaders.from_vscode").lazy_load()
-- require("luasnip.loaders.from_snipmate").lazy_load()
end,
event = "InsertEnter",
dependencies = {
"friendly-snippets",
},
},
{
"rafamadriz/friendly-snippets",
lazy = true
},
{
"hrsh7th/nvim-cmp",
event = "InsertEnter",
dependencies = {
"cmp-nvim-lsp",
"cmp-buffer", -- source for text in buffer
"cmp-path", -- source for file systems paths in commands
"L3MON4D3/LuaSnip", -- snippet engine
"saadparwaiz1/cmp_luasnip", -- for lua autocompletion
"rafamadriz/friendly-snippets", -- useful snippets engine
"onsails/lspkind.nvim", -- vs-code like pictograms
"cmp-cmdline",
},
config = function()
local cmp = require("cmp")
local luasnip = require("luasnip")
local lspkind = require("lspkind")
-- loads vscode style snippets from installed plugins
-- require("luasnip.loaders.from_lua").lazy_load()
require("luasnip.loaders.from_vscode").lazy_load()
-- require("luasnip.loaders.from_snipmate").lazy_load()
cmp.setup({
completion = {
completeopt = "menu,menuone,preview,noselect",
},
snippet = {
expand = function(args)
require("luasnip").lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert({
["<C-n>"] = cmp.mapping.select_prev_item(),
["<C-p>"] = cmp.mapping.select_next_item(),
["<C-u>"] = cmp.mapping.scroll_docs(-4),
["<C-d>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(), -- show completion suggestions
["<C-e>"] = cmp.mapping.abort(),
["<CR>"] = cmp.mapping.confirm({ select = false}),
}),
--sources for autocompletion
sources = cmp.config.sources({
{ name = "nvim_lsp" },
{ name = "luasnip" }, -- snippets
{ name = "buffer" }, -- text within current buffer
{ name = "path" }, -- file system paths
}),
-- configure lspkind for vs-code like pictograms in completion menu
formatting = {
format = lspkind.cmp_format({
maxwidth = 50,
ellipsis_char = "...:",
}),
},
})
end
},
--
-- Whichkey
--
{
"folke/which-key.nvim",
event = "VeryLazy",
init = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
end,
--require("config.which_key_config").setup({})
},
{
'nvim-orgmode/orgmode',
dependencies = {
{ 'nvim-treesitter/nvim-treesitter', lazy = true },
},
event = 'VeryLazy',
config = function()
-- Setup treesitter
require('nvim-treesitter.configs').setup({
highlight = {
enable = true,
},
ensure_installed = { 'org' },
})
-- Setup Orgmode
require('orgmode').setup({
org_agenda_files = '~/Orgmode/**/*',
org_default_notes_file = '~/Orgmode/refile.org',
mappings = {
org_return_uses_meta_return = true,
},
})
end
},
{
"stevearc/dressing.nvim",
},
-- {
-- "akinsho/toggleterm.nvim",
-- config = true
-- },
{
"mfussenegger/nvim-dap-python",
},
{
"nvim-neotest/neotest",
},
{
"nvim-neotest/neotest-python",
},
{
"tpope/vim-fugitive",
},
{
"tpope/vim-rhubarb",
},
{
'stevearc/oil.nvim',
opts = {},
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function ()
require("oil").setup({
default_file_explorer = true,
skip_confirm_for_simple_edits = true,
view_options = {
show_hidden = true,
natural_order = true,
is_always_hidden = function (name, _)
return name == '..' or name == '.git'
end,
},
win_options = {
wrap = true,
}
})
end
},
{
"chrishrb/gx.nvim",
keys = { { "gx", "<cmd>Browse<cr>", mode = { "n", "x" } } },
cmd = { "Browse" },
init = function ()
vim.g.netrw_nogx = 1 -- disable netrw gx
end,
dependencies = { "nvim-lua/plenary.nvim" },
submodules = false, -- not needed, submodules are required only for tests
-- you can specify also another config if you want
config = function() require("gx").setup {
open_browser_app = "xdg-open", -- specify your browser app; default for macOS is "open", Linux "xdg-open" and Windows "powershell.exe"
-- open_browser_args = { "--background" }, -- specify any arguments, such as --background for macOS' "open".
handlers = {
plugin = true, -- open plugin links in lua (e.g. packer, lazy, ..)
github = true, -- open github issues
package_json = true, -- open dependencies from package.json
search = true, -- search the web/selection on the web if nothing else is found
go = true, -- open pkg.go.dev from an import statement (uses treesitter)
},
handler_options = {
search_engine = "https://search.brave.com/search?q=", -- or you can pass in a custom search engine
select_for_search = false, -- if your cursor is e.g. on a link, the pattern for the link AND for the word will always match. This disables this behaviour for default so that the link is opened without the select option for the word AND link
},
} end,
},
{
"vimwiki/vimwiki",
init = function()
vim.g.vimwiki_list = {
{
path = '~/vimwiki.md/',
syntax = 'markdown',
ext = '.md',
},
}
end
},
{
"kdheepak/cmp-latex-symbols",
},
{
"KeitaNakamura/tex-conceal.vim",
},
{
"f3fora/nvim-texlabconfig",
config = function()
require("texlabconfig").setup()
end,
ft = { 'tex', 'bib' }, -- Lazy-load on filetype
build = 'go build'
},
{
"lervag/vimtex",
init = function()
vim.cmd([[
let g:tex_flavor = 'latex'
let g:vimtex_view_method = 'zathura'
let g:vimtex_quickfix_mode = 0
let g:vimtex_cache_persistent = 0
set conceallevel=1
let g:tex_conceal = 'abdmg'
]])
vim.keymap.set('i', '<C-f>', [[<Esc>: silent exec '.!inkscape-figures create "'.getline('.').'" "'.b:vimtex.root.'/figures/"'<CR><CR>:w<CR> ]])
vim.keymap.set('n', '<C-f>', [[: silent exec '!inkscape-figures edit "'.b:vimtex.root.'/figures/" > /dev/null 2>&1 &'<CR><CR>:redraw!<CR>]])
vim.api.nvim_create_autocmd("BufEnter",{
callback = function()
vim.fn.system({
"inkscape-figures",
"watch"
})
end,
})
end
},
{
"vhyrro/luarocks.nvim",
priority = 1000,
opts = {
rocks = { "fzy", "pathlib.nvim", },
},
config = true,
},
{
"nvim-neorg/neorg-telescope",
},
{
"nvim-neorg/neorg",
ft = "norg",
lazy = false, -- specify lazy = false because some lazy.nvim distributions set lazy = true by default
dependencies = {
{ "luarocks.nvim" },
{ 'nvim-lua/plenary.nvim' },
{ 'nvim-treesitter/nvim-treesitter' },
{ 'nvim-neorg/tree-sitter-norg' },
{ 'nvim-treesitter/nvim-treesitter-textobjects' },
{ 'hrsh7th/nvim-cmp' },
{ 'nvim-neorg/neorg-telescope' },
{ 'tamton-aquib/neorg-jupyter' },
{ "pysan3/neorg-templates", dependencies = { "L3MON4D3/LuaSnip" } },
{ 'pritchett/neorg-capture' },
{ 'nvim-neorg/neorg-gtd' },
},
-- build = ":Neorg sync-parsers",
cmd = "Neorg",
config = function()
-- Setup treesitter
require('nvim-treesitter.configs').setup({
highlight = {
enable = true,
}
})
require("neorg").setup {
load = {
["core.defaults"] = {},
["core.completion"] = { config = { engine = "nvim-cmp", name = "[Norg]" }, },
["core.integrations.nvim-cmp"] = {},
["core.integrations.telescope"] = {},
["core.concealer"] = { config = { icon_preset = "diamond" } },
["core.keybinds"] = {
config = {
default_keybinds = true,
neorg_leader = "<Leader>",
LocalLeader = "<Leader>",
},
},
["core.dirman"] = { -- Manages Neorg workspaces
config = {
workspaces = {
notes = "~/Notes",
tutorial = "~/Notes/Norg-Tutorial",
uh = "~/Notes/UH",
},
default_workspace = "notes",
use_popup = true,
},
},
["core.ui.calendar"] = {},
["external.jupyter"] = {}
},
}
end
},
{
"goerz/jupytext.vim",
},
{
"untitled-ai/jupyter_ascending.vim",
},
{"dccsillag/magma-nvim",
-- run = ":UpdateRemotePlugins",
config = function()
vim.cmd([[nnoremap <silent> <leader>mk :MagmaInit Python3<CR>
nnoremap <silent> <leader>m :MagmaEvaluateOperator<CR>
nnoremap <silent> <leader>mm :MagmaEvaluateLine<CR>
xnoremap <silent> <leader>m :<C-u>MagmaEvaluateVisual<CR>
nnoremap <silent> <leader>mc :MagmaReevaluateCell<CR>
nnoremap <silent> <leader>md :MagmaDelete<CR>
nnoremap <silent> <leader>mo :MagmaShowOutput<CR>
nnoremap <silent> <leader>ms :MagmaSave<CR>
let g:magma_automatically_open_output = v:false
let g:magma_image_provider = "ueberzug"
let g:magma_save_path = "~/tmp/magma"
]])
end,
},
-- Terminal
{
"akinsho/toggleterm.nvim",
config = function()
require("toggleterm").setup({
open_mapping = [[<c-\>]],
hide_numbers = true, -- hide the number column in toggleterm buffers
shade_filetypes = {},
shade_terminals = true,
shading_factor = 2, -- the degree by which to darken to terminal colour, default: 1 for dark backgrounds, 3 for light
start_in_insert = true,
insert_mappings = true, -- whether or not the open mapping applies in insert mode
persist_size = false,
-- direction = 'vertical' | 'horizontal' | 'window' | 'float',
direction = "float",
close_on_exit = true, -- close the terminal window when the process exits
auto_scroll = true, -- automatically scroll to the bottom on terminal output
shell = nil, -- change the default shell
-- This field is only relevant if direction is set to 'float'
float_opts = {
-- The border key is *almost* the same as 'nvim_win_open'
-- see :h nvim_win_open for details on borders however
-- the 'curved' border is a custom border type
-- not natively supported but implemented in this plugin.
-- border = 'single' | 'double' | 'shadow' | 'curved' | ... other options supported by win open
border = "curved",
-- width = <value>,
-- height = <value>,
winblend = 0,
highlights = {
border = "Normal",
background = "Normal",
},
},
winbar = {
enabled = true,
},
-- Add executables on the config.lua
-- { cmd, keymap, description, direction, size }
-- lvim.builtin.terminal.execs = {...} to overwrite
-- lvim.builtin.terminal.execs[#lvim.builtin.terminal.execs+1] = {"gdb", "tg", "GNU Debugger"}
-- TODO: pls add mappings in which key and refactor this
execs = {
{ nil, "<M-1>", "Horizontal Terminal", "horizontal", 0.3 },
{ nil, "<M-2>", "Vertical Terminal", "vertical", 0.4 },
{ nil, "<M-3>", "Float Terminal", "float", nil },
},
cmd = {
"ToggleTerm",
"TermExec",
"ToggleTermToggleAll",
"ToggleTermSendCurrentLine",
"ToggleTermSendVisualLines",
"ToggleTermSendVisualSelection",
},
})
end,
},
})
|