marlonfan / coc-phpls

🐭 php language server for coc.nvim
MIT License
212 stars 16 forks source link

Function text object is including opening brace #52

Open JoyceBabu opened 4 years ago

JoyceBabu commented 4 years ago

Describe the bug

I am not exactly sure whether this is an issue with coc-phpls or intelephense.

I have added the following configuration for enabling the function text object. But when I try to select inside a function with vif, the opening brace is included with the selection.

If the opening brace is on the same line as the function header, then it is working correctly.

" Create mappings for function text object, requires document symbols feature of languageserver.
xmap if <Plug>(coc-funcobj-i)
xmap af <Plug>(coc-funcobj-a)
omap if <Plug>(coc-funcobj-i)
omap af <Plug>(coc-funcobj-a)

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots

Screenshot 2020-02-19 at 6 31 41 PM Screenshot 2020-02-19 at 6 31 20 PM

Desktop (please complete the following information):