Skip to content

Commit

Permalink
clean imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Calcoph committed May 17, 2023
1 parent b6e9987 commit e7c31e2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions hexpat-language-server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@ use hexpat_language_server::completion::completion;
use hexpat_language_server::jump_definition::get_definition;
use hexpat_language_server::reference::get_reference;
use hexpat_language_server::semantic_token::semantic_token_from_ast;
use json::JsonValue;
use parserlib::LEGEND_TYPE;
use ropey::Rope;
use serde::__private::doc;
use serde::{Deserialize, Serialize};
use serde_json::{Value as jValue, json};
use serde_json::{Value as jValue};
use tower_lsp::jsonrpc::{Result, Error as LSPError, ErrorCode};
use tower_lsp::lsp_types::notification::Notification;
use tower_lsp::lsp_types::*;
use tower_lsp::{Client, LanguageServer, LspService, Server};

const LSP_NAME: &str = "hexpat-language-server";
const COMMAND_RUN_ON_IMHEX: &str = "hexpat-language-server.runOnImHex";
const DEFAULT_IMHEX_PORT: u16 = 31337;

const CONFIG_IMHEX_BASE_FOLDERS: &str = "imhexBaseFolders";
const CONFIG_IMHEX_PORT: &str = "imhexPort";
Expand Down Expand Up @@ -669,7 +668,7 @@ impl Backend {
let port = port.map(|port| match port.value() {
ConfigurationEntry::Port(port) => *port,
_ => unreachable!()
}).unwrap_or(31337);
}).unwrap_or(DEFAULT_IMHEX_PORT);
hexpat_language_server::imhex_connection::send_file(&current_document, port).map(|_| None)
},
None => Err(tower_lsp::jsonrpc::Error {
Expand Down

0 comments on commit e7c31e2

Please sign in to comment.