nvim: HACK Fix quarto running magma session
With the new lazy loaded plugin structure, Magma would not start correctly. This commit simply removes the lazy designation for Magma, Quarto and the Jupyter attachments. It also uses the python environment detection utility to set the correct python executable on entering a quarto file (if there exists a virtual environment for the project).
This commit is contained in:
parent
dc3b2cf12e
commit
dc86bf3989
2 changed files with 5 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
||||||
-- Start quarto session
|
-- Start quarto session
|
||||||
local startsession = function(file, args)
|
local startsession = function(file, args)
|
||||||
|
local path, _ = require("util").get_python_venv()
|
||||||
|
vim.g["python3_host_prog"] = path
|
||||||
file = file or "/tmp/jupyter-magma-session.json"
|
file = file or "/tmp/jupyter-magma-session.json"
|
||||||
if args then
|
if args then
|
||||||
file = args[0]
|
file = args[0]
|
||||||
|
|
|
@ -18,6 +18,7 @@ return {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
lazy = false,
|
||||||
ft = "quarto",
|
ft = "quarto",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@ return {
|
||||||
desc = "Inspect object in kernel",
|
desc = "Inspect object in kernel",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
lazy = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
-- REPL work
|
-- REPL work
|
||||||
|
@ -51,5 +53,6 @@ return {
|
||||||
"MagmaRestart",
|
"MagmaRestart",
|
||||||
},
|
},
|
||||||
ft = { "quarto", "python" },
|
ft = { "quarto", "python" },
|
||||||
|
lazy = false,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue