Giter VIP home page Giter VIP logo

Comments (7)

mikavilpas avatar mikavilpas commented on August 10, 2024

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?

from omnisharp-server.

d12frosted avatar d12frosted commented on August 10, 2024

Currently I am working on Unity3d project on C#. I have next configurations:

  • OS X 10.9.4
  • Unity3d 4.5.2f1
  • As far as I know, we use .Net 2.0 subset (hello Unity3d)
  • GNU Emacs 24.3.1 (terminal version and aqamacs)
  • OmniSharp-Emacs (last available version, installed with package-install)
  • Csharp-mode (last available version, installed with package-install)
  • Flycheck (the same)

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.

from omnisharp-server.

d12frosted avatar d12frosted commented on August 10, 2024

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 :)

from omnisharp-server.

nosami avatar nosami commented on August 10, 2024

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

from omnisharp-server.

d12frosted avatar d12frosted commented on August 10, 2024

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.

from omnisharp-server.

nosami avatar nosami commented on August 10, 2024

Yeah. Btw.... this project is hopefully gonna be superceded by this soon https://github.com/OmniSharp/omnisharp-roslyn :)

from omnisharp-server.

d12frosted avatar d12frosted commented on August 10, 2024

Oh. Haven't noticed it before. Gonna check it out.

from omnisharp-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.