Skip to content

Commit 9c387b2

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 0e16ab6 + 4b31f8e commit 9c387b2

File tree

2 files changed

+55
-33
lines changed

2 files changed

+55
-33
lines changed

README.md

Lines changed: 39 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,35 +20,45 @@ Distribution Alternatives:
2020

2121
### Installation
2222

23-
* Backup your previous configuration (if any exists)
24-
25-
### Archive Installation
26-
* On the home/landing page for the project find the blue "<> CODE" button click it and select Local > Download ZIP.
27-
* Extract the archive to:
28-
`~/.config/nvim` (Linux)
29-
`~/.config/nvim` (MacOS)
30-
`%userprofile%\AppData\Local\nvim\` (Windows)
31-
* Ensure your extraction method did not extract with a parent folder. For example in ~/.config/nvim you should have init.lua not another folder called kickstart.nvim.
32-
33-
### Git Clone Installation
34-
* From a terminal cd/dir to:
35-
`~/.config/nvim` (Linux)
36-
`~/.config/nvim` (MacOS)
37-
`%userprofile%\AppData\Local\nvim\` (Windows)
38-
39-
* run: `git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim` OR: `gh repo clone nvim-lua/kickstart.nvim`
40-
* Run Neovim (from terminal or shortcut) and allow lazy.nvim to download files and set up the basics.
41-
* Once the setup is complete, restart Neovim.
42-
* **You're ready to go!**
43-
44-
* (Recommended/Optional) Fork this repo (so that you have your own copy that you can modify).
45-
* Clone the kickstart repo into `$HOME/.config/nvim/` (Linux/Mac) or `%userprofile%\AppData\Local\nvim\` (Windows)
46-
* If you don't want to include it as a git repo, you can just clone it and then move the files to this location
47-
48-
Additional system requirements:
49-
- Make sure to review the readmes of the plugins if you are experiencing errors. In particular:
50-
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers.
51-
- See [Windows Installation](#Windows-Installation) if you have trouble with `telescope-fzf-native`
23+
> **NOTE**
24+
> [Backup](#FAQ) your previous configuration (if any exists)
25+
26+
Requirements:
27+
* Make sure to review the readmes of the plugins if you are experiencing errors. In particular:
28+
* [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers.
29+
* See [Windows Installation](#Windows-Installation) if you have trouble with `telescope-fzf-native`
30+
31+
Neovim's configurations are located under the following paths, depending on your OS:
32+
33+
| OS | PATH |
34+
| :- | :--- |
35+
| Linux | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
36+
| MacOS | `$XDG_CONFIG_HOME/nvim`, '~/.config/nvim` |
37+
| Windows | `%userprofile%\AppData\Local\nvim\` |
38+
39+
Clone kickstart.nvim:
40+
41+
```sh
42+
# on Linux and Mac
43+
git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
44+
# on Windows
45+
git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\
46+
```
47+
48+
### Post Installation
49+
50+
Run the following command and then **you are ready to go**!
51+
52+
```sh
53+
nvim --headless "+Lazy! sync" +qa
54+
```
55+
56+
### Recommended Steps
57+
58+
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo (so that you have your own copy that you can modify) and then installing you can install to your machine using the methods above.
59+
60+
> **NOTE**
61+
> Your fork's url will be something like this: `https://github.com/<your_github_username>/kickstart.nvim.git`
5262
5363
### Configuration And Extension
5464

init.lua

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,20 @@ require('lazy').setup({
8585
changedelete = { text = '~' },
8686
},
8787
on_attach = function(bufnr)
88-
vim.keymap.set('n', '<leader>gp', require('gitsigns').prev_hunk, { buffer = bufnr, desc = '[G]o to [P]revious Hunk' })
89-
vim.keymap.set('n', '<leader>gn', require('gitsigns').next_hunk, { buffer = bufnr, desc = '[G]o to [N]ext Hunk' })
90-
vim.keymap.set('n', '<leader>ph', require('gitsigns').preview_hunk, { buffer = bufnr, desc = '[P]review [H]unk' })
88+
vim.keymap.set('n', '<leader>hp', require('gitsigns').preview_hunk, { buffer = bufnr, desc = 'Preview git hunk' })
89+
90+
-- don't override the built-in and fugitive keymaps
91+
local gs = package.loaded.gitsigns
92+
vim.keymap.set({'n', 'v'}, ']c', function()
93+
if vim.wo.diff then return ']c' end
94+
vim.schedule(function() gs.next_hunk() end)
95+
return '<Ignore>'
96+
end, {expr=true, buffer = bufnr, desc = "Jump to next hunk"})
97+
vim.keymap.set({'n', 'v'}, '[c', function()
98+
if vim.wo.diff then return '[c' end
99+
vim.schedule(function() gs.prev_hunk() end)
100+
return '<Ignore>'
101+
end, {expr=true, buffer = bufnr, desc = "Jump to previous hunk"})
91102
end,
92103
},
93104
},
@@ -279,6 +290,7 @@ vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc
279290
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
280291
vim.keymap.set('n', '<leader>sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' })
281292
vim.keymap.set('n', '<leader>sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' })
293+
vim.keymap.set('n', '<leader>sr', require('telescope.builtin').resume, { desc = '[S]earch [R]resume' })
282294

283295
-- [[ Configure Treesitter ]]
284296
-- See `:help nvim-treesitter`
@@ -387,7 +399,7 @@ local on_attach = function(_, bufnr)
387399

388400
nmap('gd', vim.lsp.buf.definition, '[G]oto [D]efinition')
389401
nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences')
390-
nmap('gI', vim.lsp.buf.implementation, '[G]oto [I]mplementation')
402+
nmap('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation')
391403
nmap('<leader>D', vim.lsp.buf.type_definition, 'Type [D]efinition')
392404
nmap('<leader>ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols')
393405
nmap('<leader>ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols')

0 commit comments

Comments
 (0)