Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Smart-indent not outdenting correctly with Python #41

Description

@kenny-evitt

Copied from the original comment on LightTable/LightTable#1627:

I'm running into a roadblock using Light Table with python because the smart-indent feature isn't out-denting when it should after functions or classes.

Ex. before smart-indent:

class Dog:
    kind = 'canine'
    def __init__(self, name):
        self.name = name

class Cat:
    kind = 'feline'
    def __init__(self, name):
        self.name = name

After smart-indent:

class Dog:
  kind = 'canine'
  def __init__(self, name):
    self.name = name

    class Cat:
      kind = 'feline'
      def __init__(self, name):
        self.name = name

Not only did it reduce the tabs down to 2 spaces, it also didn't pickup on when to outdent causing the sibling classes to become nested.

This is a major blocker for polyglot Light Table users who use python.

LightTable 0.6.7

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions