Skip to content

Commit

Permalink
Be slightly less aggressive in Go/Swift
Browse files Browse the repository at this point in the history
  • Loading branch information
seagle0128 committed Oct 27, 2017
1 parent ef7d036 commit bb3613c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lisp/init-edit.el
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,15 @@
(dolist (mode '(web-mode html-mode css-mode robot-mode))
(push mode aggressive-indent-excluded-modes))

;; Be slightly less aggressive in C/C++/Java/C#
;; Be slightly less aggressive in C/C++/C#/Java/Go/Swift
(add-to-list
'aggressive-indent-dont-indent-if
'(and (or (derived-mode-p 'c-mode)
(derived-mode-p 'c++-mode)
(derived-mode-p 'csharp-mode)
(derived-mode-p 'java-mode)
(derived-mode-p 'csharp-mode))
(derived-mode-p 'go-mode)
(derived-mode-p 'swift-mode))
(null (string-match "\\([;{}]\\|\\b\\(if\\|for\\|while\\)\\b\\)"
(thing-at-point 'line))))))

Expand Down

0 comments on commit bb3613c

Please sign in to comment.