neovim / nvim-lspconfig

Quickstart configs for Nvim LSP
Apache License 2.0
10.5k stars 2.07k forks source link

ruff language server is not turned off after quit #3134

Closed ShIRannx closed 5 months ago

ShIRannx commented 5 months ago

Description

the lsp will not be turned off after nvim quit. neovim version is 0.9.5 image

ShIRannx commented 5 months ago

the reson is that it's not the subprocess of nvim, imo. image

glepnir commented 5 months ago

https://github.com/neovim/nvim-lspconfig/blob/master/test/minimal_init.lua use this minimal test file for test and i can not reproduce.

ShIRannx commented 5 months ago

sry, i can not find the log file. image

mini_init.lua: image

glepnir commented 5 months ago

sry I mean test with nvim --clean -u minimal_init.lua not vusted. and the log is in :echo stdpath('log') not cache dir

ShIRannx commented 5 months ago

[START][2024-05-04 19:48:37] LSP logging initiated
[ERROR][2024-05-04 19:48:37] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/jedi-language-server"       "stderr"        'WARNING:pygls.protocol.json_rpc:Cancel notification for unknown message id "3"\n'
[ERROR][2024-05-04 19:48:37] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/jedi-language-server"       "stderr"        'WARNING:pygls.protocol.json_rpc:Cancel notification for unknown message id "5"\n'
[ERROR][2024-05-04 19:48:38] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/jedi-language-server"       "stderr"        'WARNING:pygls.protocol.json_rpc:Cancel notification for unknown message id "8"\n'
[START][2024-05-04 19:48:53] LSP logging initiated
[ERROR][2024-05-04 19:48:53] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/jedi-language-server"       "stderr"        'WARNING:pygls.protocol.json_rpc:Cancel notification for unknown message id "3"\n'
[ERROR][2024-05-04 19:48:53] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/ruff"       "stderr"        "   0.002427s DEBUG ruff_server::server No workspace(s) were provided during initialization. Using the current working directory as a default workspace...\n"
[ERROR][2024-05-04 19:48:53] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/ruff"       "stderr"        "   0.011783s WARN ruff_server::server LSP client does not support dynamic capability registration - automatic configuration reloading will not be available.\n"
[ERROR][2024-05-04 19:48:53] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/ruff"       "stderr"        "┐ruff_server::server::api::notifications::did_open::run{file=file:///private/tmp/helloworld.py}\n"
[ERROR][2024-05-04 19:48:53] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/ruff"       "stderr"        "├─   0.012153s   0ms INFO ruff_server::session::workspace::ruff_settings No ruff settings file (pyproject.toml/ruff.toml/.ruff.toml) found for /private/tmp/helloworld.py - falling back to default configuration\n"
[ERROR][2024-05-04 19:48:53] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/ruff"       "stderr"        "┘\n"
[ERROR][2024-05-04 19:48:54] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/jedi-language-server"       "stderr"        'WARNING:pygls.protocol.json_rpc:Cancel notification for unknown message id "5"\n'
[ERROR][2024-05-04 19:48:56] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/ruff"       "stderr"        "┐ruff_server::server::api::notifications::did_change::run{file=file:///private/tmp/helloworld.py}\n├─   2.554281s   0ms INFO ruff_server::session::workspace::ruff_settings No ruff settings file (pyproject.toml/ruff.toml/.ruff.toml) found for /private/tmp/helloworld.py - falling back to default configuration\n┘\n"
[ERROR][2024-05-04 19:48:56] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/jedi-language-server"       "stderr"        'WARNING:pygls.protocol.json_rpc:Cancel notification for unknown message id "7"\n'
[ERROR][2024-05-04 19:49:00] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/jedi-language-server"       "stderr"        'WARNING:pygls.protocol.json_rpc:Cancel notification for unknown message id "12"\n'
[ERROR][2024-05-04 19:49:04] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/ruff"       "stderr"        "  10.448008s INFO ruff_server::server::connection Shutdown request received. Waiting for an exit notification...\n"
[START][2024-05-04 19:49:05] LSP logging initiated
[ERROR][2024-05-04 19:49:05] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/ruff"       "stderr"        "   0.092082s DEBUG ruff_server::server No workspace(s) were provided during initialization. Using the current working directory as a default workspace...\n"
[ERROR][2024-05-04 19:49:05] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/ruff"       "stderr"        "   0.094244s WARN ruff_server::server LSP client does not support dynamic capability registration - automatic configuration reloading will not be available.\n┐ruff_server::server::api::notifications::did_open::run{file=file:///private/tmp/helloworld.py}\n├─   0.094343s   0ms INFO ruff_server::session::workspace::ruff_settings No ruff settings file (pyproject.toml/ruff.toml/.ruff.toml) found for /private/tmp/helloworld.py - falling back to default configuration\n┘\n"
[ERROR][2024-05-04 19:49:06] .../vim/lsp/rpc.lua:734    "rpc"   "/Users/shirann/.local/share/nvim/mason/bin/ruff"       "stderr"        "   1.199020s INFO ruff_server::server::connection Shutdown request received. Waiting for an exit notification...\n"```
ShIRannx commented 5 months ago

i reset the log and rerun the command. now the log is


[INFO][2024-05-04 19:55:05] .../lua/vim/lsp.lua:1875    "exit_handler"  {}
[START][2024-05-04 19:56:12] LSP logging initiated
[INFO][2024-05-04 19:56:12] .../lua/vim/lsp.lua:1875    "exit_handler"  {}
[START][2024-05-04 19:56:15] LSP logging initiated
[INFO][2024-05-04 19:56:15] .../lua/vim/lsp.lua:1875    "exit_handler"  {}```
glepnir commented 5 months ago

I can't reproduce with default ruff-lsp config in lspconfig.

ShIRannx commented 5 months ago

sry, not ruff-lsp just ruff

glepnir commented 5 months ago

because ruff is hange at exit and it fixed by https://github.com/astral-sh/ruff/pull/11222 . wait ruff release.

ShIRannx commented 5 months ago

thx a lot.

ShIRannx commented 5 months ago

the problem still after update to new release. current ruff version is 0.4.3. image

paddy-w commented 5 months ago

I had the same problem