update
This commit is contained in:
parent
d5d1054096
commit
3cec0c208b
|
@ -243,9 +243,10 @@ let g:mta_filetypes = {
|
||||||
let g:netrw_preview = 0
|
let g:netrw_preview = 0
|
||||||
let g:netrw_winsize = 50
|
let g:netrw_winsize = 50
|
||||||
let g:netrw_altv = &spr
|
let g:netrw_altv = &spr
|
||||||
let g:netrw_alto = 1
|
let g:netrw_alto = 0
|
||||||
let g:netrw_altfile = 1
|
let g:netrw_altfile = 1
|
||||||
let g:netrw_mousemaps = 0
|
let g:netrw_mousemaps = 0
|
||||||
|
let g:netrw_keepdir = 0
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
" #Obsession{{{
|
" #Obsession{{{
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
local cmp = require 'cmp'
|
local cmp = require 'cmp'
|
||||||
cmp.setup({
|
cmp.setup({
|
||||||
|
window = {documentation = cmp.config.window.bordered({border = "single"})},
|
||||||
formatting = {
|
formatting = {
|
||||||
format = function(entry, vim_item)
|
format = function(entry, vim_item)
|
||||||
-- set a name for each source
|
-- set a name for each source
|
||||||
|
@ -7,21 +8,17 @@ cmp.setup({
|
||||||
nvim_lsp = "[LSP]",
|
nvim_lsp = "[LSP]",
|
||||||
path = "[Path]",
|
path = "[Path]",
|
||||||
buffer = "[Buffer]",
|
buffer = "[Buffer]",
|
||||||
ultisnips = "[UltiSnips]",
|
ultisnips = "[UltiSnips]"
|
||||||
})[entry.source.name]
|
})[entry.source.name]
|
||||||
return vim_item
|
return vim_item
|
||||||
end,
|
end
|
||||||
},
|
},
|
||||||
completion = {
|
completion = {
|
||||||
keyword_length = 1,
|
keyword_length = 1,
|
||||||
max_item_count = 20,
|
max_item_count = 20
|
||||||
-- autocomplete = false
|
-- autocomplete = false
|
||||||
},
|
},
|
||||||
snippet = {
|
snippet = {expand = function(args) vim.fn["UltiSnips#Anon"](args.body) end},
|
||||||
expand = function(args)
|
|
||||||
vim.fn["UltiSnips#Anon"](args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
mapping = {
|
mapping = {
|
||||||
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
['<C-d>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-u>'] = cmp.mapping.scroll_docs(4),
|
['<C-u>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
@ -32,25 +29,13 @@ cmp.setup({
|
||||||
else
|
else
|
||||||
cmp.complete()
|
cmp.complete()
|
||||||
end
|
end
|
||||||
end,
|
end
|
||||||
}),
|
})
|
||||||
},
|
},
|
||||||
sources = {
|
sources = {
|
||||||
{
|
{name = 'nvim_lsp', max_item_count = 8, keyword_length = 3},
|
||||||
name = 'nvim_lsp',
|
|
||||||
max_item_count = 8,
|
|
||||||
keyword_length = 3,
|
|
||||||
},
|
|
||||||
{name = 'path'},
|
{name = 'path'},
|
||||||
{
|
{name = 'buffer', keyword_length = 4, max_item_count = 20},
|
||||||
name = 'buffer',
|
{name = 'ultisnips', priority_weight = 10, keyword_length = 1}
|
||||||
keyword_length = 4,
|
|
||||||
max_item_count = 20,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name = 'ultisnips',
|
|
||||||
priority_weight = 10,
|
|
||||||
keyword_length = 1,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -8,6 +8,7 @@ vim.diagnostic.config({
|
||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
severity_sort = true,
|
severity_sort = true,
|
||||||
float = {
|
float = {
|
||||||
|
border = "single",
|
||||||
source = "always" -- Or "if_many"
|
source = "always" -- Or "if_many"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -24,6 +25,11 @@ local border = {
|
||||||
{"└", "FloatBorder"}, {"│", "FloatBorder"}
|
{"└", "FloatBorder"}, {"│", "FloatBorder"}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vim.lsp.handlers["textDocument/hover"] =
|
||||||
|
vim.lsp.with(vim.lsp.handlers.hover, {border = "single"})
|
||||||
|
vim.lsp.handlers["textDocument/signatureHelp"] =
|
||||||
|
vim.lsp.with(vim.lsp.handlers.signature_help, {border = "single"})
|
||||||
|
|
||||||
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
|
local orig_util_open_floating_preview = vim.lsp.util.open_floating_preview
|
||||||
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
|
function vim.lsp.util.open_floating_preview(contents, syntax, opts, ...)
|
||||||
opts = opts or {}
|
opts = opts or {}
|
||||||
|
|
Loading…
Reference in New Issue