Giter VIP home page Giter VIP logo

Comments (14)

ap4y avatar ap4y commented on August 22, 2024

Hey @akoaysigod, it doesn't seem to happen for me in my setup. Just tried to create a class with method and no error appeared. What's your emacs version and what error message do you get? I'm not sure how to debug it, I will need to reproduce it somehow in my setup, so would be great to get as much information as possible.

from swift-mode.

akoaysigod avatar akoaysigod commented on August 22, 2024

24.3 is the version I'm using on OSX. It just says "Mismatched Parentheses" at the bottom. Sorry I'm new to emacs, I think the main problem is with autopair which doesn't seem to work with this mode. But I do get the error regardless of whether or not it's on. I also got it on a fresh install on Ubuntu. I'm not sure if it's relevant at all at this point now that I've realized it was autopair messing up. Sorry.

from swift-mode.

ap4y avatar ap4y commented on August 22, 2024

Ok, I'm using 24.4, so that's may be the case. I wonder if you use clean emacs or configuration packs like Prelude? Also did you install this mode manually or from MELPA?

from swift-mode.

akoaysigod avatar akoaysigod commented on August 22, 2024

I installed it from MELPA. I'm not using Prelude and it happened on a clean install of emacs as well albeit a different version probably since it was on Ubuntu and not OSX.

from swift-mode.

ap4y avatar ap4y commented on August 22, 2024

Ok, I will try this setup.

from swift-mode.

ap4y avatar ap4y commented on August 22, 2024

Did this:

  • Installed emacs from homebrew with: --cocoa --srgb;
  • Created init.el with MELPA initialisation;
  • Installed swift-mode;

Created test .swift file and wrote this:

class Foo {
    func bar() {
        return "test";
    }
}

No errors occurred. Any idea what else I can check?

from swift-mode.

akoaysigod avatar akoaysigod commented on August 22, 2024

I just did the same thing and it says Mismatched Parentheses in the mode line as soon as I finished typing func. Like I said I don't even know if it's a big deal or not. Sorry I can't provide you with more information.
t

At this point my other minor modes stop working. Although in this case, there's nothing installed besides swift-mode. This doesn't happen in any other major modes I've been working in.

from swift-mode.

ap4y avatar ap4y commented on August 22, 2024

Ok I was able to reproduce this and some results:

  • Warning itself is related to this and can be solved by setting blink-matching-paren to nil;
  • It also somehow related to the smie based indentation, I'm still checking what is the problem here;
  • It doesn't result in malfunctioning of other modes for me, even after this warning indentation and highlighting still works.

I will check if it's a problem with smie.

from swift-mode.

olepor avatar olepor commented on August 22, 2024

Anyone made any progress on this issue yet?

from swift-mode.

akoaysigod avatar akoaysigod commented on August 22, 2024

@olepor as far as the warning goes it's still happening. I haven't had the problem with the indentation in a while though.

from swift-mode.

olepor avatar olepor commented on August 22, 2024

I seem to have a problem with autopairing braces in swift-mode. Anyone else recognise these symptoms? Parenthesis work just fine, but there is something that messes with the mathcing of braces. It seems like it is trying to match them (the braces) with keywords- such as if, for... etc
instead of the mathcing brace. I guess this has something to do with the swift-mode functionality.
@akoaysigod

from swift-mode.

ap4y avatar ap4y commented on August 22, 2024

Hey @olepor can you make a gist or something with an example of the situation (something minimal). I assume the problem is the error message (Mismatched parenthesis), right? Or you have a different problem?

from swift-mode.

Asbjourn avatar Asbjourn commented on August 22, 2024

Hi

I am having this problem as well. It seems the '..<' and related range syntax are causing the issue. The standard '...' range works perfectly fine, however when the the angle brackets are introduced it begins to complain about mismatching parenthesis.

I am using Emacs 24.5.1 with swift-mode installed through the MELPA repository.

Thank you for your continued support.

from swift-mode.

taku0 avatar taku0 commented on August 22, 2024

Closing in favor of the new indentation logic.

from swift-mode.

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.