@@ -56,7 +56,7 @@ func NewLSPClient(repo string, openfile string, wait time.Duration, opts ClientO
5656 return nil , err
5757 }
5858
59- cli , err := initLSPClient (context .Background (), svr , NewURI (repo ), opts .Verbose , opts .InitializationOptions )
59+ cli , err := initLSPClient (context .Background (), svr , NewURI (repo ), opts .Verbose , opts .Language , opts . InitializationOptions )
6060 if err != nil {
6161 return nil , err
6262 }
@@ -122,7 +122,7 @@ func (c *LSPClient) InitFiles() {
122122 }
123123}
124124
125- func initLSPClient (ctx context.Context , svr io.ReadWriteCloser , dir DocumentURI , verbose bool , InitializationOptions interface {}) (* LSPClient , error ) {
125+ func initLSPClient (ctx context.Context , svr io.ReadWriteCloser , dir DocumentURI , verbose bool , language uniast. Language , InitializationOptions interface {}) (* LSPClient , error ) {
126126 h := newLSPHandler ()
127127 stream := jsonrpc2 .NewBufferedStream (svr , jsonrpc2.VSCodeObjectCodec {})
128128 conn := jsonrpc2 .NewConn (ctx , stream , h )
@@ -143,7 +143,7 @@ func initLSPClient(ctx context.Context, svr io.ReadWriteCloser, dir DocumentURI,
143143 },
144144 "textDocument" : map [string ]interface {}{
145145 "documentSymbol" : map [string ]interface {}{
146- "hierarchicalDocumentSymbolSupport" : true ,
146+ "hierarchicalDocumentSymbolSupport" : ( language != uniast . Java ) ,
147147 },
148148 },
149149 }
0 commit comments