Compare commits
No commits in common. "327ef342151a8a9c51912bbfefa5c81fe61eb53f" and "82b58ca6b47e6dbf51ac3aa29433922532718976" have entirely different histories.
327ef34215
...
82b58ca6b4
@ -189,7 +189,7 @@ return {
|
|||||||
selection = selections[entry.source.name]
|
selection = selections[entry.source.name]
|
||||||
end
|
end
|
||||||
local completion_item = vim_item
|
local completion_item = vim_item
|
||||||
local abbr_max_width = 72
|
local abbr_max_width = 50
|
||||||
if not selection then
|
if not selection then
|
||||||
local kind = require("lspkind").cmp_format({
|
local kind = require("lspkind").cmp_format({
|
||||||
mode = "symbol_text",
|
mode = "symbol_text",
|
||||||
@ -270,12 +270,6 @@ return {
|
|||||||
completion_item.abbr = word
|
completion_item.abbr = word
|
||||||
end
|
end
|
||||||
|
|
||||||
--- If the completion item looks like a file path and exists, go ahead and
|
|
||||||
--- abbreviate it relative to the home directory
|
|
||||||
if vim.fn.isdirectory(completion_item.abbr) == 1 or vim.fn.filereadable(completion_item.abbr) == 1 then
|
|
||||||
completion_item.abbr = vim.fn.fnamemodify(completion_item.abbr, ":~")
|
|
||||||
end
|
|
||||||
|
|
||||||
if string.len(completion_item.abbr) >= abbr_max_width then
|
if string.len(completion_item.abbr) >= abbr_max_width then
|
||||||
local before = string.sub(completion_item.abbr, 1, math.floor((abbr_max_width - 3) / 2))
|
local before = string.sub(completion_item.abbr, 1, math.floor((abbr_max_width - 3) / 2))
|
||||||
completion_item.abbr = before .. "..."
|
completion_item.abbr = before .. "..."
|
||||||
@ -291,13 +285,6 @@ return {
|
|||||||
selection_order = "near_cursor",
|
selection_order = "near_cursor",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
matching = {
|
|
||||||
disallow_partial_fuzzy_matching = false,
|
|
||||||
disallow_fullfuzzy_matching = false,
|
|
||||||
disallow_partial_matching = false,
|
|
||||||
disallow_fuzzy_matching = false,
|
|
||||||
disallow_prefix_unmatching = false
|
|
||||||
},
|
|
||||||
window = {
|
window = {
|
||||||
documentation = {
|
documentation = {
|
||||||
side_padding = 0,
|
side_padding = 0,
|
||||||
@ -308,7 +295,7 @@ return {
|
|||||||
side_padding = 0,
|
side_padding = 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
experimental = { ghost_text = { hl_group = "CmpGhostText" } },
|
experimental = { ghost_text = { hl_group = "CmpGhostText" }, native_menu = false },
|
||||||
snippet = {
|
snippet = {
|
||||||
-- REQUIRED - you must specify a snippet engine
|
-- REQUIRED - you must specify a snippet engine
|
||||||
expand = function(args)
|
expand = function(args)
|
||||||
@ -426,6 +413,7 @@ return {
|
|||||||
cmp.setup.cmdline(":", {
|
cmp.setup.cmdline(":", {
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
mapping = cmp.mapping.preset.cmdline(),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
|
{ name = "async_path" },
|
||||||
{
|
{
|
||||||
name = "cmdline",
|
name = "cmdline",
|
||||||
option = {
|
option = {
|
||||||
@ -433,7 +421,6 @@ return {
|
|||||||
"!",
|
"!",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
priority = 100
|
|
||||||
},
|
},
|
||||||
{ name = "cmdline_history", max_item_count = 3 },
|
{ name = "cmdline_history", max_item_count = 3 },
|
||||||
{ name = "fuzzy_buffer", max_item_count = 3 },
|
{ name = "fuzzy_buffer", max_item_count = 3 },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user