Merge branch 'master' of github.com:justin-prather/kickstart.nvim
This commit is contained in:
commit
73385e8b17
|
@ -8,19 +8,21 @@ assignees: ''
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- Any bug report not following this template will be immediately closed. Thanks -->
|
<!-- Any bug report not following this template will be immediately closed. Thanks -->
|
||||||
**Describe the bug**
|
|
||||||
A clear and concise description of what the bug is.
|
|
||||||
|
|
||||||
**To Reproduce**
|
## Describe the bug
|
||||||
Steps to reproduce the behavior:
|
<!-- A clear and concise description of what the bug is. -->
|
||||||
|
|
||||||
|
## To Reproduce
|
||||||
|
<!-- Steps to reproduce the behavior. -->
|
||||||
1. ...
|
1. ...
|
||||||
|
|
||||||
**Desktop (please complete the following information):**
|
## Desktop
|
||||||
|
<!-- please complete the following information. -->
|
||||||
- OS:
|
- OS:
|
||||||
- Terminal:
|
- Terminal:
|
||||||
|
|
||||||
** Neovim Version **
|
## Neovim Version
|
||||||
- Output of running `:version` from inside of neovim:
|
<!-- Output of running `:version` from inside of neovim. -->
|
||||||
|
|
||||||
```
|
```
|
||||||
```
|
```
|
||||||
|
|
37
README.md
37
README.md
|
@ -11,21 +11,38 @@ A starting point for Neovim that is:
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
Distribution Alternatives:
|
Distribution Alternatives:
|
||||||
- [LazyVim](https://www.lazyvim.org/): A delightful distribution maintained by @folke (the author of lazy.nvim, the package manager used here)
|
- [LazyVim](https://www.lazyvim.org/): A delightful distribution maintained by @folke (the author of lazy.nvim, the package manager used here)
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
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 (if any exists)
|
||||||
|
|
||||||
* Backup your previous configuration
|
### Archive Installation
|
||||||
* (Recommended) Fork this repo (so that you have your own copy that you can modify).
|
* On the home/landing page for the project find the blue "<> CODE" button click it and select Local > Download ZIP.
|
||||||
* Clone the kickstart repo into `$HOME/.config/nvim/` (Linux/Mac) or `~/AppData/Local/nvim/` (Windows)
|
* Extract the archive to:
|
||||||
* 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
|
`~/.config/nvim` (Linux)
|
||||||
* Start Neovim (`nvim`) and allow `lazy.nvim` to complete installation.
|
`~/.config/nvim` (MacOS)
|
||||||
* Restart Neovim
|
`%userprofile%\AppData\Local\nvim-data\` (Windows)
|
||||||
|
* 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.
|
||||||
|
|
||||||
|
### GIT Clone Installation
|
||||||
|
* From a terminal cd/dir to:
|
||||||
|
`~/.config/nvim` (Linux)
|
||||||
|
`~/.config/nvim` (MacOS)
|
||||||
|
`%userprofile%\AppData\Local\nvim-data\` (Windows)
|
||||||
|
|
||||||
|
* run: `git clone https://github.com/nvim-lua/kickstart.nvim.git ~/.config/nvim` OR: gh repo clone nvim-lua/kickstart.nvim
|
||||||
|
* Run neovim (from terminal or shortcut) and allow the kickstart process to download files and set up the basics.
|
||||||
|
* Once the setup is complete restart Neovim.
|
||||||
* **You're ready to go!**
|
* **You're ready to go!**
|
||||||
|
|
||||||
|
* (Recommended/Optional) 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 `%userprofile%\AppData\Local\nvim-data\` (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
|
||||||
|
|
||||||
Additional system requirements:
|
Additional system requirements:
|
||||||
- Make sure to review the readmes of the plugins if you are experiencing errors. In particular:
|
- Make sure to review the readmes of the plugins if you are experiencing errors. In particular:
|
||||||
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers.
|
- [ripgrep](https://github.com/BurntSushi/ripgrep#installation) is required for multiple [telescope](https://github.com/nvim-telescope/telescope.nvim#suggested-dependencies) pickers.
|
||||||
|
@ -81,7 +98,7 @@ return {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
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.
|
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.
|
||||||
|
|
||||||
#### Example: Adding a file to change default options
|
#### Example: Adding a file to change default options
|
||||||
|
|
||||||
|
@ -112,13 +129,13 @@ Each PR, especially those which increase the line count, should have a descripti
|
||||||
* 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?
|
* Are there any cool videos about this plugin?
|
||||||
* Current iteration of kickstart (coming soon)
|
* Current iteration of kickstart (coming soon)
|
||||||
* Here is one about the previous iteration of kickstart: [video introduction to Kickstart.nvim](https://youtu.be/stqUbv-5u2s).
|
* Here is one about the previous iteration of kickstart: [video introduction to Kickstart.nvim](https://youtu.be/stqUbv-5u2s). Note the install via init.lua no longer works as specified. Please follow the install instructions in this file instead as they're up to date.
|
||||||
|
|
||||||
### Windows Installation
|
### Windows Installation
|
||||||
|
|
||||||
Installation may require installing build tools, and updating the run command for `telescope-fzf-native`
|
Installation may require installing build tools, and updating the run command for `telescope-fzf-native`
|
||||||
|
|
||||||
See `telescope-fzf-native` documention for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
|
See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation)
|
||||||
|
|
||||||
This requires:
|
This requires:
|
||||||
|
|
||||||
|
|
12
init.lua
12
init.lua
|
@ -87,7 +87,7 @@ require('lazy').setup({
|
||||||
'neovim/nvim-lspconfig',
|
'neovim/nvim-lspconfig',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Automatically install LSPs to stdpath for neovim
|
-- Automatically install LSPs to stdpath for neovim
|
||||||
'williamboman/mason.nvim',
|
{ 'williamboman/mason.nvim', config = true },
|
||||||
'williamboman/mason-lspconfig.nvim',
|
'williamboman/mason-lspconfig.nvim',
|
||||||
|
|
||||||
-- Useful status updates for LSP
|
-- Useful status updates for LSP
|
||||||
|
@ -181,9 +181,7 @@ require('lazy').setup({
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'nvim-treesitter/nvim-treesitter-textobjects',
|
'nvim-treesitter/nvim-treesitter-textobjects',
|
||||||
},
|
},
|
||||||
config = function()
|
build = ":TSUpdate",
|
||||||
pcall(require('nvim-treesitter.install').update { with_sync = true })
|
|
||||||
end,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
-- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart
|
||||||
|
@ -292,6 +290,7 @@ vim.keymap.set('n', '<leader>/', function()
|
||||||
})
|
})
|
||||||
end, { desc = '[/] Fuzzily search in current buffer' })
|
end, { desc = '[/] Fuzzily search in current buffer' })
|
||||||
|
|
||||||
|
vim.keymap.set('n', '<leader>gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' })
|
||||||
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' })
|
vim.keymap.set('n', '<leader>sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' })
|
||||||
vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' })
|
vim.keymap.set('n', '<leader>sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' })
|
||||||
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
|
vim.keymap.set('n', '<leader>sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' })
|
||||||
|
@ -443,9 +442,6 @@ require('neodev').setup()
|
||||||
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
local capabilities = vim.lsp.protocol.make_client_capabilities()
|
||||||
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
|
||||||
|
|
||||||
-- Setup mason so it can manage external tooling
|
|
||||||
require('mason').setup()
|
|
||||||
|
|
||||||
-- Ensure the servers above are installed
|
-- Ensure the servers above are installed
|
||||||
local mason_lspconfig = require 'mason-lspconfig'
|
local mason_lspconfig = require 'mason-lspconfig'
|
||||||
|
|
||||||
|
@ -476,6 +472,8 @@ cmp.setup {
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert {
|
mapping = cmp.mapping.preset.insert {
|
||||||
|
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||||
|
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
['<C-Space>'] = cmp.mapping.complete {},
|
['<C-Space>'] = cmp.mapping.complete {},
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
return {
|
return {
|
||||||
-- NOTE: Yes, you can install new plugins here!
|
-- NOTE: Yes, you can install new plugins here!
|
||||||
'mfussenegger/nvim-dap',
|
'mfussenegger/nvim-dap',
|
||||||
|
|
||||||
-- NOTE: And you can specify dependencies as well
|
-- NOTE: And you can specify dependencies as well
|
||||||
dependencies = {
|
dependencies = {
|
||||||
-- Creates a beautiful debugger UI
|
-- Creates a beautiful debugger UI
|
||||||
|
@ -22,7 +21,6 @@ return {
|
||||||
-- Add your own debuggers here
|
-- Add your own debuggers here
|
||||||
'leoluz/nvim-dap-go',
|
'leoluz/nvim-dap-go',
|
||||||
},
|
},
|
||||||
|
|
||||||
config = function()
|
config = function()
|
||||||
local dap = require 'dap'
|
local dap = require 'dap'
|
||||||
local dapui = require 'dapui'
|
local dapui = require 'dapui'
|
||||||
|
@ -32,6 +30,10 @@ return {
|
||||||
-- reasonable debug configurations
|
-- reasonable debug configurations
|
||||||
automatic_setup = true,
|
automatic_setup = true,
|
||||||
|
|
||||||
|
-- You can provide additional configuration to the handlers,
|
||||||
|
-- see mason-nvim-dap README for more information
|
||||||
|
handlers = {},
|
||||||
|
|
||||||
-- You'll need to check that you have the required things installed
|
-- You'll need to check that you have the required things installed
|
||||||
-- online, please don't ask me how to install them :)
|
-- online, please don't ask me how to install them :)
|
||||||
ensure_installed = {
|
ensure_installed = {
|
||||||
|
@ -40,10 +42,6 @@ return {
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- You can provide additional configuration to the handlers,
|
|
||||||
-- see mason-nvim-dap README for more information
|
|
||||||
require('mason-nvim-dap').setup_handlers()
|
|
||||||
|
|
||||||
-- Basic debugging keymaps, feel free to change to your liking!
|
-- Basic debugging keymaps, feel free to change to your liking!
|
||||||
vim.keymap.set('n', '<F5>', dap.continue)
|
vim.keymap.set('n', '<F5>', dap.continue)
|
||||||
vim.keymap.set('n', '<F1>', dap.step_into)
|
vim.keymap.set('n', '<F1>', dap.step_into)
|
||||||
|
@ -71,10 +69,13 @@ return {
|
||||||
step_back = 'b',
|
step_back = 'b',
|
||||||
run_last = '▶▶',
|
run_last = '▶▶',
|
||||||
terminate = '⏹',
|
terminate = '⏹',
|
||||||
|
disconnect = "⏏",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
-- toggle to see last session result. Without this ,you can't see session output in case of unhandled exception.
|
||||||
|
vim.keymap.set("n", "<F7>", dapui.toggle)
|
||||||
|
|
||||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||||
|
|
Loading…
Reference in New Issue