Open asukaminato0721 opened 4 years ago
The warning here is not charming to me either. It comes from the Lint
paclet. Maybe I can contact Brenton to see if he'd like to change the rule here.
besides, I have tested that this can't run.
Did you mean that it CAN run?
Thank you for the advice. Here are my two cents,
Showing special character is a feature which better to be supported by the editor. Our language server should not assume that an editor supports Unicode display. There is a Pretty Symbols Mode extension for VSCode.
Copying as Unicode Character is somehow tricky for LSP because the copy feature is not natively supported, thus the language server knows neither when you copy nor what you copy. What's more, copying into \[Alpha]
is the default behavior of MMA (no matter what form you copy as). I do not mean it is good, but I would like to keep it as is for the time being.
I may add a WillSaveTextDocumentParams
handler to convert those Unicode characters that users input every time before the file is saved.
Thanks again for your feedback.
what I mean is this:
That should be the problem of wolframscript
. I can run it with
wolfram -script temp.wl
Now I know what's the problem. XD If I change utf-8 to gbk (Just ignore the warning, because I find the solution here, but I have done it before , and don't want to repeat it.)
Main reason is that, MS's cmd is gbk. Cpp will meet the same thing , too.
So there are some solutions:
It is worth mentioning that, Python can handle this easily .
Main reason is that, MS's cmd is gbk. Cpp will meet the same thing , too.
@wuyudi I was wondering about this, and raised a question at SE-MMA. CMD in Win10 has default utf-8 encoding at least from 1903. I really wonder why Wolfram systems pickup the GBK codepage.
I think for the original feature request by @wuyudi, it may be convenient to construct a font with ligatures.
I am just speaking off the top of my head, but we may just PR Wolfram-lang related features to Fira Code, e.g. [[⟶⟦
and so on.
Of course, for arrows and so on this may be sufficient, while for Greek letters the widths are still an issue.
I think for the original feature request by @wuyudi, it may be convenient to construct a font with ligatures.
See https://github.com/be5invis/Iosevka and the related issue https://github.com/be5invis/Iosevka/issues/680
I am just speaking off the top of my head, but we may just PR Wolfram-lang related features to Fira Code, e.g. [[⟶⟦ and so on.
]]
is not possible to be ligatured. E.g. f[g[x]]
.
as the image shows, it will warning. But it did can run in
.wls
.besides, I have tested that this can't run.
in .nb ,
α
will be translated into\[Alpha]
,then do the following calculation.(But shown as α).So here are some advice.
\[Alpha]
as α,but run it as itself.(But it's confusing that how to deal with the widith of this character)α
.But if use//CopyToClipboard//UsingFrontEnd
,it's also hard to deal with.(Or maybe just ignore it?)α
into vscode, change it into\[Alpha]
(but shown asα
)Maybe there can be a switch to open/close the "translate"? If some users really want to see
\[Alpha]
.