Improve extra-langs and move Racket support to its own layer #937

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
2 participants
@trishume
Contributor

trishume commented Mar 25, 2015

Fixes some minor things in minor languages:

  • Lifetime specifiers in Rust no longer pair
  • company-quickhelp-mode is now disabled in racket-mode. It had a bad interaction where it would open full doc windows every time the autocomplete popup appeared.
  • Adds support for the Nim language.

And also moves Racket to its own mode since its config set had outgrown the extra-langs layer.

contrib/lang/racket/packages.el
+ ;; company-quickhelp calls it. Note hook is appendended for proper ordering.
+ (when (configuration-layer/package-declaredp 'company-quickhelp)
+ (add-hook 'company-mode-hook
+ '(lambda () (when (equal major-mode 'racket-mode) (company-quickhelp-mode -1))) t))

This comment has been minimized.

@syl20bnr

syl20bnr Mar 26, 2015

Owner

Does this alternative works for you ?

(when (configuration-layer/package-declaredp 'company-quickhelp)
        (add-hook 'racket-mode-hook '(lambda () (company-quickhelp-mode -1))))
@syl20bnr

syl20bnr Mar 26, 2015

Owner

Does this alternative works for you ?

(when (configuration-layer/package-declaredp 'company-quickhelp)
        (add-hook 'racket-mode-hook '(lambda () (company-quickhelp-mode -1))))

This comment has been minimized.

@trishume

trishume Mar 26, 2015

Contributor

That was the first thing I tried, company-mode-hook is called after racket-mode-hook and company-quickhelp-mode is activated in the company hook so it got reactivated right away.

@trishume

trishume Mar 26, 2015

Contributor

That was the first thing I tried, company-mode-hook is called after racket-mode-hook and company-quickhelp-mode is activated in the company hook so it got reactivated right away.

contrib/lang/racket/packages.el
+ '(lambda () (when (equal major-mode 'racket-mode) (company-quickhelp-mode -1))) t))
+ (add-hook 'racket-mode-hook
+ '(lambda ()
+ (define-key racket-mode-map (kbd "H-r") 'racket-run))))))

This comment has been minimized.

@syl20bnr

syl20bnr Mar 26, 2015

Owner

You should be able to define this key outside of a hook since you are in :config.

@syl20bnr

syl20bnr Mar 26, 2015

Owner

You should be able to define this key outside of a hook since you are in :config.

This comment has been minimized.

@trishume

trishume Mar 26, 2015

Contributor

Derp, didn't realize the redundancy. I wrote that a long time ago when I was still in the "herp derp copy other layers" phase and obviously I copied two redundant patterns.

@trishume

trishume Mar 26, 2015

Contributor

Derp, didn't realize the redundancy. I wrote that a long time ago when I was still in the "herp derp copy other layers" phase and obviously I copied two redundant patterns.

@syl20bnr

This comment has been minimized.

Show comment
Hide comment
@syl20bnr

syl20bnr Mar 26, 2015

Owner

Great PR !
The logo for racket is too big, the recommended height is 200px.

Owner

syl20bnr commented Mar 26, 2015

Great PR !
The logo for racket is too big, the recommended height is 200px.

@trishume

This comment has been minimized.

Show comment
Hide comment
@trishume

trishume Mar 27, 2015

Contributor

Fixed, removed redundant hook and resized logo.

Contributor

trishume commented Mar 27, 2015

Fixed, removed redundant hook and resized logo.

@syl20bnr

This comment has been minimized.

Show comment
Hide comment
@syl20bnr

syl20bnr Mar 28, 2015

Owner

Great ! I love the new racker layer 👍
I applied the conventions to racket layer and added more key bindings, see commit 3e68321

Thank you !
Cherry-picked in develop, you can safely delete your branch.

Owner

syl20bnr commented Mar 28, 2015

Great ! I love the new racker layer 👍
I applied the conventions to racket layer and added more key bindings, see commit 3e68321

Thank you !
Cherry-picked in develop, you can safely delete your branch.

@syl20bnr syl20bnr closed this Mar 28, 2015

@trishume

This comment has been minimized.

Show comment
Hide comment
@trishume

trishume Mar 28, 2015

Contributor

Whoah cool, thanks for the improvements!

Contributor

trishume commented Mar 28, 2015

Whoah cool, thanks for the improvements!

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