Giter VIP home page Giter VIP logo

Comments (12)

mattn avatar mattn commented on May 30, 2024 1

Fixed in master branch.

from vim-lsp-settings.

mattn avatar mattn commented on May 30, 2024

As far as I can see your installation log, gopls not installed successfully. Executable gopls should be located at $HOME/.vim/plugged/vim-lsp-settings/servers/gopls/gopls. What you get with echo lsp_settings#exec_path("gopls") ?

from vim-lsp-settings.

abetar0 avatar abetar0 commented on May 30, 2024

echo lsp_settings#exec_path("gopls") returns empty..
Other language server returns correct path. For example,

:echo lsp_settings#exec_path("pyls")
$HOME/.vim/plugged/vim-lsp-settings/servers/pyls/pyls

from vim-lsp-settings.

mattn avatar mattn commented on May 30, 2024

Do you set $GO111MODULE ?

from vim-lsp-settings.

mattn avatar mattn commented on May 30, 2024

And what version of Go do you use?

from vim-lsp-settings.

abetar0 avatar abetar0 commented on May 30, 2024

I'm using go1.13.5 and GO111MODULE=on.

from vim-lsp-settings.

prabirshrestha avatar prabirshrestha commented on May 30, 2024

Few things:
which OS?
can you also list the PATH environment variable i.e. Just above this list.

https://github.com/mattn/vim-lsp-settings/blob/master/autoload/lsp_settings.vim#L44

 let l:paths = join(l:paths, ",")
 call lsp#log(l:path)
 let l:path = globpath(l:paths, l:cmd)

Add lsp#log() and enable vim-lsp logs.

I'm curious if this has to do something with path ending with trailing slash or not ending with trailing slash.

from vim-lsp-settings.

abetar0 avatar abetar0 commented on May 30, 2024

@prabirshrestha I'm using macOS, and my $PATH is below.

echo split($PATH, ':')

['/Users/taro/.jenv/shims', '/Users/taro/.jenv/bin', '/usr/local/opt/openssl/bin', '/usr/local/opt/sqlite/bin', '/Users/taro/.pyenv/shims', '/Users/taro/.p
yenv/bin', '/Users/taro/.rbenv/shims', '/Users/taro/.embulk/bin', '/Users/taro/.opam/system/bin', '/Users/taro/.cargo/bin', '/usr/local/bin', '/usr/local/s
bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin', '/usr/local/share/dotnet', '/opt/X11/bin', '~/.dotnet/tools', '/Library/Frameworks/Mono.framework/Versions/
Current/Commands', '/Users/taro/go/bin', '/usr/local/src/scala/bin']

from vim-lsp-settings.

wcwxyz avatar wcwxyz commented on May 30, 2024

Try this.

diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim
index d6ecd5e29bec..8bb51fd322aa 100644
--- a/autoload/lsp_settings.vim
+++ b/autoload/lsp_settings.vim
@@ -40,7 +40,7 @@ function! lsp_settings#exec_path(cmd) abort
   else
     let l:path = split($PATH, ':')
   endif
-  let l:paths = join(l:paths, ",")
+  let l:paths = join(l:path, ",")
   let l:path = globpath(l:paths, l:cmd)
   if !has('win32')
     if !empty(l:path)

from vim-lsp-settings.

mattn avatar mattn commented on May 30, 2024

Ah, this is a bug.

diff --git a/autoload/lsp_settings.vim b/autoload/lsp_settings.vim
index d6ecd5e..18636f0 100644
--- a/autoload/lsp_settings.vim
+++ b/autoload/lsp_settings.vim
@@ -38,9 +38,9 @@ function! lsp_settings#exec_path(cmd) abort
       endif
     endfor
   else
-    let l:path = split($PATH, ':')
+    let l:paths = split($PATH, ':')
   endif
-  let l:paths = join(l:paths, ",")
+  let l:paths = join(l:paths, ',')
   let l:path = globpath(l:paths, l:cmd)
   if !has('win32')
     if !empty(l:path)

from vim-lsp-settings.

prabirshrestha avatar prabirshrestha commented on May 30, 2024

Seems like my bad in the PR.

from vim-lsp-settings.

abetar0 avatar abetar0 commented on May 30, 2024

The error is resolved. Thank you for the fix!

from vim-lsp-settings.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.