8 ms·
This is a very important release for LSP users, as Emacs now has a fast, C-based JSON parser that speeds up e.g. lsp-mode significantly.
by amake 6y ago
This is a very important release for LSP users, as Emacs now has a fast, C-based JSON parser that speeds up e.g. lsp-mode significantly.
- pandatigox 6y agoJust a quick question on this, what's the best way to emulate an ide in emacs? I feel so overwhelmed by the options, and the additional tools you have to install alongside it. For example, python ide in emacs alone requires pyflakes, autopep8, jedi and so on... What's the most catchall, generic ide system where I don't have to fiddle with the config too much?
- moonchild 6y agoI've heard good things about doom emacs and spacemacs; might be worth giving one of those a try.
- stjohnswarts 6y agoDoom Emacs is great an has more emphasis on performance and load time than Spacemacs
- john4532452 6y agoThe main idea of Emacs is unlike other ide's it can be customized greatly to specific users, but Doom Emacs seems to be a ready made configuration. It seems to be opposite of the main idea behind Emacs, yet Doom Emacs seems to be getting popular. Is there anything i am missing.
- smabie 6y agoYou're missing that a default vanilla Emacs experience is pretty shitty. Besides, it's not like you're sacrificing any customizability with Doom/Prelude/Spacemacs, you're just getting a better starting point.
- forty 6y agoMaybe many users don't need a very specific configuration, and a great community made configuration is good enough :) I use Spacemacs which is also a community made emacs configuration and it's great. The fact that I could have made the customization myself does not make this configuration any worse.
- contravariant 6y agoYou can consider doom emacs a 'mod' that make it easier to manage your customized emacs config. If anything I found doom to make it easier to stay close to the 'intended' way to customize emacs, since it heavily encourages you to use 'use-package' and 'general.el' to manage your extensions, and gives you good startup performance if you use them as intended (allowing the lazy-loading to do its work). Although it's possible I was simply more familiar with the 'right' way to do it when I moved to Doom from Spacemacs. Either way I got the impression it felt quite close to the way to manipulate 'native' emacs (but with a lot of sensible defaults that I couldn't be bothered to figure out myself).
- aasasd 6y agoI went with the ‘take vanilla and adjust’ route to learn proper Emacs config-ing. Turns out, you pretty much need to implement a bunch of features on top of the 90s Emacs to get a reasonable modern editor, and there isn't a system for config snippets that are smaller than a minor mode (aside from copy-pasting from StackOverflow). I've been meaning to try Doom for some time because it seems to be an answer to just that problem.
- vvillena 6y agoProjects like Doom Emacs and Spacemacs are frameworks. They contain lots of well-made, battle-tested code. They are extensible, too: they usually provide clear points for user extensions and customizations.
- zeendo 6y agoI think what you're missing is that Emacs might be a good fit for things other than "the main idea of Emacs" (whatever that is)
- skocznymroczny 6y agoBut can Doom Emacs run Doom?
- mijoharas 6y agoHere you go sir https://www.reddit.com/r/emacs/comments/f2c99b/you_can_play_doom_inside_emacs_using_eaf/ https://www.reddit.com/r/emacs/comments/f2c99b/you_can_play_...
- amake 6y agoTo my mind there are two camps of language support in Emacs: 1. Languages where people put a lot of effort into implementing bespoke support inside Emacs itself (as Elisp packages) 2. Languages where no one bothered to make Emacs-specific features, but are now supported quite well via LSP Python seems to be in the #1 camp, and that seems to be what you describe. The #2 camp, however, is superior in my experience, so I would suggest trying that instead. I haven't worked that much with Python for a while, but at one point I used lsp-mode and pyls and it seemed pretty good: https://emacs-lsp.github.io/lsp-mode/page/lsp-pyls/ https://emacs-lsp.github.io/lsp-mode/page/lsp-pyls/ You can also choose Microsoft's Python LSP server instead: https://emacs-lsp.github.io/lsp-python-ms/ https://emacs-lsp.github.io/lsp-python-ms/
- kqr 6y agoCategory 1 can be further subdivided into 1.1. Languages where people have written full parsers and analysers in Emacs Lisp. 1.2. Languages where the Emacs support relies on external programs to provide intelligence. Only very few languages (e.g. JavaScript) fall in subcategory 1.1.
- throwanem 6y agoUnfortunately, js2-mode's parser isn't updated to keep pace with modern language development. I've had much better results over the last year with an LSP integration, and rarely if ever go back to js2-mode these days. Similarly, while js2-mode's built-in formatter is quite good, Prettier is both more (and more easily) configurable and more shareable - it can enforce an agreed-upon style at the codebase level without any editor-specific tooling or configuration, and the consequent absence of bikeshedding is welcome.
- deleted 6y ago[deleted]
- brlewis 6y agoYeah LSP is taking over. I don't think category 1.1 is going to last.
- Myrmornis 6y agoI’d try eglot with pyls for python. (The pyls server is using Jedi).
- zucker42 6y agoI've had generally good experiences with spacemacs. JackOfSome on YouTube has good tutorials including one on using it for Python.
- ashton314 6y agoThis gets me basically everything that I need: - lsp-mode (IDE smartness) - company (completion pop up) - selectrum/ivy/helm (command awesomeness) - projectile (project management) - magit (greatest Git interface you will ever use)
- agumonkey 6y ago> greatest Git interface you will ever use I believe the amount of people disliking magit fits on one digit
- acdw 6y agoCould you share your selectrum/ivy/helm config or give me some tips? That's one part of Emacs config, in particular, that gives me the willies -- I can't figure out if I'm supposed to choose between ivy and helm or use them together or even really what the differences are between the two. I haven't even heard of selectrum, lol. That's one of the hardest parts of trying to config Emacs in general -- so many packages and they all seem to do the same thing and I think I need just one but sometimes people have like, all of them installed. It's confusing!
- ashton314 6y agoYou can find my config here: https://github.com/ashton314/.dotfiles https://github.com/ashton314/.dotfiles I use selectrum for just about everything. The only reason I keep ivy and counsel around as for the packages counsel-rg (ripgrip with real time results) and swiper. It is a very good question you ask. I have spent many months experimenting with these various packages. I actually wrote a blog post about switching from Helm to Ivy. I suppose I should write a follow up on about switching to Selrctrum. If you would like to talk more one on one, please DM me via one of the channels listed on my blog: https://ashton.wiersdorf.org/about/#contact https://ashton.wiersdorf.org/about/#contact
- dfinninger 6y agoI’ll parrot “Spacemacs” along with a few other here, but here are my two main reasons why: - Spacebar “leader” key. If you’re familiar with Vim, space is your leader key, and many functions lie behind it. - Layers. Spacemacs has a packaging system called “layers” that are a collection of curated Emacs packages. The great thing about layers is all the wiring the layer author has done. Many packages are condensed down to a one-line config. Just add “python” to the array of installed layers in your config file and it will install a lot of what you have above. There are a few config toggles (e.g., override the language server that is used by default), but they are pretty well documented in the Spacemacs docs. Also, use the Spacemacs develop branch! I’ve been on it for years. Master has not had many (any?) updates in a long time. If you do this make sure you are reading the docs for the develop branch when perusing layers online!
- forty 6y agoI use Spacemacs develop branch. I agree it's great, but it breaks things often. Once the next release is finally out (0.300 ?) I'll probably switch to master to have a more stable setup. Oh and if you are a security conscious user, you might not like the fact that Spacemacs downloads tons of code which might or might not have been reviewed by someone you can trust and might or might not have been signed...
- mijoharas 6y agoOut of interest, what have you had broken? I've been on develop for ages, and don't really remember many breakages, I do however only pull sporadically.
- forty 6y agoI cannot really say, very often even at launch something fails and initialization is not done properly, so for example projectile (which I use to switch projects) doesn't work. When it happens I simply revert to the previous commit that worked for me and wait a bit before pulling again
- bananaface 6y ago
- smabie 6y agoPython can never have a legit IDE because of the dynamic typing and OO, but LSP/company-mode/projectile/magit should get you on par with anything else, I'd imagine.
- ipv6ipv4 6y agoYou want to avoid fiddling, editing config files and chasing dependencies? Drop emacs and look elsewhere.
- anyfoo 6y agoNice. Is it a plug-in replacement? E.g. does eglot already make use of this, too, or will it need to be updated?
- ddavis 6y agoEglot will use the native C JSON parsing if Emacs is compiled with jansson support.
- jidiculous 6y agolsp-mode recommends the same on its guide for improving performance: https://emacs-lsp.github.io/lsp-mode/page/performance/ https://emacs-lsp.github.io/lsp-mode/page/performance/
- amake 6y agoI had to re-bytecode-compile lsp-mode to get it to pick up the faster JSON support (`M-x package-reinstall lsp-mode`). See `lsp-diagnose` for a quick way to check if you're good to go.
- anyfoo 6y agoThanks, but I'm using eglot. I might try lsp again, now that some time has passed, though.