Open d12frosted opened 10 years ago
Hmm, interesting! Could your current project be special in some way? What version of the .net framework does it use, for example.
What platform and editor plugin are you using?
Currently I am working on Unity3d project on C#. I have next configurations:
I did some tests. It really doesn't work only with few files in current project. I even tried to get clean copy of out Unity3d project, then generated brand new MyGame.sln file (Mono project). But problem still bother me.
Oh. Just found the code that fails OmniSharp to format whole buffer.
int[] my_ints =
{
1,
2,
3,
4
};
This is not exactly the code I use, but I checked – OmniSharp
or NRefactory
fails to format this code. And yes, this code
int[] my_ints = { 1, 2, 3, 4 };
is formatted without any problems. :)
Updated
More funny things. I am using Allman intending style.
first
This code:
int[] my_ints =
{ 1,
2,
3,
4 };
is formatted into
int[] my_ints =
{ 1,
2,
3,
4
};
second
This code
int[] my_ints =
{
1,
2,
3,
4
};
Is formated to itself (no error occurs).
third
But this one
int[] my_ints =
{
1,
2,
3,
4
};
can't be formatted :)
I can replicate the bug. I don't have any idea what the problem is yet though. I'll take another look when I get chance.
Thanks
Just a funny update. /codeformat
can't format Program.cs
file :D
Actually this is the code that causes errors:
var options = new OptionSet
{
{
"s|solution=", "The path to the solution file",
s => solutionPath = s
},
{
"p|port=", "Port number to listen on",
(int p) => port = p
},
{
"c|client-path-mode=", "The path mode of the client (Cygwin, Windows or Unix)",
c => clientPathMode = c
},
{
"v|verbose=", "Output debug information (Quiet, Debug, Verbose)",
v => verbosity = v != null
? (Verbosity)Enum.Parse(typeof(Verbosity), v)
: Verbosity.Debug
},
{
"h|help", "Show this message and exit",
h => showHelp = h != null
},
{
"config=", "The path to the server config.json file",
path => configLocation = path
}
};
The error is similar.
Yeah. Btw.... this project is hopefully gonna be superceded by this soon https://github.com/OmniSharp/omnisharp-roslyn :)
Oh. Haven't noticed it before. Gonna check it out.
Hello nosami,
It's me again. And again with formatting problems. Everything works fine except
code-format
. It was working few moments ago and then just started to push strange messages. I thought something went wrong with my settings ofOmniSharpServer
, so I totally removed it, cloned clean project from your repository, and installed clean copy. Then started the server and found the same error. Everything works exceptcode-format
^^.Here is output from
OmniSharpServer
:I can't understand what's going on. It doesn't work with any file of my current project. But it works well with files from other projects (if I start server with their sln file). Any ideas?