19 ms·
Building an Intelligent Emacs
- NateEag 5y agoI haven't tried it out, as I've long been more of a logging-driven debugger, but there's an analogous tool for debuggers called dap-mode: https://emacs-lsp.github.io/dap-mode/ https://emacs-lsp.github.io/dap-mode/ Like lsp-mode, it is also built on top of an open standard from Microsoft, the Debug Adapter Protocol: https://microsoft.github.io/debug-adapter-protocol/ https://microsoft.github.io/debug-adapter-protocol/
- benreesman 5y agoYou might be able to save me some research on this: can DAP drive GDB/LLDB in a seamless way without VSCode as a front-end? GDB has always felt like a time machine back to 1987 at best, `pwndbg` is like a big upgrade on GDB usability against that baseline. Sidebar: `pwndbg` is extremely easy to build and install and makes terminal GDB suck mucho less, but would be no match for an LSP-style integration that didn't have a ton of rough edges.
- isaiahg 5y agoAh thank you for this, I ran across pwndbg some months back and I've been trying to find it again since.
- NateEag 5y agoI'm not sure. I can see that this extension claims to make debugging with GDB work in VS Code: https://github.com/WebFreak001/code-debug https://github.com/WebFreak001/code-debug and that at least for emacs there exists a plugin to use that extension: https://github.com/emacs-lsp/dap-mode/blob/master/dap-gdb-lldb.el https://github.com/emacs-lsp/dap-mode/blob/master/dap-gdb-ll... Not having tried it, I can't speak to how well it works, and I don't know if there are adapters for other editors.
- b3morales 5y agoIf you're asking because you want to use LLDB or GDB inside Emacs, the RealGUD project is a good option: https://github.com/realgud/realgud https://github.com/realgud/realgud
- dleslie 5y agoTLDR: lsp-mode is the future of emacs.
- gumby 5y agoOnly for code development, unless I suppose there's an lsp-mode for TeX, for autocorrection when sending mail or writing random documents, etc. Which I suppose is only a matter of time. Edit: typo lsp
- Jtsummers 5y agohttps://github.com/latex-lsp/texlab https://github.com/latex-lsp/texlab No clue how good it is, but it does exist and it's not the only one.
- dleslie 5y ago> unless I suppose there's an lip-mode for TeX https://emacs-lsp.github.io/lsp-mode/page/lsp-latex/ https://emacs-lsp.github.io/lsp-mode/page/lsp-latex/ > for autocorrection when sending mail or writing random documents Complete-at-point is integrated with company-mode, of which I use lsp as a backend to serve suggestions. So ... In a way, yes, I do get spelling suggestions through the same mechanism that lsp works.
- p4bl0 5y agoEven if there is an LSP server for (La)TeX, will it ever be better than AucTeX already is? I think for a languages like Python, LSP servers are interesting but for some other languages the existing tools are already very powerful: OCaml with merlin comes to mind for example. That said, the LSP approach is nice and makes many editors able to profit from each language server :).
- User23 5y agoOr Common Lisp with SLIME or Sly.
- deleted 5y ago[deleted]
- __mharrison__ 5y agoThe Python lsp backend (using pyright) is really nice. I used it when I was tracking every error I made when coding the Advent of Code recently. It was interesting to create "modern" Python using types and see what errors it would catch.
- benreesman 5y agoI've tried a few of the Python LSPs, but not `pyright`. Given the upfront cost of getting either `eglot` or `lsp-mode` to play nice with a new backend I'd really benefit from a TLDR on the cost/benefit. I tend to just say fuck it and use the Jedi backend even though it's far from precise. What sets `pyright` apart? As it happens I'm reworking my dots at the moment and I'd like to capture the point-in-time SOTA while I'm at it.
- ReleaseCandidat 5y ago> What sets `pyright` apart? It works with Emacs (but I didn't try the fork of Palantir). I didn't have much problems setting up LSP clients with lsp-mode, didn't take much time. My .emacs: https://github.com/Release-Candidate/Emacs https://github.com/Release-Candidate/Emacs
- benreesman 5y agoThank you!
- wadim 5y agoDoom[0] (and Spacemacs probably too) supports lsp-mode quite well and it mostly works out of the box - for some languages more than others. As someone who only recently started using emacs it's been a great experience. [0] https://github.com/hlissner/doom-emacs https://github.com/hlissner/doom-emacs
- benreesman 5y agoI've never had much luck with Doom or Spacemacs. It's probably at least 6 months since I gave them a drive but I vaguely recall them being pretty oriented around the subject-matter files being on the local filesystem, and in fairness that's a pretty reasonable assumption for a lot of users. As much as I like full-color and other local-emacs niceties, I've long since knuckled under to the fact that usually my local appliance is unlikely to either complete my builds in a reasonable timeframe and/or have cuDNN properly configured. Does either Doom or Spacemacs in fact run well under e.g. `tmux` on a heavy box somewhere? It might have been the case that I missed it last time I looked, it might be the case that one or both have since added that as a use case, or some other thing.
- chaosite 5y agoI usually use tramp or something with my local emacs to control a remote box. Multiple remote boxes, actually.
- benreesman 5y agoThat's interesting, I haven't used `tramp` seriously in awhile (ditto `sshfs` etc.) How do you find the experience of running the build remotely but getting error messages in a local buffer, or running `git-grep` when LSP pukes for whatever reason, or any of the other stuff that is fairly straightforward when emacs is on the same box as the source and build tools? I don't ask out of snark: I'd friggin love to host emacs on my appliance and seamlessly interact with the real machine, and I gather VSCode has a pretty solid story on this, but I've failed to get that result enough times with emacs that I sort of timed out on it. If you have e.g. dots on github or whatever that make this fly well I'd love to test-drive it.
- nshm 5y agoSpeech input with something like Vosk is a great idea too.
- georgeoliver 5y agoI'm pro-lsp, but comparing Emacs unfavorably to other tools "out-of-the-box" is like complaining that your LEGO set doesn't come pre-assembled.
- deleted 5y ago[deleted]
- deleted 5y ago[deleted]
- SkeuomorphicBee 5y agoI disagree, Emacs customization is a means to an end, to get your personal perfect editor so you can better do the objective: editing texts. Customizing Emacs is not fun (for most of us), is not building Lego, it is a chore we have to go tru to get to the good part that is having a perfectly tuned editor to work with. Having a sane default out-of-the-box-experience wouldn't detract from the Emacs experience, and it is something that is missed. But then, I'm suspect to talk, I left Emacs almost two decades ago and never looked back, and among other reasons, it was exactly because it was so crappy "out-of-the-box", so every new computer I had to use meant always having to deal with that.
- comfrey 5y agoI left a decade ago and came back using doom and have gained a new respect for both emacs and lisp. Having such a configurable tool is an invitation to the subtle with an attention to detail. Free Software is so far away from the mainstream consumer culture and it provides an immeasurable value to those who invest.
- User23 5y agoHow many other programs that you stopped using two decades ago are still going strong with thriving communities?
- olau 5y agoI think they're going in the direction of having things enabled by default. It just takes time. The default experience of Emacs these days is far from the experience 20 years ago.
- evolve2k 5y agoFor those coming from say VS Code is there an opinionated “flavor” of Emacs that comes pre-configured with batteries and everything included. A place to test drive it’s power and use of as a daily driver before being confident to properly “roll your own”. Curious.
- forty 5y agoI use Doom Emacs, it's great.
- BoysenberryPi 5y agoDoom Emacs and Spacemacs are the most popular two. I recommend Doom Emacs although Spacemacs is what I started with and I find it to be more user friendly.
- circuit 5y agoYes. There are two major "flavors" I know of: 1. doom-emacs and 2. spacemacs I've only tried spacemacs and after a brief stint with it I was able to roll my own init.el by use-package'ing the things I liked and tinkering with it. glhf 1 https://github.com/hlissner/doom-emacs https://github.com/hlissner/doom-emacs 2 https://github.com/syl20bnr/spacemacs https://github.com/syl20bnr/spacemacs
- yewenjie 5y agohttps://github.com/emacs-tw/awesome-emacs#starter-kit https://github.com/emacs-tw/awesome-emacs#starter-kit
- dhosek 5y agoOn the Mac, I recommend Aquamacs. It has many of the most popular packages pre-installed.
- trenchgun 5y agoIs there a reason to use it over Doom?
- 5y ago
- tacoluv 5y agothat looks pretty
- ElD0C 5y agoOfftopic, but... that theme is gorgeous! Does anybody know its name?
- NhanH 5y agoThat seems to be moonlight theme on doom emacs
- hprotagonist 5y agolooks like https://github.com/doomemacs/themes/tree/screenshots#doom-one https://github.com/doomemacs/themes/tree/screenshots#doom-on...
- User23 5y agoSpeaking of gorgeous themes I’m going to boost Mr. Rougier’s excellent work: https://github.com/rougier/nano-emacs https://github.com/rougier/nano-emacs. The rest of his portfolio is also well worth a look.
- adithyak 5y agooff topic: I've found tide-mode[0] to be pretty good to use with typescript on Emacs [0] https://github.com/ananthakumaran/tide https://github.com/ananthakumaran/tide
- throwanem 5y agoIt's very good, but I've found it to struggle somewhat on large and complex codebases. I have been meaning to try lsp-mode instead, but have yet to get around to it since tide-mode is mostly good enough; since they both use tsserver as a backend, I expect the user experience is probably much the same. As an aside, I don't recommend following the article author in disabling Eldoc integration. Enabled, that will give you types for the thing at point in the message area, which is often quite useful and especially so with unfamiliar codebases.
- newusertoday 5y agoi have stopped using lsp with javascript as js lsp servers are memory/cpu hogs. I wish there was tag based system for js/ts
- G3rn0ti 5y agoWell, with Emacs you can als just use „etags“ to create an index into your JS code base out of the box. And then use „M-.“ to jump to definitions. It’s very fast and usually brings you right to a definition — unless your method/function is called very unspecifically.
- newusertoday 5y agointeresting, i used to use gtags for browsing c but js required additional dependencies so i abandoned it. If you are using etags for js/ts can you point me to your tag syntax file? i checked here but couldn't find js/ts and i don't want to write it by myself ;-) https://www.gnu.org/software/emacs/manual/html_node/emacs/Tag-Syntax.html https://www.gnu.org/software/emacs/manual/html_node/emacs/Ta...
- hestefisk 5y agoWhat’s the experience like? From memory Emacs is single threaded so curious how it performs with external IO async.
- taeric 5y agoI've never understood this criticism. Elisp is single threaded. Emacs has long had async capabilities with process buffers and sentinel functions.
- philsnow 5y agoUX depends heavily on the quality of the packages in your init.el; if a maintainer has gigabit fiber at home and writes their elisp to hit the network during `(interactive)` elisp, it's going to feel slow for people on worse connections. emacs/elisp aren't all that opinionated, there's lots of rope to shoot yourself in the foot with
- taeric 5y agoMy concern is that this will remain the case, even when Elisp goes multi threaded. Such that most concerns won't really change, at all.
- hestefisk 5y agoGot it, thanks for clarifying. It was not a criticism, merely curiosity. :) I used to use Emacs back in the late 90es; since then I have mainly used vi in various permutations.
- taeric 5y agoApologies if my post came off as harshe. I see this critique a lot, but it doesn't make sense to me. Especially since compilation mode has existed forever. I do grant that some things could use extra support for async, so it will be a welcome addition. But there is already a lot of capability today.
- 5y ago
- hnrj95 5y ago+1 for eglot. it just works. vibes well with core emacs (and therefore minimizes bloat, among other advantages)
- wanderingmind 5y agoThe org mode, a single mode for todo, notes and mindmaps is enough reason to learn Emacs
- grymoire1 5y agoI recall an interactive tutorial and practice tool that helped you learn emacs keybindings. It taught all of the previous/next character/word/expression/line key bindings. It helped develop muscle memory. It was web-based (I think), but I can't find it anywhere. Can anyone help?
- madmax96 5y agoYou can access it in Emacs itself with C-h t
- xaxaxb 5y agoI struggled to understand LSP in Emacs vs Vim and wanted something short and concise to help me understand. This article did that. Thanks author!