mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
fix helix-term build
This commit is contained in:
parent
6f8bf67fa6
commit
c3f9d3641c
@ -16,8 +16,9 @@ build = true
|
|||||||
app = true
|
app = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# default = ["dap"]
|
default = ["dap", "lsp"]
|
||||||
dap = ["helix-dap", "helix-view/dap"]
|
dap = ["helix-dap", "helix-view/dap"]
|
||||||
|
lsp = ["helix-lsp", "helix-view/lsp"]
|
||||||
unicode-lines = ["helix-core/unicode-lines"]
|
unicode-lines = ["helix-core/unicode-lines"]
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
@ -26,8 +27,8 @@ path = "src/main.rs"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
helix-core = { version = "0.6", path = "../helix-core" }
|
helix-core = { version = "0.6", path = "../helix-core" }
|
||||||
helix-view = { version = "0.6", path = "../helix-view" }
|
helix-view = { version = "0.6", path = "../helix-view", features = ["term"] }
|
||||||
helix-lsp = { version = "0.6", path = "../helix-lsp" }
|
helix-lsp = { version = "0.6", path = "../helix-lsp", optional = true }
|
||||||
helix-dap = { version = "0.6", path = "../helix-dap", optional = true }
|
helix-dap = { version = "0.6", path = "../helix-dap", optional = true }
|
||||||
helix-loader = { version = "0.6", path = "../helix-loader" }
|
helix-loader = { version = "0.6", path = "../helix-loader" }
|
||||||
|
|
||||||
|
@ -415,14 +415,17 @@ pub async fn handle_language_server_message(
|
|||||||
|
|
||||||
match notification {
|
match notification {
|
||||||
Notification::Initialized => {
|
Notification::Initialized => {
|
||||||
let language_server =
|
let language_server = match self
|
||||||
match self.editor.language_servers.get_by_id(server_id) {
|
.editor
|
||||||
Some(language_server) => language_server,
|
.language_servers
|
||||||
None => {
|
.get_by_id(server_id)
|
||||||
warn!("can't find language server with id `{}`", server_id);
|
{
|
||||||
return;
|
Some(language_server) => language_server,
|
||||||
}
|
None => {
|
||||||
};
|
log::warn!("can't find language server with id `{}`", server_id);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// Trigger a workspace/didChangeConfiguration notification after initialization.
|
// Trigger a workspace/didChangeConfiguration notification after initialization.
|
||||||
// This might not be required by the spec but Neovim does this as well, so it's
|
// This might not be required by the spec but Neovim does this as well, so it's
|
||||||
|
@ -264,11 +264,12 @@ pub fn from_reader<R: std::io::Read + ?Sized>(
|
|||||||
/// Encodes the text inside `rope` into the given `encoding` and writes the
|
/// Encodes the text inside `rope` into the given `encoding` and writes the
|
||||||
/// encoded output into `writer.` As a `Rope` can only contain valid UTF-8,
|
/// encoded output into `writer.` As a `Rope` can only contain valid UTF-8,
|
||||||
/// replacement characters may appear in the encoded text.
|
/// replacement characters may appear in the encoded text.
|
||||||
pub async fn to_writer<'a, W: tokio::io::AsyncWriteExt + Unpin + ?Sized>(
|
pub async fn to_writer<'a, W: tokio::io::AsyncWrite + Unpin + ?Sized>(
|
||||||
writer: &'a mut W,
|
writer: &'a mut W,
|
||||||
encoding: &'static encoding::Encoding,
|
encoding: &'static encoding::Encoding,
|
||||||
rope: &'a Rope,
|
rope: &'a Rope,
|
||||||
) -> Result<(), Error> {
|
) -> Result<(), Error> {
|
||||||
|
use tokio::io::AsyncWriteExt;
|
||||||
// Text inside a `Rope` is stored as non-contiguous blocks of data called
|
// Text inside a `Rope` is stored as non-contiguous blocks of data called
|
||||||
// chunks. The absolute size of each chunk is unknown, thus it is impossible
|
// chunks. The absolute size of each chunk is unknown, thus it is impossible
|
||||||
// to predict the end of the chunk iterator ahead of time. Instead, it is
|
// to predict the end of the chunk iterator ahead of time. Instead, it is
|
||||||
|
Loading…
Reference in New Issue
Block a user