mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 11:24:55 +02:00
nvim update
This commit is contained in:
parent
8a39a1b88a
commit
5286b45f9d
4 changed files with 41 additions and 126 deletions
|
|
@ -88,42 +88,8 @@ return {
|
|||
config = function(_, opts)
|
||||
local cmp = require('cmp')
|
||||
|
||||
-- local has_words_before = function()
|
||||
-- local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
-- return col ~= 0 and vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, col):match("%s") == nil
|
||||
-- end
|
||||
|
||||
-- local moveDown = cmp.mapping(function(fallback)
|
||||
-- if cmp.visible() then
|
||||
-- cmp.select_next_item()
|
||||
-- elseif has_words_before() then
|
||||
-- cmp.complete()
|
||||
-- else
|
||||
-- fallback()
|
||||
-- end
|
||||
-- end, { "i", "s" })
|
||||
--
|
||||
-- local moveUp = cmp.mapping(function(fallback)
|
||||
-- if cmp.visible() then
|
||||
-- cmp.select_prev_item()
|
||||
-- else
|
||||
-- fallback()
|
||||
-- end
|
||||
-- end, { "i", "s" })
|
||||
|
||||
cmp.setup(opts)
|
||||
|
||||
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, {
|
||||
focusable = true,
|
||||
style = "minimal",
|
||||
border = "single",
|
||||
})
|
||||
|
||||
-- insert () on function completion using autopairs
|
||||
cmp.event:on(
|
||||
'confirm_done',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue