Comments (5)
@mfussenegger I just try it with #28507 and found vim.lsp.rpc.connect
works correctly so that vim.lsp.get_clients
returns client infomation.
from neovim.
This may be related to this regression. Maybe the problem isn't only with named pipes, but with windows being slower in general to connect to named pipes and TCP.
The problem is that Neovim sends the initialization request here
neovim/runtime/lua/vim/lsp.lua
Lines 426 to 441 in af8500a
which may happen before the TCP/named pipe connection has been stablished here
neovim/runtime/lua/vim/lsp/rpc.lua
Lines 683 to 687 in af8500a
from neovim.
Using a command works because it handles the body since the command is launched
neovim/runtime/lua/vim/lsp/rpc.lua
Lines 746 to 748 in af8500a
neovim/runtime/lua/vim/lsp/rpc.lua
Lines 761 to 770 in af8500a
while connecting via TCP/named pipe starts handling the body once the connection has been established:
neovim/runtime/lua/vim/lsp/rpc.lua
Lines 679 to 681 in af8500a
from neovim.
Would there be a prefered aproach for a PR addressing this? I can think of:
- Using
vim.schedule_wrap
to ensure the initialization request is made after the TCP/named pipe connection has been stablished (it's a workaround and may cause more problems in the future) - Refactor the code to send the initialization request inside a callback provided by
client
.vim.lsp.rpc.start
would use this callback inmedeatly after callingvim.system
if everithing is ok andvim.lsp.rpc.connect
would do the same inside theon_connect
callback, after initializing the read loop
from neovim.
@pogyomo can you try with #28507 ?
from neovim.
Related Issues (20)
- tmux paste buffer gets cut off at around 16kB HOT 3
- Screen flickering when moving cursor HOT 4
- Within Lua script this key command 'viwp' not work HOT 3
- conceal can use a cchar from the wrong buffer
- Cursor jump to last line when terminal updates in visual mode HOT 2
- Piping to tee breaks neovim HOT 3
- annoying error keeps popping up: lsp-status.nvim/lua/lsp-status/messaging.lua:30: attempt to index a nil value HOT 1
- `E888: (NFA regexp) cannot repeat \zs` for `\ze*`/`\ze\+` HOT 2
- LSP jump-to-definition using CTRL-] is slightly inaccurate when editing Ruby code HOT 7
- checkhealth suggestion on tmux termguicolors does not work HOT 3
- with 'autoindent', cursor moves to wrong position virtualedit=all and ^ mark HOT 3
- Query error at 42:2. Invalid node type "method_elem" HOT 1
- Everything breaks
- `vgo` motion is only sometimes inclusive
- `:startinsert` does not consider the current context correctly HOT 2
- lua: `vim.fn.getcharsearch()` has incorrect return type
- Windows: crash on exit, leaving the editor screen on the terminal HOT 1
- Man.lua: `Invalid buffer id` error when using `:hide Man` in buffer with `bufhidden=wipe`
- treesitter: undoing confirmed substitution does not trigger reparse HOT 3
- grepprg settings have unexpected behavior since 0.10 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from neovim.