Skip to content

Conversation

mattn
Copy link
Collaborator

@mattn mattn commented Feb 12, 2020

Currently, vim-lsp-settings is using FileType base event handling. The FileType event is triggered when the filetype is modified from syntax plugins. For example, *.jl is registered as filetype=lisp at $VIMRUNTIME/filetype.vim in default. But some users want to use julia with *.jl. So user install plugin. If a Language Server for common-lisp (ex: cl-lsp) is already installed, vim-lsp-settings start cl-lsp and julia-language-server both. To avoid this, vim-lsp-settings have to make little delay to check the last modified. However, vim-lsp does not have a way to activate Language Server. So this change add lsp#activate to activate Language Server in lazy.
ex:

function! s:vim_lsp_load_or_suggest_delay(ft) abort
  call timer_start(0, {timer -> [s:vim_lsp_load_or_suggest(a:ft), lsp#activate()]})
endfunction

@hrsh7th hrsh7th merged commit 77f3536 into master Feb 19, 2020
@mattn mattn deleted the add-activate branch February 19, 2020 17:07
kg8m pushed a commit to kg8m/vim-lsp that referenced this pull request Feb 20, 2020
Co-authored-by: hrsh7th <hrsh7th@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants