From 26f179cc6d82f3dfafa51fbf8ecf57446cb26b57 Mon Sep 17 00:00:00 2001 From: Nik Revenco <154856872+nik-rev@users.noreply.github.com> Date: Sun, 2 Mar 2025 13:19:27 +0000 Subject: [PATCH] docs: add instruction on how to disable various warnings and annoyances when using language servers --- docs/source/installation.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/source/installation.rst b/docs/source/installation.rst index 3c2b4e4c09..d0d4950acb 100644 --- a/docs/source/installation.rst +++ b/docs/source/installation.rst @@ -121,6 +121,27 @@ of the animation inside the editor. The extension can be installed through the This extension is not officially maintained by the Manim Community. If you run into issues, please report them to the extension's author. +If you are using an editor such as `Helix `__ and you rely on language servers, you may get face several annoyances. + +The language server will complain about the wildcard import, and every time a variable is referenced from manim you will get a warning such as: Scene may be undefined, or defined from star imports + +Additionally, when items from Manim are autocompleted, the language server may automatically import items from Manim even though Manim is imported via a glob import. + +To fix the issues above, you will need to configure your language server to disable automatic import on completion. For Helix, this would be for example: + +.. code-block:: toml + + [language-server] + pyright = { command = "pyright-langserver", args = [ + "--stdio", + ], config = { "python.analysis.autoImportCompletions" = false } } + +To disable the warnings around star imports, modify your :code:`pyproject.toml` file: + +.. code-block:: toml + + [tool.ruff] + ignore = ["F403", "F405"] Installation for developers ***************************