]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Merge pull request #34 from kohnish/ignoremissing
authorYegappan Lakshmanan <4298407+yegappan@users.noreply.github.com>
Thu, 27 Jan 2022 04:39:11 +0000 (20:39 -0800)
committerGitHub <noreply@github.com>
Thu, 27 Jan 2022 04:39:11 +0000 (20:39 -0800)
Option to ignore missing server

1  2 
autoload/lsp.vim

index c9f52dfb949a4908785faaf46819ca04fb7c38de,82b2926d14e191bd4c25b75406c5cdbc42082470..ccd24ac2ae7605552f09b0073d46dea0e29bc19b
@@@ -438,18 -438,14 +438,20 @@@ def lsp#addServer(serverList: list<dict
      endif
  
      if !executable(server.path)
-       util.ErrMsg('Error: LSP server ' .. server.path .. ' is not found')
+       if !opt.lspOptions.ignoreMissingServer
+         util.ErrMsg('Error: LSP server ' .. server.path .. ' is not found')
+       endif
        return
      endif
 -    if server.args->type() != v:t_list
 -      util.ErrMsg('Error: Arguments for LSP server ' .. server.args .. ' is not a List')
 -      return
 +    var args = []
 +    if server->has_key('args')
 +      if server.args->type() != v:t_list
 +        util.ErrMsg('Error: Arguments for LSP server ' .. server.args .. ' is not a List')
 +        return
 +      endif
 +      args = server.args
 +    else
 +
      endif
      if server.omnicompl->type() != v:t_bool
        util.ErrMsg('Error: Setting of omnicompl ' .. server.omnicompl .. ' is not a Boolean')