Skip to content

Commit 9707a6d

Browse files
committed
Fix omni complete on dot
Make sure omni complete is triggered when pressing dot when cursor is at the last column after a string.
1 parent 470f2f2 commit 9707a6d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/vim_liq.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function! LspIsComment()
205205
" If we are at end of line in insert mode we are out of 'scope'
206206
" If we are on the first col we are not
207207
if m_col >= end_col && m_col > 1
208-
let m_col = m_col - 1
208+
let m_col = end_col - 1
209209
endif
210210
let highlight = synIDattr(synIDtrans(synID(line("."), m_col, 0)), "name")
211211
let syntaxtype = join(map(synstack(line('.'), m_col), 'synIDattr(v:val, "name")'))
@@ -238,7 +238,7 @@ function! LspOmniOpened(noselect)
238238
endfunction
239239

240240
function! RegisterKeyMap()
241-
inoremap <expr> <buffer> . "." . LspOmni(1)
241+
inoremap <silent> <buffer> . .<C-R>=LspOmni(1)<CR>
242242
imap <buffer> <Nul> <C-Space>
243243
" smap <buffer> <Nul> <C-Space>
244244
inoremap <silent> <buffer> <C-Space> <C-R>=LspOmni(0)<CR>

0 commit comments

Comments
 (0)