Comments (4)
Would be good to have this
from zarchive-fsharpbinding.
From @migueldeicaza
Hello guys, Small update. Michael tells me that you do not need to define a F# policy type, all you have to do is define a text policy scoped to the F# mime type:
<TextStylePolicy scope="text/x-fsharp">
<FileWidth>120</FileWidth>
<TabWidth>4</TabWidth>
<IndentWidth>4</IndentWidth>
<TabsToSpaces>False</TabsToSpaces>
<NoTabsAfterNonTabs>False</NoTabsAfterNonTabs>
<RemoveTrailingWhitespace>True</RemoveTrailingWhitespace>
<EolMarker>Unix</EolMarker>
</TextStylePolicy>
Hey guys,
Is there a reason why the F# addin does not have its own configuration for "Convert Tabs to Spaces"?
I would rather not have to set this globally, and luckily, MonoDevelop allows this to be set on a per-file type basis.
What you need to do is register a formatting setting for F# files.
To do this, you need to register a PolicySet for the F# mime type, you can see how the C# one does this for various styles here:
monodevelop/main/src/addins/CSharpBinding/CSharpBinding.addin.xml
And it looks like this:
<Extension path = "/MonoDevelop/ProjectModel/PolicySets/VisualStudio" >
<Policies resource="FSharpVisualStudio.xml" />
</Extension>
And then ship a FSharpVisualStudio.xml one, you probably want to copy the style we have in:
monodevelop/main/src/addins/CSharpBinding/MonoDevelop.CSharp.Formatting/policies/MonoCSharpPolicy.xml
Miguel.
from zarchive-fsharpbinding.
I did try implementing this some time ago exactly as detailed by @migueldeicaza but found there was no global options and the fsharp formatting was always overridden by default by the text format.
This is low priority in the scheme of things so anyone else please feel free to pick this up.
from zarchive-fsharpbinding.
Closing this since it was opened 3 years ago. It likely still needs to be done but lets open a new issue with up-to-date information
from zarchive-fsharpbinding.
Related Issues (20)
- Can't compile code in Windows HOT 6
- Syntax highlighting doesn't cope with international chars HOT 3
- Emacs autocomplete with .net 4.5 references HOT 12
- Documentation comments in MonoDevelop are broken since new ToolTip on Linux HOT 1
- Adding Glyph to Completion output in fsautocomplete HOT 8
- Syntax highlighting: Strange output HOT 5
- [emacs] Symbol's function definition is void: -any HOT 1
- Tutorial creates empty project HOT 2
- fsharpbinding does not parse ProjectReferences? HOT 1
- fsautocomplete will not start under mono 3.2.8 in Ubuntu/Linux Trusty HOT 1
- FSX script crashing fsautocomplete. HOT 1
- fsautocomplete.exe not run with mono 3.2.8 HOT 1
- Question on error HOT 3
- Missing type info tooltips in Lubuntu 14.04 HOT 2
- Auto-completion for fsx files stops working HOT 3
- [github] Escaped double quotes in verbatim strings conflict with triple-quoted strings HOT 3
- NRE when creating an .fsx file in XS HOT 1
- Atom.io support? HOT 20
- fsharpbinding is not available as the default package in SublimeText package control HOT 4
- could not import MSBuildExtensionPath32 in Monodevelop HOT 11
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 zarchive-fsharpbinding.