Skip to content

Commit fbfd5c4

Browse files
author
liuguangtian.1024
committed
Merge branch 'main' into feat/migrate-to-mason-2.0
2 parents 5d39045 + f31a79f commit fbfd5c4

File tree

9 files changed

+80
-100
lines changed

9 files changed

+80
-100
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,14 @@ It's strongly recommended to read [Wiki: Prerequisites](https://github.com/ayami
136136
</h3>
137137

138138
<p align="center">
139-
<img src="https://raw.githubusercontent.com/ayamir/blog-imgs/main/startuptime.png"
139+
<img src="https://raw.githubusercontent.com/ayamir/nvimdots-imgs/main/startuptime.png"
140140
width = "80%"
141141
alt = "StartupTime"
142142
/>
143143
</p>
144144

145145
<p align="center">
146-
<img src="https://raw.githubusercontent.com/ayamir/blog-imgs/main/vimstartup.png"
146+
<img src="https://raw.githubusercontent.com/ayamir/nvimdots-imgs/main/vimstartup.png"
147147
width = "60%"
148148
alt = "Vim-StartupTime"
149149
/>
@@ -156,43 +156,43 @@ It's strongly recommended to read [Wiki: Prerequisites](https://github.com/ayami
156156
</h3>
157157

158158
<p align="center">
159-
<img src="https://raw.githubusercontent.com/ayamir/blog-imgs/main/dashboard.png" alt="Dashboard">
159+
<img src="https://raw.githubusercontent.com/ayamir/nvimdots-imgs/main/dashboard.png" alt="Dashboard">
160160
<em>Dashboard</em>
161161
</p>
162162
<br>
163163

164164
<p align="center">
165-
<img src="https://raw.githubusercontent.com/ayamir/blog-imgs/main/telescope.png" alt="Telescope">
165+
<img src="https://raw.githubusercontent.com/ayamir/nvimdots-imgs/main/telescope.png" alt="Telescope">
166166
<em>Telescope</em>
167167
</p>
168168
<br>
169169

170170
<p align="center">
171-
<img src="https://raw.githubusercontent.com/ayamir/blog-imgs/main/coding.png" alt="Coding">
172-
<em>Coding</em>
171+
<img src="https://raw.githubusercontent.com/ayamir/nvimdots-imgs/main/coding.png" alt="Coding">
172+
<em>Coding with LLM</em>
173173
</p>
174174
<br>
175175

176176
<p align="center">
177-
<img src="https://raw.githubusercontent.com/ayamir/blog-imgs/main/code_action.png" alt="Code Action">
177+
<img src="https://raw.githubusercontent.com/ayamir/nvimdots-imgs/main/code_action.png" alt="Code Action">
178178
<em>Code Action</em>
179179
</p>
180180
<br>
181181

182182
<p align="center">
183-
<img src="https://raw.githubusercontent.com/ayamir/blog-imgs/main/dap.png" alt="Debugging">
183+
<img src="https://raw.githubusercontent.com/ayamir/nvimdots-imgs/main/dap.png" alt="Debugging">
184184
<em>Debugging</em>
185185
</p>
186186
<br>
187187

188188
<p align="center">
189-
<img src="https://raw.githubusercontent.com/ayamir/blog-imgs/main/lazygit.png" alt="Lazygit">
189+
<img src="https://raw.githubusercontent.com/ayamir/nvimdots-imgs/main/lazygit.png" alt="Lazygit">
190190
<em>Lazygit with built-in Terminal</em>
191191
</p>
192192
<br>
193193

194194
<p align="center">
195-
<img src="https://raw.githubusercontent.com/ayamir/blog-imgs/main/command_ref.png" alt="Command quickref">
195+
<img src="https://raw.githubusercontent.com/ayamir/nvimdots-imgs/main/command_ref.png" alt="Command quickref">
196196
<em>Command quickref</em>
197197
</p>
198198

lazy-lock.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
3-
"LuaSnip": { "branch": "master", "commit": "3d5bced1b9ae69fa3f9b1942e28af5dbc537f946" },
3+
"LuaSnip": { "branch": "master", "commit": "de10d8414235b0a8cabfeba60d07c24304e71f5c" },
44
"advanced-git-search.nvim": { "branch": "main", "commit": "a9979109d9e8f28c72fb4bf1e14c80c3c94490ab" },
55
"alpha-nvim": { "branch": "main", "commit": "2b3cbcdd980cae1e022409289245053f62fb50f6" },
66
"autoclose.nvim": { "branch": "main", "commit": "3f86702b54a861a17d7994b2e32a7c648cb12fb1" },
@@ -15,20 +15,20 @@
1515
"cmp-under-comparator": { "branch": "master", "commit": "6857f10272c3cfe930cece2afa2406e1385bfef8" },
1616
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
1717
"codecompanion-history.nvim": { "branch": "main", "commit": "811b9af74c8fd4752a3422acf2379fba0639a96c" },
18-
"codecompanion.nvim": { "branch": "main", "commit": "3d4d85f03acc3a31ea2ec9bd34db5194ed7696ff" },
18+
"codecompanion.nvim": { "branch": "main", "commit": "311219d5045fe8096bd21e0a7396855aafe7d663" },
1919
"copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" },
20-
"copilot.lua": { "branch": "master", "commit": "f22d869b9544fce7b25fdc7dd2e3a9b760485154" },
21-
"crates.nvim": { "branch": "main", "commit": "c915ab5334a46178f64ce17ab606a79454bcd14f" },
20+
"copilot.lua": { "branch": "master", "commit": "0f2fd3829dd27d682e46c244cf48d9715726f612" },
21+
"crates.nvim": { "branch": "main", "commit": "fe66681d97a1eefddb5d7e48bd427b2cb0271881" },
2222
"csv.vim": { "branch": "master", "commit": "b8eb7f67babce96168e7f6b93b2ba8328b72a390" },
2323
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
24-
"dropbar.nvim": { "branch": "master", "commit": "80751f5e9db69b0cdf2a25d321f1e79745f9b324" },
24+
"dropbar.nvim": { "branch": "master", "commit": "418897fe7828b2749ca78056ec8d8ad43136b695" },
2525
"edgy.nvim": { "branch": "main", "commit": "7e8dedc39abebe40c289b8012cc89b11c69aa7a0" },
2626
"faster.nvim": { "branch": "main", "commit": "9fe4717d8c8c0a6aa306bd3b4f5fac5707eca334" },
2727
"flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" },
2828
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
29-
"fzf": { "branch": "master", "commit": "04c4269db3f8058d2afc301dfba49d497249eb5c" },
29+
"fzf": { "branch": "master", "commit": "e5cd7f0a3a73ef598267c1e9f29b0fe9a80925ab" },
3030
"fzy-lua-native": { "branch": "master", "commit": "9d720745d5c2fb563c0d86c17d77612a3519c506" },
31-
"gitsigns.nvim": { "branch": "main", "commit": "b01433169be710d6c69f7b4ee264d9670698b831" },
31+
"gitsigns.nvim": { "branch": "main", "commit": "8270378ab83540b03d09c0194ba3e208f9d0cb72" },
3232
"glance.nvim": { "branch": "master", "commit": "bf86d8b79dce808e65fdb6e9269d0b4ed6d2eefc" },
3333
"go.nvim": { "branch": "master", "commit": "28d9618bfe4385d3af60fed15a4c9f9445ae1f10" },
3434
"grug-far.nvim": { "branch": "main", "commit": "482517700eef8579b289a20995f017a0775a6ec4" },
@@ -41,42 +41,42 @@
4141
"lspsaga.nvim": { "branch": "main", "commit": "8efe00d6aed9db6449969f889170f1a7e43101a1" },
4242
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
4343
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
44-
"mason-lspconfig.nvim": { "branch": "main", "commit": "f2fa60409630ec2d24acf84494fb55e1d28d593c" },
44+
"mason-lspconfig.nvim": { "branch": "main", "commit": "844d247d998c2f9a6a3baad8bb9748edc55ce69f" },
4545
"mason-null-ls.nvim": { "branch": "main", "commit": "de19726de7260c68d94691afb057fa73d3cc53e7" },
4646
"mason-nvim-dap.nvim": { "branch": "main", "commit": "86389a3dd687cfaa647b6f44731e492970034baa" },
47-
"mason.nvim": { "branch": "main", "commit": "3671ab0d40aa5bd24b1686562bd0a23391ecf76a" },
47+
"mason.nvim": { "branch": "main", "commit": "9e25c98d4826998460926f8c5c2284848d80ae89" },
4848
"mini.align": { "branch": "main", "commit": "0202e1662a7a03a95cefd6851795ceae5e87b9b3" },
4949
"mini.cursorword": { "branch": "main", "commit": "52834085b4ad175a050343cd96c4517def711cc5" },
50-
"neoconf.nvim": { "branch": "main", "commit": "54097bc169c045f5fff6766b4600060fc9ef557a" },
50+
"neoconf.nvim": { "branch": "main", "commit": "b109d170e580f85d9d41f0145cbdb1aa7caaa6fe" },
5151
"neoscroll.nvim": { "branch": "master", "commit": "f957373912e88579e26fdaea4735450ff2ef5c9c" },
52-
"none-ls.nvim": { "branch": "main", "commit": "3ce66bc62eb363f19cceeb1fae2e71ea2bede56d" },
53-
"nvim-bqf": { "branch": "main", "commit": "dd17c73912487dccb372deff85d4262d2b89bc2b" },
52+
"none-ls.nvim": { "branch": "main", "commit": "46f2713c88a0b4e4bf134b59577659851ddd31cf" },
53+
"nvim-bqf": { "branch": "main", "commit": "17680cda3538913e88dd4c6456c837db9ace40ae" },
5454
"nvim-bufdel": { "branch": "main", "commit": "523d58e94e7212fff3e05c247b962dc8f93bcfde" },
5555
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
56-
"nvim-dap": { "branch": "master", "commit": "5dd4d50f2e6a2eaf9e57fad023d294ef371bda35" },
56+
"nvim-dap": { "branch": "master", "commit": "a479e25ed5b5d331fb46ee4b9e160ff02ac64310" },
5757
"nvim-dap-ui": { "branch": "master", "commit": "cf91d5e2d07c72903d052f5207511bf7ecdb7122" },
5858
"nvim-highlight-colors": { "branch": "main", "commit": "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093" },
59-
"nvim-lspconfig": { "branch": "master", "commit": "3db16ceeea947517f0dc1404c24dcb5ab0c91d26" },
59+
"nvim-lspconfig": { "branch": "master", "commit": "63a38440989c58e1f100373ab603fd24665bdc9a" },
6060
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
6161
"nvim-notify": { "branch": "master", "commit": "397c7c1184745fca649e5104de659e6392ef5a4d" },
6262
"nvim-scrollview": { "branch": "main", "commit": "8cc50e5e9af861c15778947677aba87cdded66cc" },
63-
"nvim-tree.lua": { "branch": "master", "commit": "65bae449224b8a3bc149471b96587b23b13a9946" },
63+
"nvim-tree.lua": { "branch": "master", "commit": "0a7fcdf3f8ba208f4260988a198c77ec11748339" },
6464
"nvim-treehopper": { "branch": "master", "commit": "e3861c0231631c6af317d6746bb78fdb428a58f3" },
6565
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
66-
"nvim-treesitter-context": { "branch": "master", "commit": "02fd97c803962108d129cf42e05adc5eff7f89c1" },
66+
"nvim-treesitter-context": { "branch": "master", "commit": "6853ecb2cd8b062365da1cdd1a2e6f934ad55ed6" },
6767
"nvim-treesitter-textobjects": { "branch": "master", "commit": "71385f191ec06ffc60e80e6b0c9a9d5daed4824c" },
6868
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
6969
"nvim-ts-context-commentstring": { "branch": "main", "commit": "1b212c2eee76d787bbea6aa5e92a2b534e7b4f8f" },
70-
"nvim-web-devicons": { "branch": "master", "commit": "4a8369f4c78ef6f6f895f0cec349e48f74330574" },
70+
"nvim-web-devicons": { "branch": "master", "commit": "3362099de3368aa620a8105b19ed04c2053e38c0" },
7171
"paint.nvim": { "branch": "main", "commit": "ef6f717a8669619ebbd098fb72f85115d64c6c92" },
7272
"persisted.nvim": { "branch": "main", "commit": "d35a3ed973e17defd8800acd46a0c893498a2671" },
7373
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
74-
"project.nvim": { "branch": "main", "commit": "63297b26c98db8302107800e5d304bb9220fd9dc" },
74+
"project.nvim": { "branch": "main", "commit": "4e8a71472de0c2a7fcdae5b8eb36ee6c3058f617" },
7575
"rainbow-delimiters.nvim": { "branch": "master", "commit": "97bf4b8ef9298644a29fcd9dd41a0210cf08cac7" },
76-
"render-markdown.nvim": { "branch": "main", "commit": "9e51b7711c6159511e966dc42fafd58a9db9ad1d" },
77-
"rustaceanvim": { "branch": "master", "commit": "66398662c07d265b226897500ed50eafba3dffb4" },
76+
"render-markdown.nvim": { "branch": "main", "commit": "eec00fbfd7273cdfa0a1154dbef0bb983641eaf8" },
77+
"rustaceanvim": { "branch": "master", "commit": "7f4b28a888340c7658e3f95a965cee67f29f9a23" },
7878
"search.nvim": { "branch": "main", "commit": "d2d177769b7816e49faba5131ee155ce65930313" },
79-
"smart-splits.nvim": { "branch": "master", "commit": "825073e87de5fae98b0c107917e15977d100323b" },
79+
"smart-splits.nvim": { "branch": "master", "commit": "f46b79cf9e83b0a13a4e3f83e3bd5b0d2f172bf2" },
8080
"smartyank.nvim": { "branch": "master", "commit": "c4e53e0d9316ca790a6f5d78aad73206a763873b" },
8181
"sniprun": { "branch": "master", "commit": "a90c65846c3c18efc3f799d8b6dc26af9d4a69ed" },
8282
"suda.vim": { "branch": "master", "commit": "9adda7d195222d4e2854efb2a88005a120296c47" },

lua/core/settings.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ settings["search_backend"] = "telescope"
110110
settings["lsp_inlayhints"] = false
111111

112112
-- LSPs to install during bootstrap.
113-
-- Full lsit: https://github.com/neovim/nvim-lspconfig/tree/master/lua/lspconfig/configs
113+
-- Full list: https://github.com/neovim/nvim-lspconfig/tree/master/lua/lspconfig/configs
114114
---@type string[]
115115
settings["lsp_deps"] = {
116116
"bashls",
@@ -247,16 +247,16 @@ settings["chat_api_key"] = "CODE_COMPANION_KEY"
247247
--- @type string[]
248248
settings["chat_models"] = {
249249
-- free models
250-
"mistralai/devstral-small:free", -- default
251-
"qwen/qwen-2.5-coder-32b-instruct:free",
250+
"moonshotai/kimi-k2:free", -- default
251+
"qwen/qwen3-coder:free",
252252
"deepseek/deepseek-chat-v3-0324:free",
253253
"deepseek/deepseek-r1:free",
254254
"google/gemma-3-27b-it:free",
255255
-- paid models
256256
"openai/codex-mini",
257257
"openai/gpt-4.1-mini",
258-
"google/gemini-2.0-flash-001",
259-
"google/gemini-2.5-flash-preview-05-20",
258+
"google/gemini-2.5-flash-lite",
259+
"google/gemini-2.5-flash",
260260
"anthropic/claude-3.7-sonnet",
261261
"anthropic/claude-sonnet-4",
262262
}

lua/modules/configs/completion/cmp.lua

Lines changed: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,38 +29,23 @@ return function()
2929
return (diff < 0)
3030
end
3131

32-
local use_copilot = require("core.settings").use_copilot
33-
local comparators = use_copilot == true
34-
and {
35-
require("copilot_cmp.comparators").prioritize,
36-
require("copilot_cmp.comparators").score,
37-
compare.offset, -- Items closer to cursor will have lower priority
38-
compare.exact,
39-
-- compare.scopes,
40-
compare.lsp_scores,
41-
compare.sort_text,
42-
compare.score,
43-
compare.recently_used,
44-
-- compare.locality, -- Items closer to cursor will have higher priority, conflicts with `offset`
45-
require("cmp-under-comparator").under,
46-
compare.kind,
47-
compare.length,
48-
compare.order,
49-
}
50-
or {
51-
compare.offset, -- Items closer to cursor will have lower priority
52-
compare.exact,
53-
-- compare.scopes,
54-
compare.lsp_scores,
55-
compare.sort_text,
56-
compare.score,
57-
compare.recently_used,
58-
-- compare.locality, -- Items closer to cursor will have higher priority, conflicts with `offset`
59-
require("cmp-under-comparator").under,
60-
compare.kind,
61-
compare.length,
62-
compare.order,
63-
}
32+
local comparators = vim.list_extend(require("core.settings").use_copilot and {
33+
require("copilot_cmp.comparators").prioritize,
34+
require("copilot_cmp.comparators").score,
35+
} or {}, {
36+
compare.offset, -- Items closer to cursor will have lower priority
37+
compare.exact,
38+
-- compare.scopes,
39+
compare.lsp_scores,
40+
compare.sort_text,
41+
compare.score,
42+
compare.recently_used,
43+
-- compare.locality, -- Items closer to cursor will have higher priority, conflicts with `offset`
44+
require("cmp-under-comparator").under,
45+
compare.kind,
46+
compare.length,
47+
compare.order,
48+
})
6449

6550
local cmp = require("cmp")
6651
require("modules.utils").load_plugin("cmp", {

lua/modules/configs/completion/lsp.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,12 @@ return function()
1919
end
2020

2121
pcall(require, "user.configs.lsp")
22+
23+
-- Start LSPs
24+
pcall(function()
25+
local matching_configs = nvim_lsp.util.get_config_by_ft(vim.bo.filetype)
26+
for _, config in ipairs(matching_configs) do
27+
config.launch()
28+
end
29+
end)
2230
end

lua/modules/configs/completion/mason-lspconfig.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ please REMOVE your LSP configuration (rust_analyzer.lua) from the `servers` dire
8484
{ title = "nvim-lspconfig" }
8585
)
8686
end
87+
return
8788
end
8889

8990
---A simplified mimic of <mason-lspconfig 1.x>'s `setup_handlers` callback.

lua/modules/configs/editor/persisted.lua

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,4 @@
11
return function()
2-
vim.api.nvim_create_autocmd("User", {
3-
pattern = "PersistedLoadPost",
4-
desc = "Fix LSP/Highlighting on auto session restore",
5-
callback = function()
6-
local bufname = vim.api.nvim_buf_get_name(0)
7-
if bufname and bufname ~= "" then
8-
vim.defer_fn(function()
9-
vim.cmd("edit")
10-
end, 1)
11-
end
12-
end,
13-
})
142
require("modules.utils").load_plugin("persisted", {
153
save_dir = vim.fn.expand(vim.fn.stdpath("data") .. "/sessions/"),
164
autostart = true,

lua/modules/plugins/completion.lua

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
local completion = {}
2-
local use_copilot = require("core.settings").use_copilot
32

43
completion["neovim/nvim-lspconfig"] = {
54
lazy = true,
6-
event = { "BufReadPre", "BufNewFile" },
5+
event = { "CursorHold", "CursorHoldI" },
76
config = require("completion.lsp"),
87
dependencies = {
98
{ "mason-org/mason.nvim" },
@@ -64,19 +63,18 @@ completion["hrsh7th/nvim-cmp"] = {
6463
{ "kdheepak/cmp-latex-symbols" },
6564
},
6665
}
67-
if use_copilot then
68-
completion["zbirenbaum/copilot.lua"] = {
69-
lazy = true,
70-
cmd = "Copilot",
71-
event = "InsertEnter",
72-
config = require("completion.copilot"),
73-
dependencies = {
74-
{
75-
"zbirenbaum/copilot-cmp",
76-
config = require("completion.copilot-cmp"),
77-
},
66+
completion["zbirenbaum/copilot.lua"] = {
67+
lazy = true,
68+
cond = require("core.settings").use_copilot,
69+
cmd = "Copilot",
70+
event = "InsertEnter",
71+
config = require("completion.copilot"),
72+
dependencies = {
73+
{
74+
"zbirenbaum/copilot-cmp",
75+
config = require("completion.copilot-cmp"),
7876
},
79-
}
80-
end
77+
},
78+
}
8179

8280
return completion

lua/modules/plugins/ui.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ ui["mrjones2014/smart-splits.nvim"] = {
5151
event = { "CursorHoldI", "CursorHold" },
5252
config = require("ui.splits"),
5353
}
54+
ui["folke/edgy.nvim"] = {
55+
lazy = true,
56+
event = { "CursorHold", "CursorHoldI" },
57+
config = require("ui.edgy"),
58+
}
5459
ui["folke/todo-comments.nvim"] = {
5560
lazy = true,
5661
event = { "CursorHold", "CursorHoldI" },
@@ -62,10 +67,5 @@ ui["dstein64/nvim-scrollview"] = {
6267
event = { "BufReadPost", "BufAdd", "BufNewFile" },
6368
config = require("ui.scrollview"),
6469
}
65-
ui["folke/edgy.nvim"] = {
66-
lazy = true,
67-
event = "VeryLazy",
68-
config = require("ui.edgy"),
69-
}
7070

7171
return ui

0 commit comments

Comments
 (0)