Hi,
I am trying to get a simple Python setup working in Emacs. I have gotten auto completion to work but not to the extent where it will add parenthesis, insert the arguments, and allow me to select between them. I believe this should work (requires integration with yasnippet?) since I can see on the bottom of Emacs that on completion Pyright provides the function information e.g. `import gc gc.collect` shows `(function) collect: (generation: int = ...) -> int`
init.el
(setq custom-file (concat user-emacs-directory "custom.el"))
(when (file-exists-p custom-file)
(load custom-file))
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-defer t
use-package-always-ensure t)
(use-package company
:hook (lsp-mode . company-mode)
:config
(global-company-mode))
(use-package flycheck
:init
(global-flycheck-mode))
(use-package lsp-mode
:commands (lsp lsp-deferred)
:init
(setq lsp-keymap-prefix "C-c l")
:config
(lsp-enable-which-key-integration t)
:hook
(python-mode . lsp-deferred))
(use-package lsp-pyright
:hook
(python-mode . (lambda ()
(require 'lsp-pyright)
(lsp-deferred))))
(use-package lsp-ui
:commands lsp-ui-mode)
(use-package python-mode)
(use-package which-key
:config
(which-key-mode))
(use-package yasnippet
:config
(yas-global-mode t))
(use-package yasnippet-snippets)