The recommended step of forking the repo coming sequentially after the step instructing users to clone the current repo doesn't make sense.
This commit orders the install instructions in a manner that's more logical.
Provide a method to disable autoformat on save lsp fallback for
specified filetypes. By default disable for C/C++ as an example,
because it does not have a well standardized coding style.
Based on conform recipe:
https://github.com/stevearc/conform.nvim/blob/master/doc/recipes.md
Tree-sitter indenting for ruby is pretty terrible.
But the fix requires a few steps, so showed those
and documented how you could do that for other languages
as well (with the tricky part being the
additional_vim_regex_highlighting trick)
Fixesnvim-lua/kickstart.nvim#692
`neodev` configures Lua LSP for your Neovim config, runtime and plugins
used for completion, annotations and signatures of Neovim apis
With neodev, there's no more need to manually set lua_ls workspace
settings which don't seem to work properly anyway as currently nvim
api completion does not work.
We've removed over 1/3 of the code that was in kickstart previously,
and more than doubled the amount of comments explaining every line
of code (to the best of my ability).
kickstart now properly uses many of the lazy.nvim config and loading
idioms, which should be really helpful for people moving both to
modular configs, as well as extending the kickstart config in one file.
Additional features:
- Beautiful ascii art
- Added some documentation that explains what is an LSP, what is telescope, etc
- There is now a `:checkhealth` for kickstart, which checks some basic information
and adds useful information for maintainers (for people cloning the repo).
- Improved LSP configuration and tool installation, for easier first time startup
- Changed init.lua ordering, so that it moves from simple options to complicated config
```
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
Lua 1 108 404 298
-------------------------------------------------------------------------------
```
Only run the github stylua workflow check on the official
kickstart repo (nvim-lua/kickstart.nvim) so that it's not
enforced on any other forks.
As suggested by: @zwergius
Changing this second "Introduction" heading to "Getting Started"
The recent change in README which moved the youtube link from FAQ
to it's own section used the heading "Introduction" which is already
the first heading in the file.
This commit introduces three additional fields - `sync_install`, `ignore_install`, and `modules` - to the Treesitter configuration. This update is aimed at resolving warnings that were previously displayed, potentially causing confusion or frustration for new users of Neovim. By explicitly defining these fields, the configuration aligns better with the latest `nvim-treesitter` requirements.
Addressing issue nvim-lua/kickstart.nvim#570
This improves the github workflow to no longer require manual
approval for PRs from first time contributors.
Changes the github event from pull_request to pull_request_target
and adds an explicit PR head checkout
To help new users get started, how about moving the video link ("Effective Neovim: Instant IDE ") right after "Post Installation"?
This way new users, can install it, and right away proceed to learn how to use it.
GitHub Action used:
https://github.com/marketplace/actions/stylua
This runs `stylua --check` on a PR and it will show
success or failure. The suggested stylua changes can
be inspected when clicking on the details.
The PR can still be merged even if the check fails.
Added information on where to install if you use Powershell in windows. Since CMD and Powershell work differently.
`%userprofile%` only works for the CMD application.
`$env:USERPROFILE` works in Powershell.
Change the recommendation to just run nvim normally instead of the headless
mode for the first run. This will show Lazy UI updating the plugins which
would match what the video show and may be easier to understand what is going
on thant the silent headless run.
This parser is actually needed for some *JSX* parsing, and since
typescript and tsx are already getting installed, it makes sense to
also install the javascript parser.
Originally, the keymaps for jumping to next and previous git hunks were
]c and [c. This was changed in #323 (83b65a1) because they overwrote the
built-in vimdiff keymaps.
However, the more traditional solution is to have ]c and [c *extend* the
built-in keymap. This is what fugitive and gitgutter have been doing for
years.
Gitsigns doesn't do this by itself, but it has a recommended keymap
configuration on which the present patch is based:
https://github.com/lewis6991/gitsigns.nvim#keymaps
The only thing I've added is to have the keymaps work in visual mode as
well, which is the same behavior as the built in vimdiff keymaps.
Add descriptions for debugging key bindings.
Improve formatting by changing double quotes to single quotes in order
to keep compatibility with the rest of the kickstart.nvim project.
My browser should not be caching yet github seems to fight some changes. I'm also still unable to see why the formatting (line height) differs between the Archive Install section and the Git Clone Install section.
Hopefully this will at least save the correct changes to the Win stuff.
Tested on a win10VM for location and such because I remembered %appdata% should be a thing but it's the wrong location and the win MSI creates nvim-data rather than just nvim. Then I noticed my previous changes weren't all saved...so here I go again heh.
I fear adding bits like "Your paths may differ, these are just for reference." but the core behind the kickstart is getting "noobs" past big hurdles fast. This however means things need to be super spoon fed or basic things like not understanding relative paths and such might end up right where things started...ambiguous to some user instructions because they don't understand they need to know certain things because this is supposed to help them bypass knowing that for now...and the snake eats its tail. :)
* Single-file (with examples of moving to multi-file)
* Single-file
* Documented
* Completely Documented
* Modular
This repo is meant to be used as by **YOU** to begin your Neovim journey; remove the things you don't use and add what you miss.
**NOT** a Neovim distribution, but instead a starting point for your configuration.
Distribution Alternatives:
## Installation
- [LazyVim](https://www.lazyvim.org/): A delightful distribution maintained by @folke (the author of lazy.nvim, the package manager used here)
### Installation
### 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.
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.
* Backup your previous configuration
### Install External Dependencies
* (Recommended) Fork this repo (so that you have your own copy that you can modify).
* Clone the kickstart repo into `$HOME/.config/nvim/` (Linux/Mac) or `~/AppData/Local/nvim/` (Windows)
* 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
* Start Neovim (`nvim`) and allow `lazy.nvim` to complete installation.
* Restart Neovim
* **You're ready to go!**
Additional system requirements:
> **NOTE**
- Make sure to review the readmes of the plugins if you are experiencing errors. In particular:
> [Backup](#FAQ) your previous configuration (if any exists)
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers.
- See as well [Windows Installation](#Windows-Installation)
### Configuration And Extension
External Requirements:
- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`)
That's it! Lazy will install all the plugins you have. Use `:Lazy` to view
current plugin status.
Read through the `init.lua` file in your configuration folder for more
information about extending and exploring Neovim.
#### Examples of adding popularly requested plugins
NOTE: You'll need to uncomment the line in the init.lua that turns on loading custom plugins.
<details>
<summary>Adding autopairs</summary>
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).
In the file: `lua/custom/plugins/autopairs.lua`, add:
In the file: `lua/custom/plugins/autopairs.lua`, add:
@ -50,20 +122,34 @@ In the file: `lua/custom/plugins/autopairs.lua`, add:
return {
return {
"windwp/nvim-autopairs",
"windwp/nvim-autopairs",
-- Optional dependency
dependencies = { 'hrsh7th/nvim-cmp' },
config = function()
config = function()
require("nvim-autopairs").setup {}
require("nvim-autopairs").setup {}
-- If you want to automatically add `(` after selecting a function or method
local cmp_autopairs = require('nvim-autopairs.completion.cmp')
local cmp = require('cmp')
cmp.event:on(
'confirm_done',
cmp_autopairs.on_confirm_done()
)
end,
end,
}
}
```
```
</details>
<details>
<summary>Adding a file tree plugin</summary>
This will automatically install `nvim-autopairs` and enable it on startup. For more information, see documentation for [lazy.nvim](https://github.com/folke/lazy.nvim).
This will install the tree plugin and add the command `:Neotree` for you.
In the file: `lua/custom/plugins/filetree.lua`, add:
In the file: `lua/custom/plugins/filetree.lua`, add:
```lua
```lua
-- File: lua/custom/plugins/filetree.lua
return {
return {
"nvim-neo-tree/neo-tree.nvim",
"nvim-neo-tree/neo-tree.nvim",
version = "*",
version = "*",
@ -73,58 +159,119 @@ return {
"MunifTanjim/nui.nvim",
"MunifTanjim/nui.nvim",
},
},
config = function ()
config = function ()
-- Unless you are still migrating, remove the deprecated commands from v1.x
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
require('neo-tree').setup {}
require('neo-tree').setup {}
end,
end,
}
}
```
```
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.
</details>
#### Example: Adding a file to change default options
### Getting Started
To change default options, you can add a file in the `/after/plugin/` folder (see `:help load-plugins`) to include your own options, keymaps, autogroups, and more. The following is an example `defaults.lua` file (located at `$HOME/.config/nvim/after/plugin/defaults.lua`).
[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)
Pull-requests are welcome. The goal of this repo is not to create a Neovim configuration framework, but to offer a starting template that shows, by example, available features in Neovim. Some things that will not be included:
* Custom language server configuration (null-ls templates)
* Theming beyond a default colorscheme necessary for LSP highlight groups
Each PR, especially those which increase the line count, should have a description as to why the PR is necessary.
### FAQ
### FAQ
* What should I do if I already have a pre-existing neovim configuration?
* 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.
* You should back it up and then delete all associated files.
* This includes your existing init.lua and the neovim files in `~/.local` which can be deleted with `rm -rf ~/.local/share/nvim/`
* This includes your existing init.lua and the neovim files in `~/.local`
* You may also want to look at the [migration guide for lazy.nvim](https://github.com/folke/lazy.nvim#-migration-guide)
which can be deleted with `rm -rf ~/.local/share/nvim/`
* 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:
```
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 can apply this approach to any Neovim
distribution that you would like to try out.
* What if I want to "uninstall" this configuration:
* What if I want to "uninstall" this configuration:
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
* See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information
* Are there any cool videos about this plugin?
* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files?
* Current iteration of kickstart (coming soon)
* The main purpose of kickstart is to serve as a teaching tool and a reference
* Here is one about the previous iteration of kickstart: [video introduction to Kickstart.nvim](https://youtu.be/stqUbv-5u2s).
configuration that someone can easily use to `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. A fork of kickstart that does this while maintaining the
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.