55 lines
1.7 KiB
Lua
55 lines
1.7 KiB
Lua
return {
|
|
{
|
|
"folke/lazydev.nvim",
|
|
ft = "lua", -- only load on lua files
|
|
opts = {
|
|
library = {
|
|
-- See the configuration section for more details
|
|
-- Load luvit types when the `vim.uv` word is found
|
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
|
},
|
|
},
|
|
},
|
|
{ -- optional blink completion source for require statements and module annotations
|
|
"saghen/blink.cmp",
|
|
--version = "1.*",
|
|
build = "cargo build --release",
|
|
---@module 'blink.cmp'
|
|
---@type blink.cmp.Config
|
|
opts = {
|
|
sources = {
|
|
-- add lazydev to your completion providers
|
|
default = { "lazydev", "lsp", "path", "snippets", "buffer" },
|
|
providers = {
|
|
lazydev = {
|
|
name = "LazyDev",
|
|
module = "lazydev.integrations.blink",
|
|
-- make lazydev completions top priority (see `:h blink.cmp`)
|
|
score_offset = 100,
|
|
},
|
|
},
|
|
},
|
|
-- 'default' (recommended) for mappings similar to built-in completions (C-y to accept)
|
|
-- 'super-tab' for mappings similar to vscode (tab to accept)
|
|
-- 'enter' for enter to accept
|
|
-- 'none' for no mappings
|
|
--
|
|
-- All presets have the following mappings:
|
|
-- C-space: Open menu or open docs if already open
|
|
-- C-n/C-p or Up/Down: Select next/previous item
|
|
-- C-e: Hide menu
|
|
-- C-k: Toggle signature help (if signature.enabled = true)
|
|
--
|
|
-- See :h blink-cmp-config-keymap for defining your own keymap
|
|
keymap = { preset = "super-tab" },
|
|
appearance = { nerd_font_variant = "mono" },
|
|
completion = {
|
|
documentation = { auto_show = false },
|
|
list = { selection = { preselect = false, auto_insert = true } },
|
|
},
|
|
fuzzy = { implementation = "prefer_rust_with_warning" },
|
|
ghost_text = { enabled = true },
|
|
},
|
|
opts_extend = { "sources.default" },
|
|
},
|
|
}
|