These are chat archives for rust-lang/rust

7th
Apr 2016
Jacob Moen
@jacmoe
Apr 07 2016 19:36
emacsfuck.png
I am trying to use Emacs - and have installed company and emacs-racer and I get really funny completions :smile:
Erik Hedvall
@Ogeon
Apr 07 2016 19:38
:arrow_backward: :arrow_double_down: :arrow_double_up: ...
Jacob Moen
@jacmoe
Apr 07 2016 19:39
What do I need to configure/install to get Rust and Emacs going ?
Christian Howe
@cjhowe7
Apr 07 2016 19:39
do you have rust-mode?
i can give you my cask file
Jacob Moen
@jacmoe
Apr 07 2016 19:40
I have rust mode apparently : it says : rust in the status bar
Christian Howe
@cjhowe7
Apr 07 2016 19:40
you probably need company-racer
Jacob Moen
@jacmoe
Apr 07 2016 19:41
Right - I will check..
Christian Howe
@cjhowe7
Apr 07 2016 19:41
this is my emacs config for rust
(add-hook 'rust-mode-hook
          (lambda ()
            (linum-mode t)
            (whitespace-mode t)
            (racer-mode t)
            (eldoc-mode t)
            (company-mode t)
            (rust-enable-format-on-save)))
Jacob Moen
@jacmoe
Apr 07 2016 19:42
company-racer is installed
Christian Howe
@cjhowe7
Apr 07 2016 19:42
looks like you just need rust-mode, company-racer, racer
hmm
what emacs version?
that looks like a company bug to me, maybe it's not up to date?
Jacob Moen
@jacmoe
Apr 07 2016 19:43
24.5.1
I did update a lot of packages just now
Christian Howe
@cjhowe7
Apr 07 2016 19:43
that's fine, is racer up to date?
1.2.6 works for me
that might be old though
Jacob Moen
@jacmoe
Apr 07 2016 19:43
The racer on my system?
Christian Howe
@cjhowe7
Apr 07 2016 19:43
yeah
Jacob Moen
@jacmoe
Apr 07 2016 19:44
1.2.6
using Rust 1.8
Christian Howe
@cjhowe7
Apr 07 2016 19:44
that's really weird
i think those symbols are supposed to be types?
can i see your rust config?
Jacob Moen
@jacmoe
Apr 07 2016 19:46
;; Set path to rust src directory
(setq racer-rust-src-path "/home/jacmoe/rustc-beta/src/")

;; Loat rust-mode when you open '.rs' files
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))

;; Set up configurations when you load rust-mode
(add-hook 'rust-mode-hook #'racer-mode)
(add-hook 'racer-mode-hook #'eldoc-mode)
(add-hook 'racer-mode-hook #'company-mode)
(global-set-key (kbd "TAB") #'company-indent-or-complete-common)
(setq company-tooltip-align-annotations t)
Christian Howe
@cjhowe7
Apr 07 2016 19:47
maybe try turning off (setq company-tooltip-align-annotations t)
are you getting rust-mode and stuff from MELPA?
Jacob Moen
@jacmoe
Apr 07 2016 19:47
Yes :)
Christian Howe
@cjhowe7
Apr 07 2016 19:47
hmm
maybe this is worth taking to the company mode repository
they can probably tell you if it's a racer problem
Jacob Moen
@jacmoe
Apr 07 2016 19:48
Is my configuration otherwise OK?
I will try with a vanilla Emacs configuration - I am using Ohai-Emacs (for some reason) :p
Christian Howe
@cjhowe7
Apr 07 2016 19:49
it seems fine to me
Jacob Moen
@jacmoe
Apr 07 2016 19:49
Is Prelude worth trying?
Christian Howe
@cjhowe7
Apr 07 2016 19:49
the auto-mode-alist is unnecessary
some people like it
it depends on how much customization you want
Jacob Moen
@jacmoe
Apr 07 2016 19:52
What I am getting is lots of weird suggestions
Erik Hedvall
@Ogeon
Apr 07 2016 19:53
I'm not an emacs user, myself, so I'm just fumbling in the dark, but are you sure it interprets the file as a Rust file, and not some kind of markdown or something? I mean, those were emoji/emoticon codes
Christian Howe
@cjhowe7
Apr 07 2016 19:54
ah!
smart guy
Jacob Moen
@jacmoe
Apr 07 2016 19:54
It says Rust .. yes, it does look like emoji's
Christian Howe
@cjhowe7
Apr 07 2016 19:54
you have that emoji company mode enabled
those weird symbols are emoji
Jacob Moen
@jacmoe
Apr 07 2016 19:54
Cool - any idea how to get rid of that?
Christian Howe
@cjhowe7
Apr 07 2016 19:54
just rendering wrong with your font or whatever
Erik Hedvall
@Ogeon
Apr 07 2016 19:54
they were :arrow_backward: :arrow_double_down: etc.
Jacob Moen
@jacmoe
Apr 07 2016 19:55
Yes :100:
etc
turn that off in rust mode?
i guess you've got to have something to enable it in your config, right?
just enable it only in the modes you need it for
maybe ohai emacs is doing it
Jacob Moen
@jacmoe
Apr 07 2016 19:58
Terrible ! :)
Christian Howe
@cjhowe7
Apr 07 2016 19:58
emojify-inhibit-major-modes should have rust-mode in it
i like text emojis better anyways O_o
Jacob Moen
@jacmoe
Apr 07 2016 19:59
I uninstalled the company emoji package but the problem persists - guess it is time for a vanilla Emacs installation
Christian Howe
@cjhowe7
Apr 07 2016 19:59
also i wonder what the actual plural for emoji is
well, now you know why i don't use prelude :D
Jacob Moen
@jacmoe
Apr 07 2016 20:00
:p
Christian Howe
@cjhowe7
Apr 07 2016 20:00
definitely check out emacs cask and pallet-mode if you're starting a new config
Jacob Moen
@jacmoe
Apr 07 2016 20:00
Anyway: huge thanks ! :+1: I know what to fix.
Erik Hedvall
@Ogeon
Apr 07 2016 20:01
:squirrel:
Jacob Moen
@jacmoe
Apr 07 2016 20:01
I will check out cask and pallet-mode.
Christian Howe
@cjhowe7
Apr 07 2016 20:01
then you can sync it to github and just pull down on any machine to get a fresh new emacs with all packages installed
trust me, you don't want to do this twice
emacs config = life
Jacob Moen
@jacmoe
Apr 07 2016 20:01
If you are anything like me it will blow up in your face and you have to do it again :p
Christian Howe
@cjhowe7
Apr 07 2016 20:02
yep, just delete it all and commit a new one
Jacob Moen
@jacmoe
Apr 07 2016 20:02
I will check it out :)
Christian Howe
@cjhowe7
Apr 07 2016 20:02
you'll get it eventually though
Jacob Moen
@jacmoe
Apr 07 2016 20:38
Yes! It works! :sparkles: :smile:
Jacob Moen
@jacmoe
Apr 07 2016 20:50
Hand-written emacs.d FTW :feelsgood:
Christian Howe
@cjhowe7
Apr 07 2016 20:50
:beers:
@jacmoe did you start using emacs because of the new website? https://www.gnu.org/software/emacs/
way better than the vim website lolol
Jacob Moen
@jacmoe
Apr 07 2016 21:18
:smile: No - I've been an Emacs user waiting to get out for many years :p
Great site - I did not notice that they made a new site. Looks really nice and clean :)
Cask and Pallet are awesome!!
And easy to use too
Christian Howe
@cjhowe7
Apr 07 2016 21:21
yeah
i think it's funny that they change the website, i hope it convinces people to use emacs
stuck in the 1800s
Jacob Moen
@jacmoe
Apr 07 2016 21:22
Retro hipsters @mhsjlw !
mhsjlw
@mhsjlw
Apr 07 2016 21:23
i've designed website like that just for the kicks
there should be a css lib for doing that
because, why not?
doesn't support mobile devices, and is completely compatible with the original IE 1!
oh and netscape
Jacob Moen
@jacmoe
Apr 07 2016 21:24
Be sure to use frames and tables :)
mhsjlw
@mhsjlw
Apr 07 2016 21:24
what else would i use!
:P
Jacob Moen
@jacmoe
Apr 07 2016 21:24
And marquees :smile:
mhsjlw
@mhsjlw
Apr 07 2016 21:24
genuis! i'll make them flash colours too
ill also add a helper for choosing 'beautifully retro' colours
like neon green
and beige
Christian Howe
@cjhowe7
Apr 07 2016 21:25
go get the color themes from old websites
mhsjlw
@mhsjlw
Apr 07 2016 21:26
now all I need to do is re-learn CSS
mhsjlw
@mhsjlw
Apr 07 2016 21:26
oh you know what... we should also add a javascript ES1 api for opening random popups while browsing