Code Completion In Emacs - Everything You Need To Know

  Рет қаралды 30,435

Gavin Freeborn

Gavin Freeborn

Күн бұрын

Пікірлер: 45
@georgH
@georgH 2 жыл бұрын
Excellent summary! Installed corfu and cape a while ago but didn't stop on actually learning about them. I really like the current trend of using most of Emacs core directly, instead of packages reinventing the wheel all the time.
@sethbrown1763
@sethbrown1763 Жыл бұрын
Thank you for sharing this video! I learned a lot from it and will probably be coming back to it from time to time as it makes more sense to me over time. Excellent presentation!
@yagosantanna8548
@yagosantanna8548 10 ай бұрын
Just migrated to corfu and cape. Thank you very much for this very comprehensive tutorial.
@GavinFreeborn
@GavinFreeborn 10 ай бұрын
Glad I could help!
@defnlife1683
@defnlife1683 2 жыл бұрын
Awesome. I've been getting into emacs slowly thanks to your channel! :D
@ozzy9846
@ozzy9846 2 жыл бұрын
Great video! I'm currently in the process of switching over from company to corfu/cape. I love how you showed us your configuration for these packages as well as a brief explanation of what some of the config options do.
@DanielMircea
@DanielMircea 2 жыл бұрын
In company you can call control + s and search (filter) within the results which personally I like more than orderless.
@DangerSepp
@DangerSepp 2 жыл бұрын
Rly appreciate your summary! I didn't know about cape, and never tried corfu.
@aiotmlwtf
@aiotmlwtf Ай бұрын
With Emacs 30 came =completion-preview=, a nice type ahead or inline preview function.
@abarocio80
@abarocio80 2 жыл бұрын
Thanks, Gavin! This was really useful, specially with corfu and cape.
@frankchen5728
@frankchen5728 7 ай бұрын
Thank you very much for the great video, Gavin! I followed the instructions to set up Corfu in my emacs. It works for Lisp but not Python. Is there any other extensions I need to install to make it work for Python?
@nonefvnfvnjnjnjevjenjvonej3384
@nonefvnfvnjnjnjevjenjvonej3384 2 жыл бұрын
its just so much setup... i used to love emacs... but sometimes i miss the "just works" of vscode and jetbrains ide's.
@rlifts
@rlifts Жыл бұрын
You should do a tempel video. Thanks for the 20 line config getting started with emacs, it became 10,000 lines lol. Several months ago I started on Emacs with your config. Thinking about moving to corfu, Daniel corfu/consult/vertico/tempel maintainer is a workhorse. Dmitry from company mode is super nice, he's helped me out a few times and implemented a feature I suggested in an old post.
@MENTOKz
@MENTOKz 2 жыл бұрын
great video gavin i will have to as this to my config thanks
@marlisschneider4603
@marlisschneider4603 2 жыл бұрын
I am enjoying very much your emac content :) So much to learn and adapt! Would you be willing to share your wallpaper (the one with the sea and lighthouse)? Obsessed with it since I saw it in your video on your emcacs workflow.
@SimulatedWarfare
@SimulatedWarfare Жыл бұрын
Greetings. Is that a specific color scheme you are using? Looks cool and I'd like to use these colors as well :)
@p99chan99
@p99chan99 Жыл бұрын
Corfu doesnt work properly for me... I get it to work with files for programming, so do i need an LSP? Im also using elpaca to install Corfu
@AlessandroBertulli
@AlessandroBertulli 2 жыл бұрын
In case it's useful to people watching this (excellent video!) a bit later in time like me, this is the update for version 0.29 of corfu (2022-11-19): - BREAKING: Extract the =corfu-echo= extension from =corfu.el=. In order to see echo messages, enable =corfu-echo-mode=. You probably want to enable either =corfu-echo-mode= or =corfu-popupinfo-mode=. - BREAKING: Rename =corfu-echo-documentation= to =corfu-echo-delay=. - Add =corfu-popupinfo= extension to display candidate documentation and location in a small child frame next to the candidate menu. This extension has been contributed by Yuwei Tian who assigned copyright to the FSF. The extension supersedes Yuwei's =corfu-doc= package.
@jkolikovec
@jkolikovec 2 ай бұрын
I'm at my wits end. I've done exactly as you've done, but corfu just refuses to work
@YisraelDovL
@YisraelDovL Жыл бұрын
Weird, I don't get the binding `C-M-i` to do completion with the minibuffer
@jorgefernandocho7824
@jorgefernandocho7824 2 жыл бұрын
Hey gavin! Great work in this channel. How come you didn't mention vertico, helm and ido? These are the ones that are on doom emacs configuration.. Thanks for the great content.
@p99chan99
@p99chan99 Жыл бұрын
It's been a few weeks now and I'm still having trouble to figure out a way to setup code completion in emacs, trying to configure corfu + eglot and no luck, so many of the resources I've seen have been counter-intuitive and always included other packages related to corfu in the code examples, which I don't care about. It could be new being new to emacs, but you can't lie, this shit is feels unnecessarily hard.
@GavinFreeborn
@GavinFreeborn Жыл бұрын
Give me an idea of your current state. Do you have eglot working and giving you error messages? Eglot for most languages shouldn't require any configuration. Install the lsp for that language(from your package manager), open a file, and type M-x eglot. C-M-i should provide completions even in the default emacs setup.
@p99chan99
@p99chan99 11 ай бұрын
@@GavinFreebornmanaged to get it working at the end!
@theodorealenas3171
@theodorealenas3171 2 жыл бұрын
Hi, I'm keeping notes for when I get more into Emacs, and I'm a little confused. My first thought was that these are packages of language servers but that's obviously ridiculous. However if they were just the menu UI, then why would they deprecate? So what are they. What am I giving up on by choosing one over another
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
When I say depreciate I was more refering to framework style solutions that do their own thing rather than trying to leverage native features. If they do their own thing then all it takes is the project to fall out of the interest of others. These all don't really have that problem however this is very common on the vim side of the pond since few actually try to leverage omnicomplete (built in way to do smart code completion) and instead treat it as an after thought.
@herrpez
@herrpez 2 жыл бұрын
@@GavinFreeborn The word you are looking for is not "depreciate", which means decrease in value.
@jeffspaulding9834
@jeffspaulding9834 2 жыл бұрын
@@herrpez Depreciate has a different meaning when applied to code. It means to discourage the use of. Software changes over time, and often there will be parts of the software that are no longer developed. The developers usually want to remove these parts, but other software relies on them. So they'll depreciate it - which is their way of saying, "This still works for now, but you need to stop using it because it will be going away eventually." Emacs itself has quite a few depreciated functions - some that have been depreciated for decades - but that's because the Emacs developers really don't like removing functionality that people might rely on. Gavin's not using it completely correctly here - he's talking about bit rot (projects that are no longer maintained don't keep up with changes in Emacs and other packages and slowly become more and more incompatible with everything), but it's close enough that you can understand his meaning.
@herrpez
@herrpez 2 жыл бұрын
@@jeffspaulding9834 Sorry, but no. The term is "deprecate". The spelling is very similar, but the pronunciation and meaning are very different.
@jeffspaulding9834
@jeffspaulding9834 2 жыл бұрын
Theodore: completion is actually several different tasks chained together. You need completion sources to offer possible completions, you need to decide which sources to use, and you need to have a user interface to offer those completions to the user. What's confusing for people new to Emacs is that these are done in separate packages. Sources could be language-specific (semantic, irony-mode, SLIME, geiser, etc.), multilanguage (lsp-mode, ycmd, etags/rtags/etc.), or general-purpose (dabbrev, ispell, etc.). Sometimes the sources are set up by the major mode, sometimes they're not, and sometimes you'll want to change the defaults. The front end (autocomplete, company, etc.) plugs into those sources and may provide additional sources of its own. It's not very intuitive, but it's insanely powerful. Often you'll find that just turning on something like company-mode gives you what you want; if not, it's useful to look at other people's configurations and tweak them to your liking. There's a bazillion blog posts out there and tons of people have their init.el up on github/gitlab/gitwhatever. It's also worthwhile to note that this video only covered completion at point - i.e. completion at the point where your cursor is. There is also minibuffer completion, which is where you'll see packages like ido, ivy, helm, etc.
@burgerkino
@burgerkino Жыл бұрын
What font do you use
@gassechen
@gassechen 2 жыл бұрын
Hola. Tus vídeos son geniales. Podrías hablar un poco más pausado para los no hablantes nativos de inglés? Gracias
@matsmcmats
@matsmcmats 2 жыл бұрын
Set the playback speed to 0.75? (:
@markpi2350
@markpi2350 2 жыл бұрын
nice video
@konrad1977
@konrad1977 2 жыл бұрын
Which mode-line package are you using?
@GavinFreeborn
@GavinFreeborn 2 жыл бұрын
I just use my own custom one. You can find it in my config
@DaveRoberts308
@DaveRoberts308 Жыл бұрын
I’m not sure I know what “native” means in the context of Emacs. Except for low-level buffer routines, almost everything else is written in Lisp.
@alrightsquinky7798
@alrightsquinky7798 11 ай бұрын
By “native” he means features that are part of core Emacs, not a third-party plugin. Has nothing to do with native code.
@dantheshadowgamesyt3636
@dantheshadowgamesyt3636 2 жыл бұрын
Emacs is awesome, but it lacks a good editor.
@larrasket
@larrasket 2 жыл бұрын
lol
@GreyDeathVaccine
@GreyDeathVaccine 2 жыл бұрын
Dad joke :D
@jeffspaulding9834
@jeffspaulding9834 2 жыл бұрын
That's what evil-mode is for :)
@JariAalto
@JariAalto 11 ай бұрын
Unfortunately the pace of the video is extremely fast, practically unfollowable. A much more slower speaking, typing and overall presentation would be more instructive.
6 Months of Testing C++ Build Systems: Here’s What You Need to Know
16:33
5 Reasons You Should Use Emacs (And 1 Reason Why You Shouldn't)
15:56
The Linux Cast
Рет қаралды 38 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
It works #beatbox #tiktok
00:34
BeatboxJCOP
Рет қаралды 41 МЛН
Adding Visual Variety to my Indie Game!
11:17
BenBonk
Рет қаралды 6 М.
Why Are Lisp Macros So Great!?
16:28
Gavin Freeborn
Рет қаралды 17 М.
Emacs 💜 LaTeX
14:13
karthink
Рет қаралды 8 М.
Emacs 30 Built-in Completion UI & Styles Overview
5:14
Thanos Apollo
Рет қаралды 1,1 М.
I tried 10 code editors
10:28
Fireship
Рет қаралды 3,3 МЛН
What Are The Benefits Of Emacs Over Vim?
29:44
DistroTube
Рет қаралды 185 М.
Every LLM in Emacs, with gptel
17:56
karthink
Рет қаралды 19 М.
Emacs 29 released!
12:29
Brent Westbrook
Рет қаралды 10 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН