Comments (8)
Thanks! The change looks good, I'll check later today on my computer
from vim-crystal.
It works well 👌
from vim-crystal.
I guess you assume crystal-lang/crystal repository. bin/crystal
is a wrapper script, not a crystal
command itself. So g:crystal_compiler_command
does not consider it. Actual built binary is put at .build/crystal
so please use it rather than the wrapper script.
from vim-crystal.
So g:crystal_compiler_command does not consider it.
It actually works, it's just that stderr (with the stdlib message) is also inserted on the top of the formatted file.
Thanks for answering, I know it's a wrapper, it uses the built crystal when available or fallback to system install of crystal.
It also sets a few environments variables for me and points to the correct stdlib (not the system's).
So to have all of that, I'd have to write another wrapper script similar to bin/crystal
that doesn't print anything to stderr.
I was thinking about an alternative that I think is more generic: ignore stderr for :CrystalFormat
(and maybe display it if the command ends with a non-zero status).
What do you think?
from vim-crystal.
Since the message is output to stdout, I think it is intended that formatter does not work. The crystal tool format
command outputs formatted code to stdout. So there is a conflict between bin/crystal
and crystal tool format
, meant that vim-crystal has nothing to do with.
I think it's the best way to improve the build/crystal
script. For example: Add $BIN_CRYSTAL_SUPPRESS_WARNING
environment variable and suppress the warning message when it is set. Modification would be easy so you'd be able to quickly propose it by making a PR. Referring this issue would be useful to explain why it is necessary.
from vim-crystal.
I just checked, the message is output to stderr, as you can see in this little example:
from vim-crystal.
Oh, you're correct.
I think we can redirect stderr to suppress it.
from vim-crystal.
If you have time, would you try f87af4e? stderr now should be redirected to /dev/null
(or nul
on Windows) so this issue should be fixed
from vim-crystal.
Related Issues (20)
- Shorthand null checking indents an extra unit HOT 6
- Latest commit throws error on ECR files HOT 3
- ECR files break formatting entirely until vim restart HOT 2
- Add highlighting for variables HOT 4
- Option to write buffer before executing spec HOT 4
- have you looked into tree-sitter yet? HOT 2
- vim-crystal commands do not work HOT 8
- Create releases
- select not indended, should be handled like case HOT 1
- abstract def method prevents matchit to function properly
- Error when invoking `:CrystalDef`
- Faulty syntax highlighting for numbers HOT 9
- [feature request] Comment block editing mode HOT 4
- Auto format should not block saving buffer HOT 3
- Syntax: regression in highlighting 'end' HOT 1
- macro 'end' highlighting regression HOT 1
- Regression in highlighting until...end HOT 1
- Invalid argument: crystalExceptional HOT 3
- Move to organization HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-crystal.