completion-nvim
completion-nvim copied to clipboard
path complete in string not work properly without a leading space
- Please read through this section before posting a bug report.
My testing minimal init.vim
call plug#begin(stdpath('data') . '/plugged')
Plug 'neovim/nvim-lsp'
Plug 'nvim-lua/completion-nvim'
call plug#end()
lua << EOF
require('nvim_lsp').gopls.setup {
on_attach = require('completion').on_attach,
}
EOF
let g:completion_enable_auto_popup = 1
let g:completion_trigger_on_delete = 1
let g:completion_auto_change_source = 1
let g:completion_matching_ignore_case = 1
let g:completion_matching_strategy_list = ['exact', 'fuzzy', 'substring']
let g:completion_sorting = 'none'
let g:completion_chain_complete_list = {
\ 'default': {
\ 'default': [
\ {'complete_items': ['lsp', 'snippet']},
\ {'mode': '<c-n>'},
\ ],
\ 'string': [
\ {'complete_items': ['path']},
\ ],
\ 'comment': [
\ {'complete_items': ['path']},
\ ],
\ },
\ }
let g:completion_confirm_key = ''
imap <expr> <CR> pumvisible() ?
\ complete_info()["selected"] != "-1" ? "\<Plug>(completion_confirm_completion)" : "\<c-e>\<CR>" :
\ "\<CR>"
function! <SID>check_back_space() abort
let l:col = col('.') - 1
return !l:col || getline('.')[l:col - 1] =~# '\s'
endfunction
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ completion#trigger_completion()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
augroup my_completion_nvim
autocmd!
autocmd BufEnter * lua require'completion'.on_attach()
augroup end
set omnifunc=v:lua.vim.lsp.omnifunc
set completeopt=menuone,noinsert,noselect
set shortmess=aoOtTIc
set number
set signcolumn=yes
How to reproduce Detailed step to reproduce this issue.
Expected behavior A clear and concise description of what you expected to happen.

That's clearly a bug. I'll look into it.
I have the same
"~/Music/<TAB>" not working
~/Music/<TAB> working
Any updates on this?
Edit: If it helps, the bug is with pattern matching in path.lua on line 70.