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
|
vim.g.virtcolumn_char = '|'
require('gitsigns').setup {}
require("Comment").setup {}
require("mason").setup {}
require("oil").setup {
view_options = {
show_hidden = true,
},
}
require("presence").setup {}
local colors = {
white = "#FFFFFF",
gray = "#A0A0A0",
green = "#22CC55",
pink = "#FF4499",
bg = "#222222",
}
local theme = {
normal = {
a = {bg = colors.white, fg = colors.black, gui = 'bold,italic'},
b = {bg = colors.bg, fg = colors.white},
c = {bg = colors.bg, fg = colors.white}
},
insert = {
a = {bg = colors.pink, fg = colors.white, gui = 'bold,italic'},
b = {bg = colors.bg, fg = colors.white},
c = {bg = colors.bg, fg = colors.white}
},
visual = {
a = {bg = colors.green, fg = colors.white, gui = 'bold,italic'},
b = {bg = colors.bg, fg = colors.white},
c = {bg = colors.bg, fg = colors.white}
},
replace = {
a = {bg = colors.pink, fg = colors.white, gui = 'bold,italic'},
b = {bg = colors.bg, fg = colors.white},
c = {bg = colors.bg, fg = colors.white}
},
command = {
a = {bg = colors.gray, fg = colors.black, gui = 'bold,italic'},
b = {bg = colors.bg, fg = colors.white},
c = {bg = colors.bg, fg = colors.white}
},
inactive = {
a = {bg = colors.pink, fg = colors.white, gui = 'bold,italic'},
b = {bg = colors.bg, fg = colors.white},
c = {bg = colors.bg, fg = colors.white}
}
}
require("lualine").setup {
options = {
theme = theme,
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
},
}
require("nvim-autopairs").setup {
fast_wrap = {
map = "<M-e>",
chars = { "<", "{", "[", "(", "\"", "'" },
pattern = [=[[%"%"%>%]%)%}%,]]=],
end_key = "$",
keys = "qwertyuiopzxcvbnmasdfghjkl",
check_comma = true,
highlight = "Search",
highlight_grey="Comment"
}
}
local neogen = require("neogen")
neogen.setup {
snippet_engine = "luasnip",
}
vim.keymap.set("n", "<leader>df", "<CMD>Neogen<CR>", {
silent = true,
})
require("nvim-treesitter.configs").setup {
ensure_installed = { "c", "cpp", "lua", "vimdoc" },
sync_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = true,
},
indent = { enable = true },
}
vim.filetype.add({
extension = {
c3 = "c3",
c3i = "c3",
c3t = "c3",
},
})
local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
parser_config.c3 = {
install_info = {
url = "https://github.com/c3lang/tree-sitter-c3",
files = {"src/parser.c", "src/scanner.c"},
branch = "main",
},
}
do
local builtin = require("telescope.builtin")
require("telescope").setup {
pickers = {
find_files = {
theme = "dropdown",
}
}
}
vim.keymap.set("n", "<C-o>", builtin.find_files, {})
vim.keymap.set("n", "<C-g>", builtin.git_files, {})
vim.keymap.set("n", "<C-f>", function()
builtin.grep_string({ search = vim.fn.input("grep>") })
end)
end
vim.keymap.set("n", "<leader>i", "<CMD>TroubleToggle<CR>")
|