Skip to content

Commit

Permalink
fix(compe): check next_char on
Browse files Browse the repository at this point in the history
  • Loading branch information
windwp committed Jun 27, 2021
1 parent 34ba10e commit c664290
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/nvim-autopairs/completion/compe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ local function_kind = nil
_G.MPairs.completion_done = function()
local line = utils.text_get_current_line(0)
local _, col = utils.get_cursor()
local prev_char = utils.text_cusor_line(line, col, 1, 1, false)
if prev_char ~= "(" then
local prev_char,next_char = utils.text_cusor_line(line, col, 1, 1, false)
if prev_char ~= "(" or next_char ~= "(" then
if method_kind == nil then
method_kind = require('vim.lsp.protocol').CompletionItemKind[2]
function_kind = require('vim.lsp.protocol').CompletionItemKind[3]
Expand Down

0 comments on commit c664290

Please sign in to comment.