Open PyDataBlog opened 2 weeks ago
Hi, thanks for the feedback. Could you try setting the log level to debug, running that again and pasting the logs here? Will try looking into this asap.
Hi, thanks for the feedback. Could you try setting the log level to debug, running that again and pasting the logs here? Will try looking into this asap.
Unfortunately, any attempt to add anything to the setup option leads to this error:
Error 10:00:57 notify.error lazy.nvim Failed to run `config` for pymple.nvim
...br/.local/share/nvim/lazy/pymple.nvim/lua/pymple/log.lua:140: attempt to index local 'fp' (a nil value)
# stacktrace:
- /pymple.nvim/lua/pymple/log.lua:140 _in_ **info**
- /pymple.nvim/lua/pymple/init.lua:33 _in_ **setup**
- /pymple.nvim/lua/pymple/init.lua:60 _in_ **setup**
- lua/custom/plugins/python/pymple-nvim.lua:13 _in_ **config**
I only get to the sed error if I disable setup options:
return {
"alexpasmantier/pymple.nvim",
ft = { "python", "markdown" },
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
-- optional (nicer ui)
"stevearc/dressing.nvim",
"nvim-tree/nvim-web-devicons",
},
build = ":PympleBuild",
config = function()
require("pymple").setup({
-- keymaps = {
-- -- Resolves import for symbol under cursor.
-- -- This will automatically find and add the corresponding import to
-- -- the top of the file (below any existing doctsring)
-- resolve_import_under_cursor = {
-- desc = "Resolve import under cursor",
-- keys = "<leader>li", -- feel free to change this to whatever you like
-- },
-- },
-- update_imports = {
-- -- the filetypes on which to run the update imports command
-- -- NOTE: this should at least include "python" for the plugin to
-- -- actually do anything useful
-- filetypes = { "python", "markdown" },
-- },
-- -- options for the add import for symbol under cursor feature
-- add_import_to_buf = {
-- -- whether to autosave the buffer after adding the import (which will
-- -- automatically format/sort the imports if you have on-save autocommands)
-- autosave = true,
-- },
-- -- python options
-- python = {
-- -- the names of root markers to look out for when discovering a project
-- root_markers = { "pyproject.toml", "setup.py", ".git", "manage.py" },
-- -- the names of virtual environment folders to look out for when
-- -- discovering a project
-- virtual_env_names = { ".venv" },
-- },
-- -- logging options
-- logging = {
-- -- whether to log to the neovim console (only use this for debugging
-- -- as it might quickly ruin your neovim experience)
-- console = {
-- enabled = false,
-- },
-- -- whether or not to log to a file (default location is nvim's
-- -- stdpath("data")/pymple.vlog which will typically be at
-- -- `~/.local/share/nvim/pymple.vlog` on unix systems)
-- file = {
-- enabled = true,
-- -- the maximum number of lines to keep in the log file (pymple will
-- -- automatically manage this for you so you don't have to worry about
-- -- the log file getting too big)
-- max_lines = 1000,
-- path = "~/.local/share/nvim/pymple.vlog",
-- },
-- -- the log level to use
-- -- (one of "trace", "debug", "info", "warn", "error", "fatal")
-- level = "debug",
-- },
})
end,
}
I'm guessing you're on a windows machine, and pymple currently only supports MacOS and Linux.
You can check https://github.com/alexpasmantier/pymple.nvim/issues/48 if you want to give it a try. Otherwise I might take the subject in the following week if I find the time to do so.
I'm guessing you're on a windows machine, and pymple currently only supports MacOS and Linux.
You can check #48 if you want to give it a try. Otherwise I might take the subject in the following week if I find the time to do so.
I am using WSL on Windows so it's running on Ubuntu 22.04. So shouldn't be an issue. sed is even installed already
edit: I uninstalled the plugin and reinstalled, closed neovim multiple times and the problem seemed to fix itself.
Then I had an issue with it not being able to find the fd binary.
fix: ln -s $(which fdfind) ~/.local/bin/fd
I'm running Debian Sid and have the same issue.
[INFO Mon 07 Oct 2024 08:56:29 AM EDT] ...n/.local/share/nvim/lazy/pymple.nvim/lua/pymple/init.lua:34: --- NEW PYMPLE SESSION ---
[INFO Mon 07 Oct 2024 08:56:29 AM EDT] ...n/.local/share/nvim/lazy/pymple.nvim/lua/pymple/init.lua:35: --------------------------------------------------------------
[INFO Mon 07 Oct 2024 08:56:29 AM EDT] .../.local/share/nvim/lazy/pymple.nvim/lua/pymple/hooks.lua:80: Found neo-tree installation, hooking up events
[INFO Mon 07 Oct 2024 08:56:29 AM EDT] ...n/.local/share/nvim/lazy/pymple.nvim/lua/pymple/init.lua:61: Pymple setup complete
[INFO Mon 07 Oct 2024 08:56:37 AM EDT] .../.local/share/nvim/lazy/pymple.nvim/lua/pymple/utils.lua:328: Installing gg...
[INFO Mon 07 Oct 2024 08:56:37 AM EDT] .../.local/share/nvim/lazy/pymple.nvim/lua/pymple/utils.lua:328: gg installed successfully
[INFO Mon 07 Oct 2024 08:56:37 AM EDT] .../.local/share/nvim/lazy/pymple.nvim/lua/pymple/utils.lua:328: Installing sed/gsed...
[ERROR Mon 07 Oct 2024 08:56:37 AM EDT] .../.local/share/nvim/lazy/pymple.nvim/lua/pymple/utils.lua:320: Failed to install sed. Try installing it manually.
[INFO Mon 07 Oct 2024 08:57:09 AM EDT] .../.local/share/nvim/lazy/pymple.nvim/lua/pymple/utils.lua:328: Installing gg...
[INFO Mon 07 Oct 2024 08:57:09 AM EDT] .../.local/share/nvim/lazy/pymple.nvim/lua/pymple/utils.lua:328: gg installed successfully
[INFO Mon 07 Oct 2024 08:57:09 AM EDT] .../.local/share/nvim/lazy/pymple.nvim/lua/pymple/utils.lua:328: Installing sed/gsed...
[ERROR Mon 07 Oct 2024 08:57:09 AM EDT] .../.local/share/nvim/lazy/pymple.nvim/lua/pymple/utils.lua:320: Failed to install sed. Try installing it manually.
return {
{
"alexpasmantier/pymple.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
-- optional (nicer ui)
"stevearc/dressing.nvim",
"nvim-tree/nvim-web-devicons",
},
build = ":PympleBuild",
opts = {
keymaps = {
resolve_import_under_cursor = {
desc = "Resolve import under cursor",
keys = "<leader>ci",
},
},
logging = {
level = "debug",
},
},
},
}
I believe the problem comes from here which obviously needs to change in order to take into account various distributions and corresponding package managers.
In the meantime, I believe installing sed manually should work?
I believe the problem comes from here which obviously needs to change in order to take into account various distributions and corresponding package managers.
In the meantime, I believe installing sed manually should work?
Package works fine with the sed installed already so just the build error inconvenience.
When running
PympleBuild
I encountered these errors withsed
even though it's installed:Here's the logs:
and the checkhealth report:
It seems to have installed the hooks now. Any idea what is going on? BTW Thanks for this amazing idea. Exactly what was missing with python nvim integration