更新结构

This commit is contained in:
锦恢 2024-09-07 19:37:26 +08:00
parent 2b455a838d
commit 00ec7abc6c
4 changed files with 42 additions and 45 deletions

View File

@ -1,20 +1,10 @@
use crate::server::ProjectConfig;
#[cfg(feature = "slang")]
use path_clean::PathClean;
use regex::Regex;
use ropey::Rope;
#[cfg(feature = "slang")]
use std::env::current_dir;
#[cfg(feature = "slang")]
use std::path::Path;
use std::path::PathBuf;
use std::process::{Command, Stdio};
use tower_lsp::lsp_types::*;
#[cfg(feature = "slang")]
use veridian_slang::slang_compile;
use walkdir::DirEntry;
#[cfg(feature = "slang")]
use walkdir::WalkDir;
#[cfg(feature = "slang")]
pub fn get_diagnostics(

View File

@ -16,7 +16,7 @@ mod support;
use server::Backend;
#[derive(StructOpt, Debug)]
#[structopt(name = "veridian", about = "A SystemVerilog/Verilog Language Server")]
#[structopt(name = "Digtal LSP", about = "LSP for Digital IDE")]
struct Opt {}
#[tokio::main]
@ -25,7 +25,8 @@ async fn main() {
let log_handle = flexi_logger::Logger::with(flexi_logger::LogSpecification::info())
.start()
.unwrap();
info!("starting veridian...");
info!("launch Digital LSP");
let stdin = tokio::io::stdin();
let stdout = tokio::io::stdout();

View File

@ -296,7 +296,7 @@ impl LanguageServer for Backend {
}
async fn initialized(&self, _: InitializedParams) {
self.client
.log_message(MessageType::INFO, "veridian initialized!")
.log_message(MessageType::INFO, "digital lsp initialized!")
.await;
}
async fn shutdown(&self) -> Result<()> {

View File

@ -4,6 +4,7 @@
* ------------------------------------------------------------------------------------------ */
import { workspace, ExtensionContext } from "vscode";
import * as path from 'path';
import {
LanguageClient,
@ -17,8 +18,13 @@ const workSpaceFolder = workspace.workspaceFolders?.[0];
let cwd: string = workSpaceFolder.uri.fsPath;
export function activate(context: ExtensionContext) {
const lspServerPath = path.resolve(
context.extensionPath, '..', '..', 'target', 'debug', 'digital-lsp.exe'
);
console.log('launch lsp in ', lspServerPath);
const run: Executable = {
command: context.asAbsolutePath('target/debug/digital-lsp.exe'),
command: lspServerPath,
// options: { cwd },
};