mirror of
https://github.com/tjdevries/advent-of-nvim.git
synced 2025-12-10 03:11:15 +00:00
day 4
This commit is contained in:
43
04 - Package Manager/Package Manager.md
Normal file
43
04 - Package Manager/Package Manager.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# Package Manager
|
||||
|
||||
## Package Manager
|
||||
|
||||
Going to use `lazy.nvim`
|
||||
- https://lazy.folke.io/installation
|
||||
|
||||
NOTE: which is different from LazyVim
|
||||
|
||||
## Install
|
||||
|
||||
(follow instructions)
|
||||
|
||||
`:checkhealth lazy`
|
||||
|
||||
## Install a colorscheme
|
||||
|
||||
- Tokyo Night Color Scheme
|
||||
- https://github.com/folke/tokyonight.nvim
|
||||
|
||||
```lua
|
||||
{ "folke/tokyonight.nvim", config = function() vim.cmd.colorscheme "tokyonight" end }
|
||||
```
|
||||
|
||||
## Install `mini`
|
||||
|
||||
- Mini.nvim
|
||||
- https://github.com/echasnovski/mini.nvim
|
||||
|
||||
- Setup statusline
|
||||
|
||||
```lua
|
||||
-- lua/custom/plugins/mini.lua
|
||||
return {
|
||||
{
|
||||
'echasnovski/mini.nvim',
|
||||
config = function()
|
||||
local statusline = require 'mini.statusline'
|
||||
statusline.setup { use_icons = true }
|
||||
end
|
||||
}
|
||||
}
|
||||
```
|
||||
18
04 - Package Manager/init.lua
Normal file
18
04 - Package Manager/init.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
print("advent of neovim")
|
||||
print("advent of neovim")
|
||||
|
||||
|
||||
vim.keymap.set("n", "<space><space>x", "<cmd>source %<CR>")
|
||||
vim.keymap.set("n", "<space>x", ":.lua<CR>")
|
||||
vim.keymap.set("v", "<space>x", ":lua<CR>")
|
||||
|
||||
-- Highlight when yanking (copying) text
|
||||
-- Try it with `yap` in normal mode
|
||||
-- See `:help vim.highlight.on_yank()`
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight when yanking (copying) text',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
@@ -3,10 +3,10 @@
|
||||
25 Mini Lessons to get started with Neovim.
|
||||
- We'll build a working configuration that resembles kickstart.nvim, but we'll do it completely from scratch.
|
||||
|
||||
- Install Neovim and Open (with some reasons why)
|
||||
- Tutor / Modal Editing
|
||||
- Lua Configuration (Options / Keymaps)
|
||||
- Plugin Manager
|
||||
- [x] Install Neovim and Open (with some reasons why)
|
||||
- [x] Tutor / Modal Editing
|
||||
- [x] Lua Configuration (Options / Keymaps)
|
||||
- [x] Plugin Manager
|
||||
- `tree-sitter`, Colorschemes, and `statusline`
|
||||
- LSP (Keymaps and Settings)
|
||||
- LSP Installation / Management
|
||||
|
||||
18
init.lua
Normal file
18
init.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
print("advent of neovim")
|
||||
|
||||
require("config.lazy")
|
||||
|
||||
vim.keymap.set("n", "<space><space>x", "<cmd>source %<CR>")
|
||||
vim.keymap.set("n", "<space>x", ":.lua<CR>")
|
||||
vim.keymap.set("v", "<space>x", ":lua<CR>")
|
||||
|
||||
-- Highlight when yanking (copying) text
|
||||
-- Try it with `yap` in normal mode
|
||||
-- See `:help vim.highlight.on_yank()`
|
||||
vim.api.nvim_create_autocmd('TextYankPost', {
|
||||
desc = 'Highlight when yanking (copying) text',
|
||||
group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }),
|
||||
callback = function()
|
||||
vim.highlight.on_yank()
|
||||
end,
|
||||
})
|
||||
Reference in New Issue
Block a user