   (when (and (buffer-file-name)
              (derived-mode-p 'python-mode))
     (let* ((buf-file (buffer-file-name))
-           (root (and (functionp 'projectile-acquire-root)
-                      (projectile-acquire-root (file-name-directory buf-file)))))
+           (root (and (functionp 'projectile-project-root)
+                      (projectile-project-root (file-name-directory buf-file)))))
 
       (when (and root
                  (not (seq-some (lambda (buf)

            (lambda ()
              (add-hook 'before-save-hook 'gofmt-before-save nil 'local)
              (with-eval-after-load 'lsp-mode
                (add-hook 'lsp-managed-mode-hook
                          (lambda ()
                            (if lsp-managed-mode
                                (progn
                                  (setq-local lsp-enable-indentation t
                                              lsp-enable-on-type-formatting t)
                                  (remove-hook 'before-save-hook 'gofmt-before-save 'local)
                                  (add-hook 'before-save-hook 'lsp-go-format-buffer nil 'local))
                              (kill-local-variable 'lsp-enable-indentation)
                              (kill-local-variable 'lsp-enable-on-type-formatting)

(use-package lsp-pyright
  :after (lsp-mode)
  :config
  (add-hook 'python-mode-hook
            (lambda ()
              (when (python-use-poetry-p)
                (setq-local lsp-pyright-python-executable-cmd (concat (python-poetry-virtualenv-path) "/bin/python"))
                (setq-local lsp-pyright-venv-path (python-poetry-virtualenv-path)))))

  (let ((client (gethash 'pyright lsp-clients)))
    (setf (lsp--client-major-modes client) nil)
    (setf (lsp--client-activation-fn client)
