This commit is contained in:
2026-06-30 15:54:23 +02:00
parent 5eb695beaa
commit 75222a5f85
8 changed files with 126 additions and 92 deletions
+12 -18
View File
@@ -134,23 +134,17 @@ cmp.setup {
["<C-f>"] = cmp.mapping.scroll_docs(4),
["<C-Space>"] = cmp.mapping.complete(),
["<C-e>"] = cmp.mapping.close(),
["<CR>"] = cmp.mapping {
i = function(fallback)
if cmp.visible() and cmp.get_active_entry() then
cmp.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = false,
}
else
fallback()
end
end,
s = cmp.mapping.confirm { select = true },
c = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
},
["<CR>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.confirm { select = true }
else
fallback()
end
end, { "i", "s" }),
-- ["<CR>"] = cmp.mapping.confirm {
-- behavior = cmp.ConfirmBehavior.Insert,
-- select = true,
-- },
["<Tab>"] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
@@ -251,7 +245,7 @@ lspconfig("texlab", {
})
lspconfig("qmlls", {
cmd = { "qmlls6" },
cmd = { "qmlls6", "-E" },
filetypes = { "qml" },
single_file_support = true,
root_dir = function(bufnr, on_dir)