Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit 7ebf6e0

Browse files
committed
fix: respect luacheck
1 parent 14f75be commit 7ebf6e0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lua/completion/util.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ end
1818
local function get_completion_word(item)
1919
if item.insertText ~= nil and item.insertText ~= vim.NIL then
2020
return item.insertText
21-
elseif item.textEdit ~= nil and item.textEdit ~= vim.NIL and item.textEdit.newText ~= nil and item.insertTextFormat ~= 2 then
21+
elseif item.textEdit ~= nil and item.textEdit ~= vim.NIL
22+
and item.textEdit.newText ~= nil and item.insertTextFormat ~= 2 then
2223
return item.textEdit.newText
2324
end
2425
return item.label

lua/source/path.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ M.triggerFunction = function()
6161
local line = api.nvim_get_current_line()
6262
local line_to_cursor = line:sub(1, pos[2])
6363
local keyword
64-
if vim.v.completed_item ~= nil and vim.v.completed_item.kind == 'Path' and line_to_cursor:find(vim.v.completed_item.word) then
64+
if vim.v.completed_item ~= nil and vim.v.completed_item.kind == 'Path' and
65+
line_to_cursor:find(vim.v.completed_item.word) then
6566
keyword = M.keyword..vim.v.completed_item.word..'/'
6667
else
6768
M.keyword = nil

0 commit comments

Comments
 (0)