-
-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement external buffer document provider (#1443)
* feat(buffer): add external buffer doc provider This opens a document with a proper buffer name and matches it to the appropriate neovim external buffer. The document is "readonly" as far as VSCode is concerned, but it can still be edited by setting `modifiable`, so we still need to sync buffer changes whenever it updates. This can break highlighting, however. * fix(buffer): scroll to selection on buffer open We already set the selection based on the neovim cursor from the external buffer, but we should also scroll so that it's visible. This might be better fixed with proper syncing like #1261 but for now it makes :help work a lot nicer. * refactor(buffer): improve logs, change URI scheme * fix(buffer): escape external buffer name on Windows Building a vscode.Uri throws an exception if the `path` component doesn't match a certain expected format, which Windows file paths do not. Uri.file() properly escapes/converts file paths as needed. * fix(test): end nvim client connection gracefully Instead of forcefully destroying the client connection, it's nicer to let it end with FIN first, allowing the server to gracefully close. This prevents a lot of noisy errors that make it hard to read test output. * fix(buffer): notify doc change after buffer event Ensure we notify for document change after other buffer event processing. Enforcing order like this seems to help with asynchronous ordering / timing issues on Windows. * fix(buffer): catch error on external buffer open
- Loading branch information
1 parent
1b0ea63
commit de48ee2
Showing
4 changed files
with
98 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters