Python Configuration for Emacs 29

preview_player
Показать описание
In this video, I extend my config from the first Emacs 29 video to build a full Python development environment. I use the built-in eglot and tree-sitter packages to interface with pylsp and provide nice syntax highlighting and also show how you can reformat your code, get linter hints, control your conda environment and more!

Time stamps
00:00:00 Introduction
00:01:42 Installing Python grammar
00:03:11 company-idle-delay and company-minimum-prefix-length
00:04:07 Installing pylsp
00:06:19 Testing out the LSP
00:07:27 conda package
00:08:37 highlight-indent-guides-mode
00:09:35 Adding melpa as a package repository
00:13:04 Binding compiling and formatting
00:14:42 Adding a linter
00:15:39 Bonus eglot keybindings and desktop-save-mode
Рекомендации по теме
Комментарии
Автор

This video is really what I was looking for... Thank you very much!!

deedend
Автор

You should be able to use `eglot-managed-mode-hook` to turn on company

dpassen
Автор

Thank you for this video. I use elpy package which unfortunately isn't maintained/updated anymore. However it has autopep8 which automatically formats Python code to conform to the PEP 8 style guide. Does the package you suggest do the same based on PEP 8?

myyouaccounttube
Автор

Hello Brent, one thing that has kept me using neovim is the autocompletion.
I wanted to configure company to show me lsp suggestions then followed by buffer suggestions ( words inside all the opened buffers). Couldn't get this kinda company setup

shubhampawar
Автор

@bwestbro You were not able navigate up and down in the company-mode popup @6:36 .
What was the reason for that?
What did u do instead to get that gray, inline completion proposal?

netom
Автор

Cool Deal .. Thank You for sharing .. Cheers :)

VorpalForceField
Автор

Hey brent, how did you get your company work out-of-box with python ?

batuurdor
Автор

The last thing that keeps me stuck on nvim is that I still haven't found any working recipe for configuring tree-sitter support in multi-mode like vue-mode or svelte (web-mode/mmm-mode). Anyway, great video!

angry-penguin
Автор

This is really cool. I am doing something very wrong and do not seem to truly get any functionality out of eglot even though it proudly expresses in the mini buffer that it's connected to the LSP. Could you please paste your working config or the relevant Python Treesitter/Company sections of it somewhere online so I can inspect what I'm doing wrong? Thank you!

HarishNarayanan
Автор

Hi, I am new to emacs and I learn a lot from your videos. One question: when I compile a python file the compile buffer opens horizontally and not vertically as in your videos. How can I change that? Thank you very much!

vivaneret
Автор

Bro just use vscode, everything that you did in 2 videos, can be done in vscode in 1 minutes

cycomkid