Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix refresh pattern to be customizable #550

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yoshi1123
Copy link

In settings.json, eclipse-jdt-ls has this config:

      "config": {
        "refresh_pattern": "\\([.a-zA-Z0-9_-]\\+\\|/\\|\\k\\+\\)$"
      },

Completion for methods/fields does not work for me with this refresh pattern.
With this PR, one can change this refresh_pattern with g:lsp_settings. For example,

let g:lsp_settings = {
\ "eclipse-jdt-ls": {
\   "config": {
\     "refresh_pattern":"\\(\\k\\+\\)$"
\   }
\ }
\}

\ has_key(g:lsp_settings, l:server.command) &&
\ has_key(g:lsp_settings[l:server.command], 'config')
call extend(l:config, g:lsp_settings[l:server.command]['config'])
endif
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extend is destructive API. please override refresh_pattern simply. (not to use extend)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants