mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-26 13:21:45 +00:00
Compare commits
2 Commits
4673abea85
...
24d1fe2e59
Author | SHA1 | Date | |
---|---|---|---|
24d1fe2e59 | |||
0d927e25ae |
122
README.md
122
README.md
@ -1,40 +1,69 @@
|
||||
# nvim-config
|
||||
|
||||
## Introduction
|
||||
|
||||
This project is a fork of [dam9000/kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim.git)
|
||||
*This is a fork of [dam9000/kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim) that represents my personal configuration of Neovim.*
|
||||
|
||||
## Installation
|
||||
|
||||
### Installation (Windows Only)
|
||||
### Install Neovim
|
||||
|
||||
Kickstart.nvim targets *only* the latest
|
||||
['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest
|
||||
['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim.
|
||||
If you are experiencing issues, please make sure you have the latest versions.
|
||||
|
||||
### Install External Dependencies
|
||||
|
||||
> **NOTE**
|
||||
> [Backup](#FAQ) your previous configuration (if any exists)
|
||||
|
||||
Neovim's configurations are located under the following path:
|
||||
|
||||
| Shell | PATH |
|
||||
| :- | :--- |
|
||||
| cmd | `%userprofile%\AppData\Local\nvim\` |
|
||||
| powershell | `$env:USERPROFILE\AppData\Local\nvim\` |
|
||||
|
||||
- Download and install:
|
||||
External Requirements:
|
||||
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
|
||||
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation)
|
||||
- [MinGW](https://www.mingw-w64.org/)
|
||||
- Language Setup:
|
||||
- If want to write Typescript, you need `npm`
|
||||
- If want to write Golang, you will need `go`
|
||||
- etc.
|
||||
|
||||
> **NOTE**
|
||||
> In this case, using [chocolatey](https://chocolatey.org/) is quick and easy
|
||||
- [CMake](https://cmake.org/)
|
||||
> **NOTE**
|
||||
> Make sure to select 'add to PATH' during installation
|
||||
- [MSBuild-Tools](https://github.com/bycloudai/InstallVSBuildToolsWindows)
|
||||
- Clone this repository:
|
||||
- on Windows (cmd)
|
||||
> See [Windows Installation](#Windows-Installation) to double check any additional Windows notes
|
||||
|
||||
Neovim's configurations are located under the following paths, depending on your OS:
|
||||
|
||||
| OS | PATH |
|
||||
| :- | :--- |
|
||||
| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` |
|
||||
| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` |
|
||||
| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` |
|
||||
|
||||
### Install this Configuration
|
||||
|
||||
Clone it from GitHub:
|
||||
|
||||
<details><summary> Linux and Mac </summary>
|
||||
|
||||
```sh
|
||||
git clone https://github.com/dam9000/kickstart-modular.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary> Windows </summary>
|
||||
|
||||
If you're using `cmd.exe`:
|
||||
|
||||
```bat
|
||||
git clone https://github.com/Baipyrus/nvim-config.git %userprofile%\AppData\Local\nvim\
|
||||
```
|
||||
|
||||
- on Windows (powershell)
|
||||
```
|
||||
If you're using `powershell.exe`
|
||||
|
||||
```pwsh
|
||||
git clone https://github.com/Baipyrus/nvim-config.git $env:USERPROFILE\AppData\Local\nvim\
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
### Post Installation
|
||||
|
||||
@ -44,32 +73,43 @@ Start Neovim
|
||||
nvim
|
||||
```
|
||||
|
||||
The `Lazy` plugin manager will start automatically on the first run and install the configured plugins. After the installation is complete you can press `q` to close the `Lazy` UI and **you are ready to go**! Next time you run nvim `Lazy` will no longer show up.
|
||||
|
||||
If you would prefer to hide this step and run the plugin sync from the command line, you can use:
|
||||
|
||||
```sh
|
||||
nvim --headless "+Lazy! sync" +qa
|
||||
```
|
||||
|
||||
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
|
||||
current plugin status.
|
||||
|
||||
### FAQ
|
||||
|
||||
* What should I do if I already have a pre-existing neovim configuration?
|
||||
* You should back it up, then delete all files associated with it.
|
||||
* This includes your existing init.lua and the neovim files in `%userprofile%\AppData\Local\nvim-data\` (CMD) or `$env:USERPROFILE\AppData\Local\nvim-data\` (Powershell) which should be deleted afterwards.
|
||||
* You may also want to look at the [migration guide for lazy.nvim](https://github.com/folke/lazy.nvim#-migration-guide)
|
||||
* This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/` or their windows counterparts in `AppData\Local\nvim-data`
|
||||
* Can I keep my existing configuration in parallel to kickstart?
|
||||
* 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:
|
||||
```sh
|
||||
alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim'
|
||||
```
|
||||
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 could also run your configuration inline, for example in Windows Powershell:
|
||||
```pwsh
|
||||
$env:NVIM_APPNAME = 'nvim-kickstart'; nvim
|
||||
```
|
||||
* What if I want to "uninstall" this configuration:
|
||||
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
|
||||
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
|
||||
* The main purpose of kickstart is to serve as a teaching tool and a reference
|
||||
configuration that someone can easily `git clone` as a basis for their own.
|
||||
As you progress in learning Neovim and Lua, you might consider splitting `init.lua`
|
||||
into smaller parts. *This is the fork of the original project that splits the configuration into smaller parts.*
|
||||
The original repo that maintains the exact
|
||||
same functionality in a single `init.lua` file is available here:
|
||||
* [kickstart.nvim](https://github.com/dam9000/kickstart-modular.nvim)
|
||||
* Discussions on this topic can be found here:
|
||||
* [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218)
|
||||
* [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473)
|
||||
|
||||
### Windows Installation
|
||||
|
||||
Installation requires gcc and make, for which you don't need to change the config,
|
||||
the easiest way is to use choco:
|
||||
|
||||
1. install [chocolatey](https://chocolatey.org/install)
|
||||
either follow the instructions on the page or use winget,
|
||||
run in cmd as **admin**:
|
||||
```
|
||||
winget install --accept-source-agreements chocolatey.chocolatey
|
||||
```
|
||||
|
||||
2. install all requirements using choco, exit previous cmd and
|
||||
open a new one so that choco path is set, run in cmd as **admin**:
|
||||
```
|
||||
choco install -y neovim git ripgrep wget fd unzip gzip mingw make
|
||||
```
|
||||
|
||||
Then continue with the [Install Kickstart](#Install-this-Configuration) step.
|
||||
|
@ -21,7 +21,7 @@ end
|
||||
|
||||
local check_external_reqs = function()
|
||||
-- Basic utils: `git`, `make`, `unzip`
|
||||
for _, exe in ipairs { 'git', 'cmake', 'rg' } do
|
||||
for _, exe in ipairs { 'git', 'make', 'unzip', 'rg' } do
|
||||
local is_executable = vim.fn.executable(exe) == 1
|
||||
if is_executable then
|
||||
vim.health.ok(string.format("Found executable: '%s'", exe))
|
||||
|
@ -10,10 +10,10 @@ return {
|
||||
-- Build Step is needed for regex support in snippets
|
||||
-- This step is not supported in many windows environments
|
||||
-- Remove the below condition to re-enable on windows
|
||||
if vim.fn.has 'win32' == 1 or vim.fn.executable 'cmake' == 0 then
|
||||
if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then
|
||||
return
|
||||
end
|
||||
return 'cmake install_jsregexp'
|
||||
return 'make install_jsregexp'
|
||||
end)(),
|
||||
},
|
||||
'saadparwaiz1/cmp_luasnip',
|
||||
|
@ -17,12 +17,12 @@ return {
|
||||
|
||||
-- `build` is used to run some command when the plugin is installed/updated.
|
||||
-- This is only run then, not every time Neovim starts up.
|
||||
build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release; cmake --build build --config Release; cmake --install build --prefix build',
|
||||
build = 'make',
|
||||
|
||||
-- `cond` is a condition used to determine whether this plugin should be
|
||||
-- installed and loaded.
|
||||
cond = function()
|
||||
return vim.fn.executable 'cmake' == 1
|
||||
return vim.fn.executable 'make' == 1
|
||||
end,
|
||||
},
|
||||
{ 'nvim-telescope/telescope-ui-select.nvim' },
|
||||
|
Loading…
Reference in New Issue
Block a user