feat(nvim): Move to blink.cmp and lazy load language plugins
This commit is contained in:
parent
d42dd03832
commit
7f838e3e55
10 changed files with 50 additions and 59 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"LazyVim": { "branch": "main", "commit": "8fe3b5eec8cab66bef61a402ad3a788de1096425" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "f8c2a0f5d51b800ea4625808e243d9e8f7c5e1df" },
|
||||
"LazyVim": { "branch": "main", "commit": "447e260a62ffd50b0113c20db0e63108baf44b44" },
|
||||
"SchemaStore.nvim": { "branch": "main", "commit": "bb03860b59f17dfada46d6d9563c48b7b12fecaf" },
|
||||
"blink.cmp": { "branch": "main", "commit": "ae5a4ce8f7e519e49de7ae6fcadd74547f820a52" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "261a72b90d6db4ed8014f7bda976bcdc9dd7ce76" },
|
||||
"catppuccin": { "branch": "main", "commit": "faf15ab0201b564b6368ffa47b56feefc92ce3f4" },
|
||||
|
@ -9,7 +9,7 @@
|
|||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
|
||||
"fzf-lua": { "branch": "main", "commit": "8330321fa135f7fa9e4855099026c4ad622a0c85" },
|
||||
"fzf-lua": { "branch": "main", "commit": "dd1aa78c189cd4a2a8686710aa548276b1185671" },
|
||||
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
|
||||
"gleam.vim": { "branch": "master", "commit": "6739d8b656adb5d2807675b7652afb6e257b2b1c" },
|
||||
"grug-far.nvim": { "branch": "main", "commit": "11d0fbd6fff6f4e394af95319deeaab4ef88ce97" },
|
||||
|
@ -25,24 +25,23 @@
|
|||
"mini.hipatterns": { "branch": "main", "commit": "f34975103a38b3f608219a1324cdfc58ea660b8b" },
|
||||
"mini.icons": { "branch": "main", "commit": "44c0160526f7ae17ca8e8eab9ab235d047fcf7a6" },
|
||||
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
|
||||
"neogit": { "branch": "master", "commit": "cfea08ebb2fda22f1357e413d4ea45dcda6fcab5" },
|
||||
"neogit": { "branch": "master", "commit": "0820552997dd4dda4faa147228f0e61ea88290a3" },
|
||||
"noice.nvim": { "branch": "main", "commit": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f" },
|
||||
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
|
||||
"nvim-ansible": { "branch": "main", "commit": "44dabdaa8a9193b7f564a8408ed6d7107705030a" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "3403e2e9391ed0a28c3afddd8612701b647c8e26" },
|
||||
"nvim-lint": { "branch": "master", "commit": "6b46370d02cd001509a765591a3ffc481b538794" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "ae8a01bb40848490548e5d07b97ed972ed43c2f9" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "5cf3434c694a94fccfca79588654e57053a68572" },
|
||||
"nvim-lint": { "branch": "master", "commit": "1fea92f1d9908eaa5eb8bafe08b4293d7aadaa55" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "040001d85e9190a904d0e35ef5774633e14d8475" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "2405274937718d520a40e03df92030dca6b4f0fd" },
|
||||
"nvim-treesitter-context": { "branch": "master", "commit": "8fd989b6b457a448606b4a2e51f9161700f609a7" },
|
||||
"nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "1736cb81bdc42e1ee206081a161bdb2af68fb7a1" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "0eb18da56e2ba6ba24de7130a12bcc4e31ad11cb" },
|
||||
"oil.nvim": { "branch": "master", "commit": "dba037598843973b8c54bc5ce0318db4a0da439d" },
|
||||
"persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
|
||||
"render-markdown.nvim": { "branch": "main", "commit": "0022a579ac7355966be5ade77699b88c76b6a549" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "1575af595130ea0f3563f737221c8e36c664d7b4" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "d2b5680359ee8feb34b095fd574b4f9b3f013629" },
|
||||
"rustaceanvim": { "branch": "master", "commit": "0a618c1d1c05a8059880076feccb15301da6993d" },
|
||||
"snacks.nvim": { "branch": "main", "commit": "9563bb1ffc890abf35341561ea2362b9ac51da04" },
|
||||
"telescope.nvim": { "branch": "master", "commit": "2eca9ba22002184ac05eddbe47a7fe2d5a384dfc" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||
"tokyonight.nvim": { "branch": "main", "commit": "45d22cf0e1b93476d3b6d362d720412b3d34465c" },
|
||||
|
@ -52,6 +51,6 @@
|
|||
"venv-selector.nvim": { "branch": "regexp", "commit": "e82594274bf7b54387f9a2abe65f74909ac66e97" },
|
||||
"vim-alloy": { "branch": "main", "commit": "0273f88f7199189f9a0f32213a34ab778e226f86" },
|
||||
"vim-caddyfile": { "branch": "master", "commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0" },
|
||||
"vim-just": { "branch": "main", "commit": "433954d55c8702005bd07af27d8c2fdc9f9a6df9" },
|
||||
"vim-just": { "branch": "main", "commit": "ed67f198e981f555c0f9e9ed5b69b4b06543a9e1" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" }
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
return {
|
||||
"grafana/vim-alloy",
|
||||
ft = "alloy",
|
||||
}
|
||||
|
|
22
.config/nvim/lua/plugins/blink-cmp.lua
Normal file
22
.config/nvim/lua/plugins/blink-cmp.lua
Normal file
|
@ -0,0 +1,22 @@
|
|||
return {
|
||||
{
|
||||
"saghen/blink.cmp",
|
||||
dependencies = "rafamadriz/friendly-snippets",
|
||||
|
||||
version = "v0.*",
|
||||
|
||||
opts = {
|
||||
keymap = { preset = "default" },
|
||||
|
||||
appearance = {
|
||||
-- Sets the fallback highlight groups to nvim-cmp's highlight groups
|
||||
-- Useful for when your theme doesn't support blink.cmp
|
||||
-- will be removed in a future release
|
||||
use_nvim_cmp_as_default = true,
|
||||
nerd_font_variant = "mono",
|
||||
},
|
||||
|
||||
signature = { enabled = true },
|
||||
},
|
||||
},
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
return {
|
||||
"isobit/vim-caddyfile",
|
||||
ft = "caddyfile",
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
return {
|
||||
"gleam-lang/gleam.vim",
|
||||
ft = "gleam",
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
return {
|
||||
"HiPhish/jinja.vim",
|
||||
ft = "jinja",
|
||||
}
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
return {
|
||||
"nvim-cmp",
|
||||
opts = function()
|
||||
vim.api.nvim_set_hl(0, "CmpGhostText", { link = "Comment", default = true })
|
||||
local cmp = require("cmp")
|
||||
local defaults = require("cmp.config.default")()
|
||||
local auto_select = true
|
||||
return {
|
||||
auto_brackets = {}, -- configure any filetype to auto add brackets
|
||||
completion = {
|
||||
completeopt = "menu,menuone,noinsert" .. (auto_select and "" or ",noselect"),
|
||||
},
|
||||
preselect = auto_select and cmp.PreselectMode.Item or cmp.PreselectMode.None,
|
||||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-Space>"] = LazyVim.cmp.confirm({ select = true }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "path" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
formatting = {
|
||||
format = function(entry, item)
|
||||
local icons = LazyVim.config.icons.kinds
|
||||
if icons[item.kind] then
|
||||
item.kind = icons[item.kind] .. item.kind
|
||||
end
|
||||
|
||||
local widths = {
|
||||
abbr = vim.g.cmp_widths and vim.g.cmp_widths.abbr or 40,
|
||||
menu = vim.g.cmp_widths and vim.g.cmp_widths.menu or 30,
|
||||
}
|
||||
|
||||
for key, width in pairs(widths) do
|
||||
if item[key] and vim.fn.strdisplaywidth(item[key]) > width then
|
||||
item[key] = vim.fn.strcharpart(item[key], 0, width - 1) .. "…"
|
||||
end
|
||||
end
|
||||
|
||||
return item
|
||||
end,
|
||||
},
|
||||
sorting = defaults.sorting,
|
||||
}
|
||||
end,
|
||||
}
|
|
@ -1,6 +1,17 @@
|
|||
return {
|
||||
"neovim/nvim-lspconfig",
|
||||
dependencies = { "saghen/blink.cmp" },
|
||||
opts = {
|
||||
inlay_hints = { enabled = false },
|
||||
servers = {
|
||||
lua_ls = {},
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local lspconfig = require("lspconfig")
|
||||
for server, config in pairs(opts.servers) do
|
||||
config.capabilities = require("blink.cmp").get_lsp_capabilities(config.capabilities)
|
||||
lspconfig[server].setup(config)
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
return {
|
||||
"IndianBoy42/tree-sitter-just",
|
||||
name = "treesitter-just",
|
||||
ft = "just",
|
||||
}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
return {
|
||||
"NoahTheDuke/vim-just",
|
||||
name = "vim-just",
|
||||
ft = "just",
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue