diff options
Diffstat (limited to 'server/src/method/textDocument/completion.lua')
-rw-r--r-- | server/src/method/textDocument/completion.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/method/textDocument/completion.lua b/server/src/method/textDocument/completion.lua index 1e9030b8..b6dd55c4 100644 --- a/server/src/method/textDocument/completion.lua +++ b/server/src/method/textDocument/completion.lua @@ -33,12 +33,12 @@ local function findWord(position, text) local word = text for i = position-1, 1, -1 do local c = text:sub(i, i) - if not c:find '%w' then + if not c:find '[%w_]' then word = text:sub(i+1, position) break end end - return word:match('^(%w*)') + return word:match('^([%w_]*)') end return function (lsp, params) |