Greetings, so I installed manim via uv. after some dust it seems to work. now I setup my LSP config within nvim which looks like this:
vim.lsp.config("ruff", {
init_options = {
settings = {
-- Ruff language server settings go here
},
},
})
require("conform").setup({
formatters_by_ft = {
python = {
-- To fix auto-fixable lint errors.
"ruff_fix",
-- To run the Ruff formatter.
"ruff_format",
-- To organize the imports.
"ruff_organize_imports",
},
},
})
require("lint").linters_by_ft = {
python = { "ruff" },
}
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("lsp_attach_disable_ruff_hover", { clear = true }),
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client == nil then
return
end
if client.name == "ruff" then
-- Disable hover in favor of Pyright
client.server_capabilities.hoverProvider = false
end
end,
desc = "LSP: Disable hover capability from Ruff",
})
vim.lsp.enable("ruff")
return {
-- Manim oder so
}
the LspInfo says ruff and pyright is running. unfortunatly i get some errors from the LSP that manim wasnt imported, but if i run my minimalscript, it works as intended.
โโด๏ฑ `from manim import *` used; unable to detect undefined names Ruff (F403) [1, 1]
โโด๏ฑ `Scene` may be undefined, or defined from star imports Ruff (F405) [4, 20]
โโด๏ฑ `Circle` may be undefined, or defined from star imports Ruff (F405) [6, 18]
โโด๏ฑ `PINK` may be undefined, or defined from star imports Ruff (F405) [7, 25]
โโด๏ฑ `Create` may be undefined, or defined from star imports Ruff (F405) [8, 19]
does anyone know how to import it directly? do i have to add the manim path in my config?
thanks in advance!