forked from fastvim/fastvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetting_started.norg
484 lines (318 loc) · 12.9 KB
/
getting_started.norg
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
* FastVim
Welcome to Fastvim, the next-gen galactic ☄️ Neovim distro that’s fast, modern, and fully configurable. Built for both lazy people who don’t want to mess around with endless configurations, and for the martian 👽 Neovim hackers who want full control over their setup. Whether you just want things to work right out of the box or you love tweaking every little detail, Fastvim is here to help.
This distro has everything you need for a smooth and efficient workflow, and if you’re feeling adventurous, you can dive in and make it your own. With custom themes 🎨 made just for you, if you like having themes for every phase and mood you’re going through, just like me.
Get ready to experience a Neovim setup that just works, without all the hassle. Let’s get you set up, fast and easy!
- {#-features}[✨ Features]
- {#-requirements}[📦 requirements]
- {#-installation}[💤 Installation]
-- {# linux or mac}
-- {# Windows}
-- {#-setup}[💻 Setup]
-- {# Quickstart}
--- {#️-keymaps}[🗺️ keymaps]
--- {#️--nified-guide-customizing-fastvim}[⚙️ Unified Guide: Customizing FastVim]
--- {# -snippets}[🌊snippets]
-- {# Tasks}
-- {# Goals}
- {#-contributing}[🔥 Contributing]
- {# Contributors}
- {#-acknowledgements}[👏 Acknowledgements]
- {#-team}[👨🏫 Team]
- {#-sponsor-this-project}[☕ Sponsor this project]
.alt dashboard
.image ./img/fastlazyvim.jpg
.alt code
.image ./img/fastcode.jpg
** ✨ Features
- 🔥 Turn your Neovim into a complete IDE.
- 💤 Customize and extend your configuration easily with lazy.nvim
- 🚀 Super fast
- 🧹 Common settings for options, autocms and keymaps
- 📦 Contains a variety of pre-configured and ready-to-use plugins
- ⚙️ *LSP (Language Server Protocol)*:
-- 🖥️ *astro.lua* - Astro server configuration
-- 🖥️ *angular.lua* - Angular server configuration
-- 🖥️ *clangd.lua* - clangd server configuration
-- 🌐 *cssls.lua* - CSSLS server configuration
-- 🖥️ *go.lua* - Go server configuration
-- 🌐 *html.lua* - HTML server configuration
-- 🖥️ *java.lua* - Java server configuration
-- 🖥️ *lua.lua* - Lua server configuration
-- 🖥️ *python.lua* - Python server configuration
-- 🖥️ *svelte.lua* - Svelte server configuration
-- 🖥️ *ts_ls.lua* - TypeScript/JavaScript server configuration
-- 🔧 *utils.lua* - LSP utilities
-- 🖥️ *vue.lua* - Vue server configuration
** 📦 requirements
- Neovim >= 0.9.0 (needs to be built with LuaJIT)
- Git >= 2.19.0 (for partial clones support)
- a Nerd Font(v3.0 or greater) (optional, but needed to display some icons)
- a C compiler for nvim-treesitter. See {https://github.com/nvim-treesitter/nvim-treesitter#requirements}[here]
** 💤 Installation
> [!WARNING]
Please, before installing, remember to make a backup of your dotfiles.
@code
mv ~/.config/nvim ~/.config/nvim.bak
mv ~/.local/share/nvim ~/.local/share/nvim.bak
@end
**** linux or mac
@code bash
git clone https://github.com/fastvim/fastvim.git ~/.config/nvim
cd .config/nvim
nvim # Then it will download everything by itself
@end
**** Windows
@code posh
git clone https://github.com/fastvim/fastvim.git $HOME\AppData\Local\nvim
@end
*** 💻 Setup
For the distro to work as expected, we need to configure a few things, let’s start by downloading the lsp(language server protocol) that you will use by installing with mason
To do this you type: `MasonInstall LspName`
Ex:
@code
:MasonInstall clangd
@end
Or if you are java dev
@code
MasonInstall jdtls
@end
Lsp (language server protocol) bring you countless benefits when coding, such as auto completions, syntactic error warnings in real time, and for this we have some plugins like {# nvim-cmp}, for snippets we have {# luasnip} that works exceptionally well and we have mini.pairs to autocomplete special characters like [], (), <>, etc…
|caption code-completions
.alt code-completions
.image ./img/fastcodecompletions.jpg
|end
With the setup complete, you’re now ready to dive into using your new Neovim IDE. Let’s get started!
** Quickstart
Now that everything is set up, let’s jump into using FastVim. Follow these steps to start coding efficiently:
Open Neovim
Launch Neovim by running:
@code bash
nvim
@end
Explore the Dashboard
Upon starting Neovim, you’ll see a customizable dashboard. Use it to quickly open recent files, create new projects, or access settings.
Install Plugins
Ensure all required plugins are installed by running:
@code bash
:Lazy
@end
This will display the plugin manager. Press u to update all plugins.
Set Up LSP
If you haven’t installed your language server yet, use Mason:
@code bash
:MasonInstall <LspName>
@end
Replace `|<LspName>|`(embed:html) with the appropriate server for your language (e.g., clangd for C/C++, jdtls for Java).
Start Coding
Open a file or create a new one:
@code bash
nvim myfile.<extension>
@end
Replace `|<extension>|`(embed:html) with the file type you’re working with (e.g., java, go, sql). Autocompletions, syntax highlighting, and LSP features will be ready to assist you.
*update distro*
To update the distro you have two options, `:FastUpdate` which will update the distro to the latest version, and `:FastStable` which will update the distro to the latest stable version (recommended)
*Explore Keymaps*
This configuration comes with pre-mapped keys for common actions. Check the keybindings guide by pressing:
@code bash
:help keymaps
@end
FastVim features a robust, Telescope-based search-and-replace system designed to optimize your workflow. With just two commands, you can efficiently find and replace terms across your project:
Replace in Selected Files: `:LazyReplace`
Use this command to replace terms within files containing matches for your search term.
FastVim will perform the replacements in the selected files and provide a summary of the results.
Replace Everywhere: `:LazyReplaceAll`
For project-wide replacements, simply use `:LazyReplaceAll`.
*documentation*
In this latest update of version 0.0.4 we added documentation written in neorg, as neorg is more complete, both in highlighting and other features, it is as good as markdown for documentation, and at any time you can open the documentation to ask any questions with `Ctrl + d`.
You’re now ready to enjoy a complete IDE experience with FastVim!
**** 🗺️ keymaps
To make your workflow much more fluid, we created countless keyboard shortcuts both to use the incredible plugins and to move around neovim in a faster and more efficient way.
: A1 : shortcut
: B1 : action
+hline2
#table.head.columns 2-29 0
: A2 : `|\fu|`(embed:tex)
: B2 : fast update
: A3 : `|\fs|`(embed:tex)
: B3 : fast stable distro update
: A4 : ctrl-h
: B4 : focus_nvimtree
: A5 : ctrl-n
: B5 : toggle_nvimtree
: A6 : `|\ff|`(embed:tex)
: B6 : find_files
: A7 : `|\fo|`(embed:tex)
: B7 : recent_files
: A8 : `|\fw|`(embed:tex)
: B8 : live_grep
: A9 : `|\gt|`(embed:tex)
: B9 : git_status
: A10 : Tab
: B10 : cycle_buffer_next
: A11 : S-Tab
: B11 : cycle_buffer_prev
: A12 : ctrl-q
: B12 : close_buffer
: A13 : / (Normal)
: B13 : toggle_comment_line
: A14 : / (Visual)
: B14 : toggle_comment_block
: A15 : `|\fm|`(embed:tex)
: B15 : format_code
: A16 : ctrl-\
: B16 : open_themery
: A17 : `|\t ||`(embed:tex) split_terminal_horizontal
: A18 : `|\tv|`(embed:tex)
: B18 : split_terminal_vertical
: A19 : A-Up (Insert)
: B19 : move_line_up
: A20 : A-Down (Insert)
: B20 : move_line_down
: A21 : ctrl-Up (Insert)
: B21 : select_line_up
: A22 : ctrl-Down (Insert)
: B22 : select_line_down
: A23 : `|\nw|`(embed:tex)
: B23 : neorg_switch_workspace
: A24 : `|\nn|`(embed:tex)
: B24 : neorg_open_index
: A25 : `|\nt|`(embed:tex)
: B25 : neorg_toggle_concealer
: A26 : `|\nh|`(embed:tex)
: B26 : neorg_toggle_todo
: A27 : `|\nc|`(embed:tex)
: B27 : neorg_toggle_concealer_visibility
: A28 : ctrl+t
: B28 : open toggle terminal
: A29 : ctrl+d
: B29 : open fastvim user reference manual
*** ⚙️ Unified Guide: Customizing FastVim
FastVim has two interesting configurable features: seamless theme switching and the File Starter module. Both are simple to configure and give you control over the behavior of your editor. Let’s explore both options!
Configuration directory
FastVim uses a dedicated directory for configurations, and its location depends on your operating system:
- Linux: `~/.fast.d/`
- Windows: `%AppData%\\.fast.d\\` (this points to the Roaming directory).
Make sure this directory exists before proceeding.
Configuring theme switching
Customize the look of your editor by easily switching themes.
Open your operating system’s configuration directory.
Inside .fast.d, make sure there is an init.lua file (create it if necessary).
Add this line to set your desired theme:
@code lua
vim.g.define_colorscheme("themename")
@end
Replace "themename" with your desired theme, such as "gruvbox":
@code lua
vim.g.define_colorscheme("gruvbox")
@end
Managing the File Starter module:
The File Starter module is disabled by default, automatically creating Java class files. If performance is your priority, you can enable it.
In the same init.lua file, add the following line to enable the module:
@code lua
vim.g.auto_create_java_class = true
@end
The FastVim loader will automatically parse the init.lua file in your configuration directory and apply all the settings during Neovim startup. No extra steps are necessary — just set your preferences and they will take effect.
Why configure these features?
Theme Switcher: Customize your editor with styles that match your taste, whether vibrant or minimalist.
File starter: Saves you time by automatically creating a class when opening an empty Java file.
This setup ensures flexibility while maintaining simplicity in configuration.
*** 🌊 Snippets
We have configured some snippets to make your life as a developer easier, but there are few of them because it is still the beginning of the distro, more snippets will come over time...
Let's start with Python snippets which have more snippets than other languages.
`def`
Will complete with
@code python
def function_name(args):
pass
@end
`doc`
Will complete with
@code python
"""
Description of the function.
Args:
param1 (type):
Description of param1
param2 (type):
Description of param2.
Returns:
return_type:
Description of the return value.
"""
@end
`for`
Will complete with
@code python
for item in list:
pass
@end
*** Tasks
- Handlers:
-- (x) to set default theme
-- ( ) to exclude plugins from config
-- ( ) to add plugins to config
-- ( ) to set env vars
-- ( ) to choose between snacks and mini
-- ( ) to enable or disable one of the lsp
-- ( ) fast mode (load only lsp and completion plugins)
- Ui:
-- ( ) custom theme for alpha nvim
- Lsp:
-- (x) lsp for astro js
-- (x) lsp for angular js
-- ( ) lsp for csharp
-- ( ) lsp for godot script
-- ( ) lsp for haskell
-- (x) lsp for python
-- (x) lsp for sveltejs
-- (x) lsp for vuejs
- Config loader:
-- ( ) Add asynchronous job to load config in real time
*** Goals
: A1 : *Goal*
: B1 : stats
+hline2
#table.head.columns 2-9 0
: A2 : Have own color scheme
: B2 : ✅
: A3 : cross platform support
: B3 : ✅
: A4 : add a markdown-mode
: B4 : ❌
: A5 : add a neovim web wowser
: B5 : ❌
: A6 : add a configuration compatibility between vim and neovim
: B6 : ❌
: A7 : adding specialized config in gamedev
: B7 : ❌
: A8 : adding full and more complete documentation
: B8 : ❌
: A9 : adding full and advanced config for java
: B9 : ❌
** 🔥 Contributing
Pull requests are welcome.
That said, there’s a bunch of ways you can contribute to this project, like by:
- ⭐ Giving a star on this repository (this is very important and costs nothing)
- 🪲 Reporting a bug
- 📄 Improving this {./doc/getting_started.norg}[documentation]
- 🚨 Sharing this project and recommending it to your friends
- 💻 Submitting a pull request to the official repository
** Contributors
This project exists thanks to all the people who contribute.
`|<a href="https://github.com/fastvim/fastvim/graphs/contributors">|`(embed:html)
`|<img src="https://contrib.rocks/image?repo=fastvim/fastvim&max=24" />|`(embed:html)
`|</a>|`(embed:html)
** 👏 Acknowledgements
This project thanks everyone who inspired it
- {https://github.com/doomemacs/doomemacs}[doom emacs]
- {https://github.com/doom-neovim/doom-nvim}[doom-nvim]
- {https://github.com/SpaceVim/SpaceVim}[space-vim]
- {https://github.com/LunarVim/LunarVim}[lunar-vim]
- {https://github.com/LazyVim/LazyVim}[LazyVim]
- {https://github.com/NvChad/NvChad}[NvChad]
** 👨🏫 Team
- {https://github.com/BrunoCiccarino}[BrunoCiccarino]: wsl-ubuntu
** ☕ Sponsor this project
{https://buymeacoffee.com/ciccabr9p}[.alt "Buy Me A Coffee"
.image https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png
]