Skip to content

Commit 4b2ae65

Browse files
author
Fabian Imhof
committed
update fork
1 parent 3be5adb commit 4b2ae65

File tree

15 files changed

+535
-450
lines changed

15 files changed

+535
-450
lines changed

README.md

Lines changed: 43 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,47 +23,58 @@ If you are experiencing issues, please make sure you have the latest versions.
2323

2424
External Requirements:
2525
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
26-
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
27-
- Clipboard tool (xclip/xsel/win32yank or other depending on platform)
26+
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation),
27+
[fd-find](https://github.com/sharkdp/fd#installation)
28+
- Clipboard tool (xclip/xsel/win32yank or other depending on the platform)
2829
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
2930
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
31+
- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji`
3032
- Language Setup:
31-
- If want to write Typescript, you need `npm`
32-
- If want to write Golang, you will need `go`
33+
- If you want to write Typescript, you need `npm`
34+
- If you want to write Golang, you will need `go`
3335
- etc.
3436

35-
> **NOTE**
37+
> [!NOTE]
3638
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
3739
> and quick install snippets
3840
3941
### Install Kickstart
4042

41-
> **NOTE**
43+
> [!NOTE]
4244
> [Backup](#FAQ) your previous configuration (if any exists)
4345
4446
Neovim's configurations are located under the following paths, depending on your OS:
4547

4648
| OS | PATH |
4749
| :- | :--- |
4850
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
49-
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
50-
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
51+
| Windows (cmd)| `%localappdata%\nvim\` |
52+
| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
5153

5254
#### Recommended Step
5355

5456
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo
5557
so that you have your own copy that you can modify, then install by cloning the
5658
fork to your machine using one of the commands below, depending on your OS.
5759

58-
> **NOTE**
59-
> Your fork's url will be something like this:
60+
> [!NOTE]
61+
> Your fork's URL will be something like this:
6062
> `https://github.com/<your_github_username>/kickstart.nvim.git`
6163
64+
You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file
65+
too - it's ignored in the kickstart repo to make maintenance easier, but it's
66+
[recommended to track it in version control](https://lazy.folke.io/usage/lockfile).
67+
6268
#### Clone kickstart.nvim
69+
70+
> [!NOTE]
71+
> If following the recommended step above (i.e., forking the repo), replace
72+
> `nvim-lua` with `<your_github_username>` in the commands below
73+
6374
<details><summary> Linux and Mac </summary>
6475

6576
```sh
66-
git clone https://github.com/TheSoeren/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
77+
git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
6778
```
6879

6980
</details>
@@ -73,13 +84,13 @@ git clone https://github.com/TheSoeren/kickstart.nvim.git "${XDG_CONFIG_HOME:-$H
7384
If you're using `cmd.exe`:
7485

7586
```
76-
git clone https://github.com/TheSoeren/kickstart.nvim.git %userprofile%\AppData\Local\nvim\
87+
git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim"
7788
```
7889

7990
If you're using `powershell.exe`
8091

8192
```
82-
git clone https://github.com/TheSoeren/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\
93+
git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
8394
```
8495

8596
</details>
@@ -93,22 +104,27 @@ nvim
93104
```
94105

95106
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
96-
current plugin status. Hit `q` to close the window.
107+
the current plugin status. Hit `q` to close the window.
108+
109+
#### Read The Friendly Documentation
97110

98111
Read through the `init.lua` file in your configuration folder for more
99112
information about extending and exploring Neovim. That also includes
100113
examples of adding popularly requested plugins.
101114

115+
> [!NOTE]
116+
> For more information about a particular plugin check its repository's documentation.
117+
102118

103119
### Getting Started
104120

105121
[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
106122

107123
### FAQ
108124

109-
* What should I do if I already have a pre-existing neovim configuration?
125+
* What should I do if I already have a pre-existing Neovim configuration?
110126
* You should back it up and then delete all associated files.
111-
* This includes your existing init.lua and the neovim files in `~/.local`
127+
* This includes your existing init.lua and the Neovim files in `~/.local`
112128
which can be deleted with `rm -rf ~/.local/share/nvim/`
113129
* Can I keep my existing configuration in parallel to kickstart?
114130
* Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME`
@@ -122,17 +138,17 @@ examples of adding popularly requested plugins.
122138
`~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim
123139
distribution that you would like to try out.
124140
* What if I want to "uninstall" this configuration:
125-
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
141+
* See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information
126142
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
127143
* The main purpose of kickstart is to serve as a teaching tool and a reference
128144
configuration that someone can easily use to `git clone` as a basis for their own.
129145
As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
130-
into smaller parts. A fork of kickstart that does this while maintaining the
146+
into smaller parts. A fork of kickstart that does this while maintaining the
131147
same functionality is available here:
132148
* [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
133149
* Discussions on this topic can be found here:
134-
* [Restructure the configuration](https://github.com/TheSoeren/kickstart.nvim/issues/218)
135-
* [Reorganize init.lua into a multi-file setup](https://github.com/TheSoeren/kickstart.nvim/pull/473)
150+
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
151+
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
136152
137153
### Install Recipes
138154
@@ -166,7 +182,7 @@ run in cmd as **admin**:
166182
winget install --accept-source-agreements chocolatey.chocolatey
167183
```
168184

169-
2. install all requirements using choco, exit previous cmd and
185+
2. install all requirements using choco, exit the previous cmd and
170186
open a new one so that choco path is set, and run in cmd as **admin**:
171187
```
172188
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
@@ -199,14 +215,14 @@ sudo apt update
199215
sudo apt install make gcc ripgrep unzip git xclip curl
200216
201217
# Now we install nvim
202-
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
203-
sudo rm -rf /opt/nvim-linux64
204-
sudo mkdir -p /opt/nvim-linux64
205-
sudo chmod a+rX /opt/nvim-linux64
206-
sudo tar -C /opt -xzf nvim-linux64.tar.gz
218+
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz
219+
sudo rm -rf /opt/nvim-linux-x86_64
220+
sudo mkdir -p /opt/nvim-linux-x86_64
221+
sudo chmod a+rX /opt/nvim-linux-x86_64
222+
sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz
207223
208224
# make it available in /usr/local/bin, distro installs to /usr/bin
209-
sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/
225+
sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/
210226
```
211227
</details>
212228
<details><summary>Fedora Install Steps</summary>
@@ -222,4 +238,3 @@ sudo dnf install -y gcc make git ripgrep fd-find unzip neovim
222238
sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim
223239
```
224240
</details>
225-

lua/autocommands.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
-- Highlight when yanking (copying) text
55
-- Try it with `yap` in normal mode
6-
-- See `:help vim.highlight.on_yank()`
6+
-- See `:help vim.hl.on_yank()`
77
vim.api.nvim_create_autocmd('TextYankPost', {
88
desc = 'Highlight when yanking (copying) text',
99
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
1010
callback = function()
11-
vim.highlight.on_yank()
11+
vim.hl.on_yank()
1212
end,
1313
})

lua/custom/plugins/cmp-vimtex.lua

Lines changed: 0 additions & 1 deletion
This file was deleted.

lua/custom/plugins/lazydev.lua

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
return {
2+
-- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins
3+
-- used for completion, annotations and signatures of Neovim apis
4+
'folke/lazydev.nvim',
5+
ft = 'lua',
6+
opts = {
7+
library = {
8+
-- Load luvit types when the `vim.uv` word is found
9+
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
10+
},
11+
},
12+
}

lua/custom/plugins/telescope.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
return { -- Fuzzy Finder (files, lsp, etc)
22
'nvim-telescope/telescope.nvim',
33
event = 'VimEnter',
4-
branch = '0.1.x',
54
dependencies = {
65
'nvim-lua/plenary.nvim',
76
{ -- If encountering errors, see telescope-fzf-native README for installation instructions

lua/custom/plugins/vimtex.lua

Lines changed: 0 additions & 14 deletions
This file was deleted.

lua/custom/plugins/which-key.lua

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@ return { -- Useful plugin to show you pending keybinds.
44
'nvim-tree/nvim-web-devicons',
55
},
66
event = 'VimEnter', -- Sets the loading event to 'VimEnter'
7-
opt = {
7+
opts = {
8+
-- delay between pressing a key and opening which-key (milliseconds)
9+
-- this setting is independent of vim.o.timeoutlen
10+
delay = 0,
811
icons = {
912
-- set icon mappings to true if you have a Nerd Font
1013
mappings = vim.g.have_nerd_font,
1114
-- If you are using a Nerd Font: set icons.keys to an empty table which will use the
12-
-- default whick-key.nvim defined Nerd Font icons, otherwise define a string table
15+
-- default which-key.nvim defined Nerd Font icons, otherwise define a string table
1316
keys = vim.g.have_nerd_font and {} or {
1417
Up = '<Up> ',
1518
Down = '<Down> ',
@@ -41,10 +44,9 @@ return { -- Useful plugin to show you pending keybinds.
4144
F12 = '<F12>',
4245
},
4346
},
47+
48+
-- Document existing key chains
4449
spec = {
45-
{ '<leader>c', group = '[C]ode', mode = { 'n', 'x' } },
46-
{ '<leader>d', group = '[D]ocument' },
47-
{ '<leader>r', group = '[R]ename' },
4850
{ '<leader>s', group = '[S]earch' },
4951
{ '<leader>w', group = '[W]orkspace' },
5052
{ '<leader>t', group = '[T]oggle' },
Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
-- autopairs
22
-- https://github.com/windwp/nvim-autopairs
3-
43
return {
54
'windwp/nvim-autopairs',
65
event = 'InsertEnter',
7-
-- Optional dependency
8-
dependencies = { 'hrsh7th/nvim-cmp' },
9-
config = function()
10-
require('nvim-autopairs').setup {}
11-
-- If you want to automatically add `(` after selecting a function or method
12-
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
13-
local cmp = require 'cmp'
14-
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
15-
end,
6+
opts = {},
167
}

lua/kickstart/plugins/debug.lua

Lines changed: 54 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,62 @@ return {
88
'nvim-neotest/nvim-nio',
99

1010
-- Installs the debug adapters for you
11-
'williamboman/mason.nvim',
11+
'mason-org/mason.nvim',
1212
'jay-babu/mason-nvim-dap.nvim',
1313
},
14+
keys = {
15+
-- Basic debugging keymaps, feel free to change to your liking!
16+
{
17+
'<F5>',
18+
function()
19+
require('dap').continue()
20+
end,
21+
desc = 'Debug: Start/Continue',
22+
},
23+
{
24+
'<F1>',
25+
function()
26+
require('dap').step_into()
27+
end,
28+
desc = 'Debug: Step Into',
29+
},
30+
{
31+
'<F2>',
32+
function()
33+
require('dap').step_over()
34+
end,
35+
desc = 'Debug: Step Over',
36+
},
37+
{
38+
'<F3>',
39+
function()
40+
require('dap').step_out()
41+
end,
42+
desc = 'Debug: Step Out',
43+
},
44+
{
45+
'<leader>b',
46+
function()
47+
require('dap').toggle_breakpoint()
48+
end,
49+
desc = 'Debug: Toggle Breakpoint',
50+
},
51+
{
52+
'<leader>B',
53+
function()
54+
require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ')
55+
end,
56+
desc = 'Debug: Set Breakpoint',
57+
},
58+
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
59+
{
60+
'<F7>',
61+
function()
62+
require('dapui').toggle()
63+
end,
64+
desc = 'Debug: See last session result.',
65+
},
66+
},
1467
config = function()
1568
local dap = require 'dap'
1669
local dapui = require 'dapui'
@@ -26,15 +79,6 @@ return {
2679
},
2780
}
2881

29-
vim.keymap.set('n', '<F5>', dap.continue, { desc = 'Debug: Start/Continue' })
30-
vim.keymap.set('n', '<F1>', dap.step_into, { desc = 'Debug: Step Into' })
31-
vim.keymap.set('n', '<F2>', dap.step_over, { desc = 'Debug: Step Over' })
32-
vim.keymap.set('n', '<F3>', dap.step_out, { desc = 'Debug: Step Out' })
33-
vim.keymap.set('n', '<leader>b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' })
34-
vim.keymap.set('n', '<leader>B', function()
35-
dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ')
36-
end, { desc = 'Debug: Set Breakpoint' })
37-
3882
-- Dap UI setup
3983
-- For more information, see |:help nvim-dap-ui|
4084
dapui.setup {
@@ -79,9 +123,6 @@ return {
79123
},
80124
}
81125

82-
-- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
83-
vim.keymap.set('n', '<F7>', dapui.toggle, { desc = 'Debug: See last session result.' })
84-
85126
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
86127
dap.listeners.before.event_exited['dapui_config'] = dapui.close
87128
end,

lua/kickstart/plugins/gitsigns.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ return {
3636
-- visual mode
3737
map('v', '<leader>hs', function()
3838
gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' }
39-
end, { desc = 'stage git hunk' })
39+
end, { desc = 'git [s]tage hunk' })
4040
map('v', '<leader>hr', function()
4141
gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' }
42-
end, { desc = 'reset git hunk' })
42+
end, { desc = 'git [r]eset hunk' })
4343
-- normal mode
4444
map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' })
4545
map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' })
4646
map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' })
47-
map('n', '<leader>hu', gitsigns.undo_stage_hunk, { desc = 'git [u]ndo stage hunk' })
47+
map('n', '<leader>hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' })
4848
map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' })
4949
map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' })
5050
map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' })
@@ -54,7 +54,7 @@ return {
5454
end, { desc = 'git [D]iff against last commit' })
5555
-- Toggles
5656
map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' })
57-
map('n', '<leader>tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' })
57+
map('n', '<leader>tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' })
5858
end,
5959
},
6060
},

0 commit comments

Comments
 (0)