Comments (2)
Probably the best place is opening an issue for the CodeFormatter repo:
https://github.com/WolframResearch/codeformatter
There are various options for the formatter that are exposed as options for the functions in the CodeFormatter`
context.
I talk about the CodeFormatter`
package in this talk from WTC2020:
Formatting the Wolfram Language (youtube)
There is not yet a convenient way of modifying settings through VSCode, but you can modify settings for the formatter by changing the command for the LSP server and settings various variables.
Here is an example command with line width of Infinity and using the experimental line-breaking method "LineBreakerV2":
"wolfram.command": [
"`kernel`",
"-noinit",
"-noprompt",
"-nopaclet",
"-nostartuppaclets",
"-noicon",
"-run",
"Needs[\"LSPServer`\"];CodeFormatter`$DefaultLineWidth=Infinity;CodeFormatter`$DefaultBreakLinesMethod=\"LineBreakerV2\";LSPServer`StartServer[]"
]
LineBreakerV2 tries to do a better job of understanding and using the tree-structure of the code. But there are still issues and it is not yet turned on by default.
Formatter-specific issues can be opened here:
https://github.com/WolframResearch/codeformatter
from vscode-wolfram.
This is really great information, thank you!
The IntelliJ plugin is quadrupling in price, so I thought I'd check in on the VS Code plugin. Formatting is probably my biggest hurdle in switching, so I'll definitely review the links you sent. Btw, thanks for adding the section folding. It's working
from vscode-wolfram.
Related Issues (20)
- Blank should be a wordseparator as well HOT 1
- Support for Wolfram Engine? HOT 4
- Is the a way to export to WebAssembly from Wolfram Language? HOT 1
- Starting client failed HOT 8
- Crash while trying to select code in a saved file HOT 3
- Syntax highlighting: symbols HOT 3
- Feature Request: Syntax Highlight for HTML inside EmbeddedHTML
- Does it work with the Wolfram Player? HOT 2
- Request: publish extension in open-vsx.org HOT 1
- Section Folding bug
- Cannot run wl files in VSCode HOT 2
- Couldn't start client Wolfram Language HOT 1
- Could you support unicode characters, just like Mathematica HOT 8
- LSP for wolfram language in VSCode jupyter notebook HOT 5
- 'Go to Definition' Support across project HOT 1
- Setting up vscode-wolfram on Mac M1 HOT 1
- A fixed upstream issue. HOT 1
- Mark Sin[1, 2] as incorrect syntax with red highlighting for 2
- Unlink from the .m file HOT 2
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 vscode-wolfram.