swift-emacs / swift-mode

Emacs support for Apple's Swift programming language.
GNU General Public License v3.0
372 stars 47 forks source link

I am not able to set the default indent to 2 spaces. #160

Closed fluffybeing closed 5 years ago

fluffybeing commented 5 years ago

I updated my emacs configuration which has 2 spaces as default indentation and works for all other major mode but for swift-mode it doesn't work.

I guess it happens because of this line as we are setting the indent to 4 spaces and it overrides the default configuration.

defcustom swift-mode:basic-offset 4
  "Amount of indentation for block contents."
  :type 'integer
  :group 'swift
:safe 'integerp)

I am new to emacs and so I don't know elisp but if you can guide to how to add configurable indentation, I will work on it.

taku0 commented 5 years ago

M-x customize-groupswiftSwift Mode:Basic Offset, or M-x customize-optionswift-mode:basic-offset.

fluffybeing commented 5 years ago

It fixed the issue. Thanks a lot @taku0 :)