-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.lua
187 lines (156 loc) · 3.04 KB
/
init.lua
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
-- Get all the required Fignvim API functions and commands required for setup
for _, source in ipairs({
"api",
"lsp",
"core",
}) do
local status_ok, fault = pcall(require, source)
if not status_ok then
vim.api.nvim_err_writeln("Failed to load " .. source .. "\n\n" .. fault)
end
end
fignvim.module.register_plugins({
-- Plugin Development
-- "sqlite",
"neodev",
"luapad",
-- Keybinds and Cheatsheets
"cheatsheet",
"whichkey",
-- General Editing
"undotree",
"refactoring",
"easyalign",
"ssr",
"treesj",
"dial",
"matchup", -- https://github.com/andymass/vim-matchup
"autopairs",
"nvim-surround",
"vim-unimpaired",
"comment",
"indent-blankline",
-- UI
"notify",
"heirline",
"colourschemes",
"dressing",
"colorizer",
"maximizer",
"transparent",
-- LSP
"lsp_config",
"mason",
"none-ls",
"lsp-overloads",
"lsp-progress",
"schemastore",
-- Completions and Snippets
"cmp",
"copilot",
"copilot-chat",
"luasnip",
-- Treesitter
"treesitter", -- Loads treesitter-related plugins as well
"aerial",
-- Navigation
"telescope",
-- "neo_tree",
"netrw_nvim",
"leap",
"rnvimr",
"nvim-navic", -- https://github.com/SmiteshP/nvim-navic
-- Cut and paste
"cutlass",
-- "yanky" - Performance is an issue when using this plugin. Pastes / yanks are slow
-- Search and replace
"vim-abolish",
"spectre",
"substitute",
"bqf",
-- Diagnostics
"trouble",
-- Git
"gitsigns",
"diffview",
"git-messenger",
"octo",
-- Session management
"auto-session",
-- Terminal
"toggleterm",
-- Debugging
"dap",
"dap-ui",
"dap-virtual-text",
-- Documenting
"neogen",
"plantuml",
"markdown-preview",
"obsidian",
"swagger-preview",
-- Icons
"nvim-web-devicons",
"icon-picker",
-- Colours
"colorutils",
-- Testing
"neotest",
-- Terraform
"vim-terraform",
-- LaTeX
"vimtex",
-- .NET
"omnisharp-extended-lsp",
"roslyn",
"easy-dotnet",
-- C++
"vim-cmake",
-- Databases
"dadbod",
-- Nx
"nx",
-- Packages
"luarocks",
})
if vim.fn.has("win32") == 1 then
fignvim.config.set_shell_as_powershell()
end
if vim.fn.has("wsl") == 1 then
fignvim.config.set_win32yank_wsl_as_clip()
end
fignvim.plug.initialise_lazy_nvim()
fignvim.plug.setup_lazy_plugins()
-- 5. Set up the LSP servers (also sets keymaps for LSP related actions)
fignvim.lsp.setup_lsp_servers({
"jsonls",
"cucumber_language_server",
"ts_ls",
"lua_ls",
"texlab",
-- "omnisharp",
"roslyn.nvim", -- Not directly language server - See https://github.com/jmederosalvarado/roslyn.nvim
-- "csharp_ls",
"terraformls",
"stylelint_lsp",
"emmet_ls",
"bashls",
"dockerls",
"docker_compose_language_service",
"html",
"vimls",
"yamlls",
"angularls",
"cssls",
"tflint",
"powershell_es",
"eslint",
"clangd",
"cmake",
"pyright",
"tailwindcss",
-- "ruff_lsp",
})
-- 6. Create mappings
vim.api.nvim_set_keymap("", "<Space>", "<Nop>", { silent = true }) -- Prep for space to be leader key
fignvim.mappings.create_core_mappings()