Skip to content

Commit c9e7a57

Browse files
dam9000Your Full Name
authored andcommitted
Move plugin examples from README to optional plugin files (nvim-lua#831)
* Move autopairs example from README to an optional plugin * Move neo-tree example from README to an optional plugin
1 parent afe1c17 commit c9e7a57

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,12 @@ the current plugin status. Hit `q` to close the window.
109109
#### Read The Friendly Documentation
110110

111111
Read through the `init.lua` file in your configuration folder for more
112-
information about extending and exploring Neovim. That also includes
112+
information about extending and exploring Neovim. That includes also
113113
examples of adding popularly requested plugins.
114114

115115
> [!NOTE]
116116
> For more information about a particular plugin check its repository's documentation.
117117
118-
119118
### Getting Started
120119

121120
[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o)

init.lua

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -973,9 +973,12 @@ require('lazy').setup({
973973
-- Here are some example plugins that I've included in the Kickstart repository.
974974
-- Uncomment any of the lines below to enable them (you will need to restart nvim).
975975
--
976-
require 'kickstart.plugins.debug',
977-
require 'kickstart.plugins.indent_line',
978-
require 'kickstart.plugins.lint',
976+
-- require 'kickstart.plugins.debug',
977+
-- require 'kickstart.plugins.indent_line',
978+
-- require 'kickstart.plugins.lint',
979+
-- require 'kickstart.plugins.autopairs:w
980+
981+
-- require 'kickstart.plugins.neo-tree',
979982

980983
-- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua`
981984
-- This is the easiest way to modularize your config.

lua/kickstart/plugins/autopairs.lua

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,13 @@
44
return {
55
'windwp/nvim-autopairs',
66
event = 'InsertEnter',
7-
opts = {},
7+
-- Optional dependency
8+
dependencies = { 'hrsh7th/nvim-cmp' },
9+
config = function()
10+
require('nvim-autopairs').setup {}
11+
-- If you want to automatically add `(` after selecting a function or method
12+
local cmp_autopairs = require 'nvim-autopairs.completion.cmp'
13+
local cmp = require 'cmp'
14+
cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done())
15+
end,
816
}

lua/kickstart/plugins/neo-tree.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ return {
99
'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended
1010
'MunifTanjim/nui.nvim',
1111
},
12-
lazy = false,
12+
cmd = 'Neotree',
1313
keys = {
14-
{ '\\', ':Neotree reveal<CR>', desc = 'NeoTree reveal', silent = true },
14+
{ '\\', ':Neotree reveal<CR>', { desc = 'NeoTree reveal' } },
1515
},
1616
opts = {
1717
filesystem = {

0 commit comments

Comments
 (0)