1

I checked and found only a syntax file for lex filetypes in /usr/share/nvim/runtime/syntax, but found no indent file in /usr/share/nvim/runtime/indent

I want my lex files to be properly indented; one of the indentation that I'm seriously missing is the following:

    /* what I get after just typing */
{NUMBER}  {
sscanf(yytext, "%lf", &yylval);
return NUMBER;
}

    /* what I get after doing `=yap` */
{NUMBER}  {
    sscanf(yytext,"%lf", &yylval);
    return NUMBER;
          }

    /* what I want */
{NUMBER}  {
               sscanf(yytext,"%lf", &yylval);
               return NUMBER;
          }

As you can see, there is really no indentation going on for lex. If you know some third-party indentation file for lex in neo/vim, please share. Also, if there are some prettifier for lex, that could also work, I think; so if you instead know some prettifier for lex, that would be enough.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.