Skip to content

Commit affa7b3

Browse files
authored
Merge pull request #3 from giladsher/patch-1
update to my config
2 parents 6f27eee + 5f4d847 commit affa7b3

File tree

9 files changed

+600
-245
lines changed

9 files changed

+600
-245
lines changed

.github/pull_request_template.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
***************************************************************************
2+
**NOTE**
3+
Please verify that the `base repository` above has the intended destination!
4+
Github by default opens Pull Requests against the parent of a forked repository.
5+
If this is your personal fork and you didn't intend to open a PR for contribution
6+
to the original project then adjust the `base repository` accordingly.
7+
**************************************************************************
8+

README.md

Lines changed: 116 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,52 @@ If you are experiencing issues, please make sure you have the latest versions.
2121

2222
### Install External Dependencies
2323

24-
> **NOTE**
25-
> [Backup](#FAQ) your previous configuration (if any exists)
26-
2724
External Requirements:
2825
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
2926
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
27+
- Clipboard tool (xclip/xsel/win32yank or other depending on platform)
28+
- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons
29+
- if you have it set `vim.g.have_nerd_font` in `init.lua` to true
3030
- Language Setup:
31-
- If want to write Typescript, you need `npm`
32-
- If want to write Golang, you will need `go`
31+
- If you want to write Typescript, you need `npm`
32+
- If you want to write Golang, you will need `go`
3333
- etc.
3434

3535
> **NOTE**
36-
> See [Windows Installation](#Windows-Installation) to double check any additional Windows notes
36+
> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes
37+
> and quick install snippets
38+
39+
### Install Kickstart
40+
41+
> **NOTE**
42+
> [Backup](#FAQ) your previous configuration (if any exists)
3743
3844
Neovim's configurations are located under the following paths, depending on your OS:
3945

4046
| OS | PATH |
4147
| :- | :--- |
4248
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
43-
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
44-
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
49+
| Windows (cmd)| `%localappdata%\nvim\` |
50+
| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` |
4551

46-
### Install Kickstart
52+
#### Recommended Step
4753

48-
Clone kickstart.nvim:
54+
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo
55+
so that you have your own copy that you can modify, then install by cloning the
56+
fork to your machine using one of the commands below, depending on your OS.
57+
58+
> **NOTE**
59+
> Your fork's url will be something like this:
60+
> `https://github.com/<your_github_username>/kickstart.nvim.git`
61+
62+
You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file
63+
too - it's ignored in the kickstart repo to make maintenance easier, but it's
64+
[recommmended to track it in version control](https://lazy.folke.io/usage/lockfile).
65+
66+
#### Clone kickstart.nvim
67+
> **NOTE**
68+
> If following the recommended step above (i.e., forking the repo), replace
69+
> `nvim-lua` with `<your_github_username>` in the commands below
4970
5071
<details><summary> Linux and Mac </summary>
5172

@@ -60,13 +81,13 @@ git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HO
6081
If you're using `cmd.exe`:
6182

6283
```
63-
git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\
84+
git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim"
6485
```
6586

6687
If you're using `powershell.exe`
6788

6889
```
69-
git clone https://github.com/nvim-lua/kickstart.nvim.git $env:USERPROFILE\AppData\Local\nvim\
90+
git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim"
7091
```
7192

7293
</details>
@@ -80,124 +101,70 @@ nvim
80101
```
81102

82103
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
83-
current plugin status.
104+
current plugin status. Hit `q` to close the window.
84105

85106
Read through the `init.lua` file in your configuration folder for more
86-
information about extending and exploring Neovim.
87-
88-
### Getting Started
89-
90-
See [Effective Neovim: Instant IDE](https://youtu.be/stqUbv-5u2s), covering the
91-
previous version. Note: The install via init.lua is outdated, please follow the
92-
install instructions in this file instead. An updated video is coming soon.
93-
94-
### Recommended Steps
95-
96-
[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo
97-
(so that you have your own copy that you can modify) and then installing you
98-
can install to your machine using the methods above.
99-
100-
> **NOTE**
101-
> Your fork's url will be something like this: `https://github.com/<your_github_username>/kickstart.nvim.git`
102-
103-
#### Examples of adding popularly requested plugins
104-
105-
NOTE: You'll need to uncomment the line in the init.lua that turns on loading custom plugins.
106-
107-
<details>
108-
<summary>Adding autopairs</summary>
109-
110-
This will automatically install [windwp/nvim-autopairs](https://github.com/windwp/nvim-autopairs) and enable it on startup. For more information, see documentation for [lazy.nvim](https://github.com/folke/lazy.nvim).
111-
112-
In the file: `lua/custom/plugins/autopairs.lua`, add:
113-
114-
```lua
115-
-- File: lua/custom/plugins/autopairs.lua
116-
117-
return {
118-
"windwp/nvim-autopairs",
119-
-- Optional dependency
120-
dependencies = { 'hrsh7th/nvim-cmp' },
121-
config = function()
122-
require("nvim-autopairs").setup {}
123-
-- If you want to automatically add `(` after selecting a function or method
124-
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
125-
local cmp = require('cmp')
126-
cmp.event:on(
127-
'confirm_done',
128-
cmp_autopairs.on_confirm_done()
129-
)
130-
end,
131-
}
132-
```
133-
134-
</details>
135-
<details>
136-
<summary>Adding a file tree plugin</summary>
137-
138-
This will install the tree plugin and add the command `:Neotree` for you. You can explore the documentation at [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim) for more information.
107+
information about extending and exploring Neovim. That also includes
108+
examples of adding popularly requested plugins.
139109

140-
In the file: `lua/custom/plugins/filetree.lua`, add:
141110

142-
```lua
143-
-- Unless you are still migrating, remove the deprecated commands from v1.x
144-
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
145-
146-
return {
147-
"nvim-neo-tree/neo-tree.nvim",
148-
version = "*",
149-
dependencies = {
150-
"nvim-lua/plenary.nvim",
151-
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
152-
"MunifTanjim/nui.nvim",
153-
},
154-
config = function ()
155-
require('neo-tree').setup {}
156-
end,
157-
}
158-
```
111+
### Getting Started
159112

160-
</details>
113+
[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
161114

162115
### FAQ
163116

164117
* What should I do if I already have a pre-existing neovim configuration?
165-
* You should back it up, then delete all files associated with it.
166-
* This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/`
118+
* You should back it up and then delete all associated files.
119+
* This includes your existing init.lua and the neovim files in `~/.local`
120+
which can be deleted with `rm -rf ~/.local/share/nvim/`
167121
* Can I keep my existing configuration in parallel to kickstart?
168-
* Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` to maintain multiple configurations. For example you can install the kickstart configuration in `~/.config/nvim-kickstart` and create an alias:
122+
* Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME`
123+
to maintain multiple configurations. For example, you can install the kickstart
124+
configuration in `~/.config/nvim-kickstart` and create an alias:
169125
```
170126
alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim'
171127
```
172-
When you run Neovim using `nvim-kickstart` alias it will use the alternative config directory and the matching local directory `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim distribution that you would like to try out.
128+
When you run Neovim using `nvim-kickstart` alias it will use the alternative
129+
config directory and the matching local directory
130+
`~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim
131+
distribution that you would like to try out.
173132
* What if I want to "uninstall" this configuration:
174133
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
175134
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
176135
* The main purpose of kickstart is to serve as a teaching tool and a reference
177-
configuration that someone can easily `git clone` as a basis for their own.
136+
configuration that someone can easily use to `git clone` as a basis for their own.
178137
As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
179-
into smaller parts. A fork of kickstart that does this while maintaining the exact
138+
into smaller parts. A fork of kickstart that does this while maintaining the
180139
same functionality is available here:
181140
* [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim)
182141
* Discussions on this topic can be found here:
183142
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
184143
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
185144
186-
### Windows Installation
145+
### Install Recipes
187146
188-
Installation may require installing build tools, and updating the run command for `telescope-fzf-native`
147+
Below you can find OS specific install instructions for Neovim and dependencies.
148+
149+
After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step.
150+
151+
#### Windows Installation
152+
153+
<details><summary>Windows with Microsoft C++ Build Tools and CMake</summary>
154+
Installation may require installing build tools and updating the run command for `telescope-fzf-native`
189155
190156
See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
191157
192158
This requires:
193159
194-
- Install CMake, and the Microsoft C++ Build Tools on Windows
160+
- Install CMake and the Microsoft C++ Build Tools on Windows
195161
196162
```lua
197163
{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' }
198164
```
199-
200-
Alternatively one can install gcc and make which don't require changing the config,
165+
</details>
166+
<details><summary>Windows with gcc/make using chocolatey</summary>
167+
Alternatively, one can install gcc and make which don't require changing the config,
201168
the easiest way is to use choco:
202169

203170
1. install [chocolatey](https://chocolatey.org/install)
@@ -208,9 +175,61 @@ winget install --accept-source-agreements chocolatey.chocolatey
208175
```
209176

210177
2. install all requirements using choco, exit previous cmd and
211-
open a new one so that choco path is set, run in cmd as **admin**:
178+
open a new one so that choco path is set, and run in cmd as **admin**:
212179
```
213180
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
214181
```
182+
</details>
183+
<details><summary>WSL (Windows Subsystem for Linux)</summary>
184+
185+
```
186+
wsl --install
187+
wsl
188+
sudo add-apt-repository ppa:neovim-ppa/unstable -y
189+
sudo apt update
190+
sudo apt install make gcc ripgrep unzip git xclip neovim
191+
```
192+
</details>
193+
194+
#### Linux Install
195+
<details><summary>Ubuntu Install Steps</summary>
196+
197+
```
198+
sudo add-apt-repository ppa:neovim-ppa/unstable -y
199+
sudo apt update
200+
sudo apt install make gcc ripgrep unzip git xclip neovim
201+
```
202+
</details>
203+
<details><summary>Debian Install Steps</summary>
204+
205+
```
206+
sudo apt update
207+
sudo apt install make gcc ripgrep unzip git xclip curl
208+
209+
# Now we install nvim
210+
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
211+
sudo rm -rf /opt/nvim-linux64
212+
sudo mkdir -p /opt/nvim-linux64
213+
sudo chmod a+rX /opt/nvim-linux64
214+
sudo tar -C /opt -xzf nvim-linux64.tar.gz
215+
216+
# make it available in /usr/local/bin, distro installs to /usr/bin
217+
sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/
218+
```
219+
</details>
220+
<details><summary>Fedora Install Steps</summary>
221+
222+
```
223+
sudo dnf install -y gcc make git ripgrep fd-find unzip neovim
224+
```
225+
</details>
226+
227+
<details><summary>Arch Install Steps</summary>
228+
229+
```
230+
sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim
231+
```
232+
</details>
215233

234+
=======
216235
Then continue with the [Install Kickstart](#Install-Kickstart) step.

0 commit comments

Comments
 (0)