Closed tanj closed 2 months ago
I did some digging with adding some log spam and I think the issue is that we have a mix of windows path separators and posix path separators.
2024-04-13 08:52:57,652 [INFO @ host.py:start:82] 27388 - Start host ['C:/Users/<user>/AppData/Local/nvim/rplugin/python3/example.py', 'C:/Users/jtebokkel/AppData/Local/nvim/rplugin/python3/limit.py']
2024-04-13 08:52:57,652 [DEBUG @ session.py:run:170] 27388 - Checking if we have setup callback...
2024-04-13 08:52:57,652 [DEBUG @ session.py:run:172] 27388 - Starting greenlet for on_setup
2024-04-13 08:52:57,653 [INFO @ host.py:_discover_functions:232] 27388 - Discovering functions... C:\Users\<user>\AppData\Local\nvim\rplugin\python3\example.py
2024-04-13 08:52:57,653 [INFO @ host.py:_discover_functions:237] 27388 - discover function: <function TestPlugin.on_bufenter at 0x000001F5F6406980>
2024-04-13 08:52:57,654 [INFO @ host.py:_discover_functions:268] 27388 - <function TestPlugin.on_bufenter at 0x000001F5F6406980> has spec: {'type': 'autocmd', 'name': 'BufEnter', 'sync': True, 'opts': {'pattern': '*.py', 'eval': 'expand("<afile>")'}}
2024-04-13 08:52:57,654 [INFO @ host.py:_discover_functions:237] 27388 - discover function: <function TestPlugin.testcommand at 0x000001F5F64068E0>
2024-04-13 08:52:57,654 [INFO @ host.py:_discover_functions:268] 27388 - <function TestPlugin.testcommand at 0x000001F5F64068E0> has spec: {'type': 'command', 'name': 'TestCommand', 'sync': False, 'opts': {'range': '', 'nargs': '*'}}
2024-04-13 08:52:57,654 [INFO @ host.py:_discover_functions:237] 27388 - discover function: <function TestPlugin.testfunction at 0x000001F5F6406840>
2024-04-13 08:52:57,654 [INFO @ host.py:_discover_functions:268] 27388 - <function TestPlugin.testfunction at 0x000001F5F6406840> has spec: {'type': 'function', 'name': 'TestFunction', 'sync': True, 'opts': {}}
2024-04-13 08:52:57,654 [INFO @ host.py:_discover_functions:274] 27388 - specs collected: [{'type': 'autocmd', 'name': 'BufEnter', 'sync': True, 'opts': {'pattern': '*.py', 'eval': 'expand("<afile>")'}}, {'type': 'command', 'name': 'TestCommand', 'sync': False, 'opts': {'range': '', 'nargs': '*'}}, {'type': 'function', 'name': 'TestFunction', 'sync': True, 'opts': {}}]
2024-04-13 08:52:57,654 [INFO @ host.py:_discover_functions:277] 27388 - self._specs: {'C:\\Users\\<user>\\AppData\\Local\\nvim\\rplugin\\python3\\example.py': [{'type': 'autocmd', 'name': 'BufEnter', 'sync': True, 'opts': {'pattern': '*.py', 'eval': 'expand("<afile>")'}}, {'type': 'command', 'name': 'TestCommand', 'sync': False, 'opts': {'range': '', 'nargs': '*'}}, {'type': 'function', 'name': 'TestFunction', 'sync': True, 'opts': {}}]}
2024-04-13 09:06:09,989 [INFO @ host.py:_on_specs_request:287] 34876 - on_specs_request path: 'C:/Users/<user>/AppData/Local/nvim/rplugin/python3/example.py'
we are adding the specs with path = os.path.normpath(path)
and looking them up with no change in path.
This was introduced in f24459755da9e42ec3284fe80c7241ee05fa38ae
I'm trying to figure out why
UpdateRemotePlugins
is not finding any plugins. I hacked in some printf debugging intoruntime/autoload/remote/host.vim
and it seems like whenfunction! s:RegistrationCommands
callsrpcrequest(channel, 'specs', path)
it doesn't seem to come back with any specs.example.py
is the example from the pynvim docslimit.py
is the example from the neovim docs on remote pluginsModified function for my printf debug
Neovim version
OS
Windows 11 Pro