164164
165165function M .command (params )
166166 local install_path =
167- Path :new (params .path , params .repo , Utils .safe_path (params .ref ), params .versions , " language_server.sh" )
167+ Path :new (params .path , params .repo , Utils .safe_path (params .ref ), params .versions , " language_server.sh" )
168168
169169 return install_path
170170end
@@ -260,7 +260,7 @@ local function repo_opts(opts)
260260 else
261261 if opts .repo then -- if we specified a repo in our conifg, then let's default to HEAD
262262 ref = " HEAD"
263- else -- else, let's checkout the latest stable release
263+ else -- else, let's checkout the latest stable release
264264 ref = default_install_tag
265265 end
266266 end
@@ -318,12 +318,15 @@ function M.setup(opts)
318318
319319 if root_dir then
320320 local log_message = vim .lsp .handlers [" window/logMessage" ]
321+
322+ local commands = vim .tbl_extend (' force' , {
323+ [" elixir.lens.test.run" ] = test ,
324+ }, opts .commands or {})
325+
321326 vim .lsp .start (vim .tbl_extend (" keep" , {
322327 name = " ElixirLS" ,
323328 cmd = opts .cmd and wrap_in_table (opts .cmd ) or { tostring (cmd ) },
324- commands = {
325- [" elixir.lens.test.run" ] = test ,
326- },
329+ commands = commands ,
327330 settings = opts .settings or M .settings {},
328331 capabilities = opts .capabilities or capabilities ,
329332 root_dir = root_dir ,
@@ -332,7 +335,7 @@ function M.setup(opts)
332335 log_message (err , result , ... )
333336
334337 local message =
335- vim .split (" [" .. vim .lsp .protocol .MessageType [result .type ] .. " ] " .. result .message , " \n " )
338+ vim .split (" [" .. vim .lsp .protocol .MessageType [result .type ] .. " ] " .. result .message , " \n " )
336339
337340 pcall (vim .api .nvim_buf_set_lines , elixir_nvim_output_bufnr , - 1 , - 1 , false , message )
338341 end ,
0 commit comments