summaryrefslogtreecommitdiff
path: root/nvim/lua/plugins/init.lua
blob: b27e33f3775c253c062409d0ddd8accf9aa264ad (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
return require("packer").startup({
	function(use)
		use("wbthomason/packer.nvim")
		use("nvim-lua/plenary.nvim")
		use("neovim/nvim-lspconfig")
		use({
			"srt0/codescope.nvim",
			config = function()
				require("codescope").setup({
					transparent = false, -- Set to true for transparency
				})
				vim.cmd.colorscheme("codescope")
			end,
		})
		use("Snyssfx/goerr-nvim")
		use({
			"lukas-reineke/indent-blankline.nvim",
			config = function()
				require("ibl").setup()
			end,
		})
		use({
			"rcarriga/nvim-dap-ui",
			requires = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" },
			config = function()
				local dap, dapui = require("dap"), require("dapui")
				dapui.setup()
				dap.listeners.before.attach.dapui_config = function()
					dapui.open()
					vim.cmd(":NvimTreeClose<CR>")
				end
				dap.listeners.before.launch.dapui_config = function()
					dapui.open()
					vim.cmd(":NvimTreeClose<CR>")
				end
				dap.listeners.before.event_terminated.dapui_config = function()
					dapui.close()
					vim.cmd(":NvimTreeOpen<CR>")
				end
				dap.listeners.before.event_exited.dapui_config = function()
					dapui.close()
					vim.cmd(":NvimTreeOpen<CR>")
				end
			end,
		})
		use({
			"leoluz/nvim-dap-go",
			requires = { "mfussenegger/nvim-dap" },
			config = function()
				require("plugins.dap")
			end,
		})
		use({
			"hrsh7th/nvim-cmp",
			requires = {
				"hrsh7th/cmp-nvim-lsp",
				"hrsh7th/cmp-buffer",
				"hrsh7th/cmp-path",
				"hrsh7th/cmp-vsnip",
				"hrsh7th/vim-vsnip",
			},
			config = function()
				require("plugins.cmp")
			end,
		})
		use({
			"nvim-lualine/lualine.nvim",
			config = function()
				require("plugins.lualine")
			end,
		})
		use({
			"nvim-treesitter/nvim-treesitter",
			run = ":TSUpdate",
			config = function()
				require("plugins.treesitter")
			end,
		})
		use({
			"nvim-telescope/telescope.nvim",
			config = function()
				require("plugins.telescope")
			end,
		})
		use({
			"nvim-tree/nvim-tree.lua",
			requires = {
				"nvim-tree/nvim-web-devicons",
			},
			config = function()
				require("plugins.tree")
			end,
		})
		use({
			"stevearc/conform.nvim",
			config = function()
				require("plugins.format")
			end,
		})
		use({
			"mfussenegger/nvim-dap",
			config = function()
				local dap = require("dap")
				-- Общие конфигурации для Go
				dap.configurations.go = {
					{
						type = "go",
						name = "Debug",
						request = "launch",
						program = "${file}",
						showLog = true,
						console = "integratedTerminal",
					},
				}
			end,
		})
		if packer_bootstrap then
			require("packer").sync()
		end
	end,
	config = {
		-- The root has to be a directory named "pack"
		package_root = vim.fn.stdpath("data") .. "/site/pack",
	},
})