Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

cuts off after a certain number of characters #83

Closed
MagicDuck opened this issue Apr 1, 2021 · 5 comments
Closed

cuts off after a certain number of characters #83

MagicDuck opened this issue Apr 1, 2021 · 5 comments

Comments

@MagicDuck
Copy link

Seems like there is a specific buffer size after it will cut off the prettified output

@josephfrazier
Copy link
Owner

josephfrazier commented Apr 2, 2021

Hi @MagicDuck, thanks for the report. Can you provide a way to reproduce the issue?

@MagicDuck
Copy link
Author

MagicDuck commented Apr 7, 2021

Hi @josephfrazier, first I want to apologize for that minimal issue report, I really appreciate the speed of this tool and your help!
My excuse is that I was pretty tired that day :P

I was trying to use prettier_d with https://github.com/iamcco/diagnostic-languageserver.
In essence, if I do something like the following on the command line:

cat verylargejsfile.js | prettier_d --stdin --stdin-filepath verylargejsfile.js

It will work just fine (Note: verylargejsfile.js has like 2000 lines.)
But when I configure it through diagnosticls, it will cut off after a certain number of characters.
For reference, my config for it (in lua as am using it with nvim lsp) was something like:

prettier =  {
  command = "prettier_d", -- cuts off large files
  --command = "./node_modules/.bin/prettier", -- but this works fine
  args = {"--stdin", "--stdin-filepath", "%filepath"},
  isStdout = true,
  rootPatterns = {".prettierrc", ".prettierrc.json"}
}

Now, the thing is that diagnosticls works just fine with the regular prettier and also eslint_d --fix, so am guessing there might be something to do with how prettier_d flushes its output to stdout? Either that or something that needs to be fixed in https://github.com/iamcco/diagnostic-languageserver?...

@MagicDuck
Copy link
Author

Hmm, interesting, this appears not to be an issue with https://github.com/mikew/prettier_d_slim

@josephfrazier
Copy link
Owner

Oh, that's good to hear! To be honest, I'm not really maintaining prettier_d any more, so if prettier_d_slim works for you, I'd encourage you to use that.

@josephfrazier
Copy link
Owner

closing, as this project is no longer maintained

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants