Skip to content

Commit ab9c7c5

Browse files
committed
feat(plug)!: remove lazy.nvim and use built-in plugin manager v0.12
1 parent 08b635c commit ab9c7c5

13 files changed

Lines changed: 389 additions & 468 deletions

init.lua

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
-- ┏┓ ┓┏•
2-
-- ┃┃┓┏┏┏┓┃┃┓┏┳┓
2+
-- ┃┃┓┳┏┏┓┃┃┓┳┳┳
33
-- ┣┛┗┻┛┛┗┗┛┗┛┗┗
44
-- Neo(vim) the less is more
55
-- @pwnwriter/pwnvim
@@ -10,13 +10,15 @@ end
1010

1111
require("opts").initial()
1212

13-
local lazy_path = vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
13+
require("plugins.cpt")
14+
require("plugins.lazydev")
15+
require("plugins.mini")
16+
require("plugins.blink")
17+
require("plugins.snacks")
18+
require("plugins.misc")
1419

15-
if not vim.uv.fs_stat(lazy_path) then
16-
local lazy_url = "https://github.com/folke/lazy.nvim"
17-
vim.fn.system { "git", "clone", "--filter=blob:none", lazy_url, "--branch=stable", lazy_path }
18-
end
19-
20-
vim.opt.rtp:prepend(lazy_path)
21-
22-
require "lazy_spec"
20+
require("opts").final()
21+
require("mappings").general()
22+
require("mappings").misc()
23+
require("cmdline")
24+
require("lsp")

lazy-lock.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

lua/lazy_spec.lua

Lines changed: 0 additions & 46 deletions
This file was deleted.

lua/mappings.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ M.lsp = function()
135135

136136
-- Diagnostics mappings
137137
map("n", "dp", function()
138-
vim.diagnostic.jump( { count = 1, float = true})
138+
vim.diagnostic.jump({ count = 1, float = true })
139139
end, "Diagnostics goto_prev")
140140

141141
map("n", "dn", function()
142-
vim.diagnostic.jump( { count = -1, float = true})
142+
vim.diagnostic.jump({ count = -1, float = true })
143143
end, "Diagnostics goto_next")
144144

145145
map("n", "<leader>ds", vim.diagnostic.setloclist, "Add buffer diagnostics to the location list.")

lua/mini_nvim.lua

Lines changed: 0 additions & 171 deletions
This file was deleted.

lua/opts.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ vim.g.neovide_padding_left = 25
9090
--- Load shada after ui-enter
9191
local shada = vim.o.shada
9292
vim.o.shada = ""
93-
vim.api.nvim_create_autocmd("User", {
94-
pattern = "VeryLazy",
95-
callback = function()
93+
vim.api.nvim_create_autocmd("VimEnter", {
94+
once = true,
95+
callback = vim.schedule_wrap(function()
9696
vim.o.shada = shada
9797
pcall(vim.cmd.rshada, { bang = true })
98-
end,
98+
end),
9999
})
100100

101101
return opts

lua/plugins/blink.lua

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,38 @@
1-
return
2-
{
3-
"saghen/blink.cmp",
4-
version = '*',
5-
event = { "LspAttach" },
6-
dependencies = {
7-
"rafamadriz/friendly-snippets",
8-
},
9-
opts = {
10-
keymap = { preset = 'enter' },
11-
sources = {
12-
default = { "lazydev", "lsp", "path", "snippets", "buffer" },
13-
providers = {
14-
cmdline = {
15-
min_keyword_length = 2,
16-
},
17-
lazydev = {
18-
name = "LazyDev",
19-
module = "lazydev.integrations.blink",
20-
score_offset = 100,
21-
},
1+
vim.pack.add({
2+
{ src = "https://github.com/saghen/blink.cmp", version = "v1.10.1" },
3+
{ src = "https://github.com/rafamadriz/friendly-snippets" },
4+
})
5+
6+
local ok, blink = pcall(require, "blink.cmp")
7+
if not ok then return end
8+
9+
blink.setup({
10+
keymap = { preset = "enter" },
11+
sources = {
12+
default = { "lazydev", "lsp", "path", "snippets", "buffer" },
13+
providers = {
14+
cmdline = {
15+
min_keyword_length = 2,
16+
},
17+
lazydev = {
18+
name = "LazyDev",
19+
module = "lazydev.integrations.blink",
20+
score_offset = 100,
2221
},
2322
},
24-
completion = {
25-
menu = {
23+
},
24+
completion = {
25+
menu = {
26+
border = vim.g.border_style,
27+
scrolloff = 1,
28+
scrollbar = false,
29+
},
30+
documentation = {
31+
auto_show_delay_ms = 0,
32+
auto_show = true,
33+
window = {
2634
border = vim.g.border_style,
27-
scrolloff = 1,
28-
scrollbar = false,
29-
-- draw = {
30-
-- treesitter = { 'lsp' },
31-
-- }
32-
},
33-
documentation = {
34-
auto_show_delay_ms = 0,
35-
auto_show = true,
36-
window = {
37-
border = vim.g.border_style,
38-
},
3935
},
4036
},
4137
},
42-
}
38+
})

0 commit comments

Comments
 (0)