File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -661,6 +661,9 @@ void spawn(char *argv[]) {
661661 "capabilities" , capabilities ())));
662662 vec_free (& uri );
663663 server = strbsnm (argv [0 ]);
664+ if (strcmp (server , "pyright-langserver" ) == 0 ) {
665+ server = "pyright" ;
666+ }
664667}
665668
666669char * fileext (const char * path ) {
@@ -687,6 +690,9 @@ void detectserver(avim_strv msg) {
687690 if (strcasecmp (ext , "java" ) == 0 ) {
688691 server = "jdtls" ;
689692 }
693+ if (strcasecmp (ext , "py" ) == 0 ) {
694+ server = "pyright-langserver" ;
695+ }
690696 }
691697}
692698
@@ -696,7 +702,10 @@ void guessinvocation(void) {
696702 if (server == NULL ) {
697703 error (EXIT_FAILURE , 0 , "Which server?" );
698704 }
699- char * argv [] = {(char * )server , NULL };
705+ char * argv [] = {(char * )server , NULL , NULL };
706+ if (strcmp (server , "pyright-langserver" ) == 0 ) {
707+ argv [1 ] = "--stdio" ;
708+ }
700709 spawn (argv );
701710}
702711
You can’t perform that action at this time.
0 commit comments