wookayin / semshi

🌈 Semantic Highlighting for Python in Neovim
82 stars 5 forks source link

Error on python3.12 #21

Closed kobzar closed 3 months ago

kobzar commented 6 months ago

I am use python3.12 [] neovim-0.9.5_1 Fork of Vim aiming to improve user experience, plugins and GUIs [] python3-neovim-0.5.0_1 Python3 client for Neovim

When i open PY file with system python i info message that semshi support only python 3.6-3.11

But if i opeb file with .venv semshi dont stop to loop of errors

Error detected while processing BufWipeout Autocommands for "*"..function semshi#buffer_wipeout[5]..BufWipeout Autocommands for "*"..function semshi#buffer_wipeout[2]..FuncUndefined Autocommands for "SemshiBufWipeout"..function remote#define#FunctionBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require[12]..provider#Poll:
line   17:
E605: Exception not caught: Failed to load python3 host. You can try to see what happened by starting nvim with $NVIM_PYTHON_LOG_FILE set and opening the generated log file. Also, the host stderr is available in messages.
BufWipeout Autocommands for "*"..function semshi#buffer_wipeout[2]..FuncUndefined Autocommands for "SemshiBufWipeout"..function remote#define#FunctionBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require[12]..provider#Poll, line 6
Vim(let):E475: Invalid value for argument cmd: '' is not executable
Error detected while processing BufWipeout Autocommands for "*"..function semshi#buffer_wipeout[5]..BufWipeout Autocommands for "*"..function semshi#buffer_wipeout[2]..FuncUndefined Autocommands for "SemshiBufWipeout"..function remote#define#FunctionBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require[12]..provider#Poll:
line   17:
E605: Exception not caught: Failed to load python3 host. You can try to see what happened by starting nvim with $NVIM_PYTHON_LOG_FILE set and opening the generated log file. Also, the host stderr is available in messages.
BufWipeout Autocommands for "*"..function semshi#buffer_wipeout[2]..FuncUndefined Autocommands for "SemshiBufWipeout"..function remote#define#FunctionBootstrap[1]..remote#host#Require[10]..provider#pythonx#Require[12]..provider#Poll, line 6
Vim(let):E475: Invalid value for argument cmd: '' is not executable

This is my standart config for LazyVim

return {
  -- "numiras/semshi",
  "wookayin/semshi", -- use a maintained fork
  ft = "python",
  build = ":UpdateRemotePlugins",
  init = function()
    -- Disabled these features better provided by LSP or other more general plugins
    vim.g["semshi#error_sign"] = false
    vim.g["semshi#simplify_markup"] = false
    vim.g["semshi#mark_selected_nodes"] = false
    vim.g["semshi#update_delay_factor"] = 0.001

    -- This autocmd must be defined in init to take effect
    vim.api.nvim_create_autocmd({ "VimEnter", "ColorScheme" }, {
      group = vim.api.nvim_create_augroup("SemanticHighlight", {}),
      callback = function()
        -- Only add style, inherit or link to the LSP's colors
        vim.cmd([[
            highlight! semshiGlobal gui=italic
            highlight! link semshiImported @none
            highlight! link semshiParameter @lsp.type.parameter
            highlight! link semshiParameterUnused DiagnosticUnnecessary
            highlight! link semshiBuiltin @function.builtin
            highlight! link semshiAttribute @field
            highlight! link semshiSelf @lsp.type.selfKeyword
            highlight! link semshiUnresolved @lsp.type.unresolvedReference
            highlight! link semshiFree @none
            ]])
      end,
    })
  end,
}

And the same with default config from sample.

wookayin commented 3 months ago

For python 3.12, please use the (master) version.