Update .config/nvim/init.lua
Update .config/nvim/lazy-lock.json Add .config/nvim/lua/plugin/20_completion.lua Add .config/nvim/snippets/global.json
This commit is contained in:
parent
e424803849
commit
9c23f65869
4 changed files with 53 additions and 1 deletions
|
|
@ -1,3 +1,20 @@
|
|||
-- init.lua
|
||||
--
|
||||
-- Config structure
|
||||
-- ├ init.lua Bootstraps config (you are here)
|
||||
-- ├ lua/
|
||||
-- ├── config/ Files sourced during startup are in here
|
||||
-- ├──── 00_lazy.lua Bootstraps lazy.nvim
|
||||
-- ├──── 10_opts.lua Built-in Nvim options
|
||||
-- ├──── 20_keymaps.lua Custom keymaps
|
||||
-- ├── plugin/ Plugins for lazy.nvim are in here
|
||||
-- ├──── 00_colorscheme.lua Sets theme
|
||||
-- ├──── 10_hop.lua Enables hopping to words in the current buffer
|
||||
-- ├──── 20_completion.lua Autocompletion with mini.completion, and mini.snippets
|
||||
-- ├ snippets/ Snippets definitions are in here
|
||||
-- ├── global.json Global text snippets
|
||||
|
||||
require("config.00_lazy")
|
||||
require("config.10_opts")
|
||||
require("config.20_keymaps")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"helix-nvim": { "branch": "main", "commit": "c2875fb19df7f3624d0ae1c82b063fc14de1d64b" },
|
||||
"hop.nvim": { "branch": "master", "commit": "08ddca799089ab96a6d1763db0b8adc5320bf050" },
|
||||
"lazy.nvim": { "branch": "main", "commit": "db067881fff0fd4be8c00e5bde7492e0e1c77a2f" },
|
||||
"mini.nvim": { "branch": "main", "commit": "e96ef335c7c68d2bc6359cdb7cf0941889df9be0" }
|
||||
"mini.completion": { "branch": "main", "commit": "2ab1c8078061a647b0867581a1dcedb046b9ce27" },
|
||||
"mini.snippets": { "branch": "main", "commit": "7610dc3aaf7fb09b9cc428273a8ba15ef8aef495" }
|
||||
}
|
||||
|
|
|
|||
16
private_dot_config/nvim/lua/plugin/20_completion.lua
Normal file
16
private_dot_config/nvim/lua/plugin/20_completion.lua
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
return {
|
||||
{ 'nvim-mini/mini.completion', version = false },
|
||||
{ 'rafamadriz/friendly-snippets' },
|
||||
{
|
||||
'nvim-mini/mini.snippets',
|
||||
opts = function()
|
||||
local gen_loader = require('mini.snippets').gen_loader
|
||||
return {
|
||||
snippets = {
|
||||
gen_loader.from_file(vim.fn.stdpath("config") .. "/snippets/global.json"),
|
||||
gen_loader.from_lang()
|
||||
}
|
||||
}
|
||||
end
|
||||
}
|
||||
}
|
||||
17
private_dot_config/nvim/snippets/global.json
Normal file
17
private_dot_config/nvim/snippets/global.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"Current datetime": {
|
||||
"prefix": "cdtm",
|
||||
"body": "$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE $CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
|
||||
"description": "Insert current datetime (YYYY-mm-dd HH:MM:SS)"
|
||||
},
|
||||
"Current date": {
|
||||
"prefix": "cdate",
|
||||
"body": "$CURRENT_YEAR-$CURRENT_MONTH-$CURRENT_DATE",
|
||||
"description": "Insert current date (YYYY-mm-dd)"
|
||||
},
|
||||
"Current time": {
|
||||
"prefix": "ctime",
|
||||
"body": "$CURRENT_HOUR:$CURRENT_MINUTE:$CURRENT_SECOND",
|
||||
"description": "Insert current time (HH:MM:SS)"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue