mirror of https://github.com/lapce/lapce.git
1. Add the field 'config_source' to 'RunDebugConfig' to indicate where the configuration is from. (#3500)
2. Add the field 'main_split' to'TerminalPanelData'
This commit is contained in:
parent
eafaa138b1
commit
351cfa6cbc
|
@ -1,6 +1,6 @@
|
|||
use std::rc::Rc;
|
||||
|
||||
use lapce_rpc::dap_types::RunDebugConfig;
|
||||
use lapce_rpc::dap_types::{ConfigSource, RunDebugConfig};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json::Value;
|
||||
|
||||
|
@ -90,6 +90,7 @@ fn get_rust_command_config(
|
|||
debug_command: None,
|
||||
dap_id: Default::default(),
|
||||
tracing_output: mode == RunDebugMode::Debug,
|
||||
config_source: ConfigSource::CodeLens,
|
||||
})
|
||||
} else {
|
||||
tracing::error!("no args");
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
},
|
||||
id::TerminalTabId,
|
||||
keypress::{EventRef, KeyPressData, KeyPressFocus, KeyPressHandle},
|
||||
main_split::MainSplitData,
|
||||
panel::kind::PanelKind,
|
||||
window_tab::{CommonData, Focus},
|
||||
workspace::LapceWorkspace,
|
||||
|
@ -39,6 +40,7 @@ pub struct TerminalPanelData {
|
|||
pub debug: RunDebugData,
|
||||
pub breakline: Memo<Option<(usize, PathBuf)>>,
|
||||
pub common: Rc<CommonData>,
|
||||
pub main_split: MainSplitData,
|
||||
}
|
||||
|
||||
impl TerminalPanelData {
|
||||
|
@ -46,6 +48,7 @@ pub fn new(
|
|||
workspace: Arc<LapceWorkspace>,
|
||||
profile: Option<TerminalProfile>,
|
||||
common: Rc<CommonData>,
|
||||
main_split: MainSplitData,
|
||||
) -> Self {
|
||||
let terminal_tab =
|
||||
TerminalTabData::new(workspace.clone(), profile, common.clone());
|
||||
|
@ -108,6 +111,7 @@ pub fn new(
|
|||
debug,
|
||||
breakline,
|
||||
common,
|
||||
main_split,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
};
|
||||
use lapce_rpc::{
|
||||
core::CoreNotification,
|
||||
dap_types::RunDebugConfig,
|
||||
dap_types::{ConfigSource, RunDebugConfig},
|
||||
file::{Naming, PathObject},
|
||||
plugin::PluginId,
|
||||
proxy::{ProxyResponse, ProxyRpcHandler, ProxyStatus},
|
||||
|
@ -482,6 +482,7 @@ pub fn new(
|
|||
workspace.clone(),
|
||||
common.config.get_untracked().terminal.get_default_profile(),
|
||||
common.clone(),
|
||||
main_split.clone(),
|
||||
);
|
||||
if let Some(workspace_info) = workspace_info.as_ref() {
|
||||
terminal.debug.breakpoints.set(
|
||||
|
@ -1492,6 +1493,7 @@ pub fn run_workbench_command(
|
|||
debug_command: None,
|
||||
dap_id: Default::default(),
|
||||
tracing_output: false,
|
||||
config_source: ConfigSource::RunInTerminal,
|
||||
};
|
||||
self.common
|
||||
.internal_command
|
||||
|
|
|
@ -59,6 +59,21 @@ pub struct RunDebugConfig {
|
|||
pub dap_id: DapId,
|
||||
#[serde(default)]
|
||||
pub tracing_output: bool,
|
||||
#[serde(default)]
|
||||
pub config_source: ConfigSource,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Serialize, Debug, Clone, Default, PartialEq, Eq)]
|
||||
pub enum ConfigSource {
|
||||
#[default]
|
||||
Palette,
|
||||
RunInTerminal,
|
||||
CodeLens,
|
||||
}
|
||||
impl ConfigSource {
|
||||
pub fn from_palette(&self) -> bool {
|
||||
*self == Self::Palette
|
||||
}
|
||||
}
|
||||
|
||||
pub trait Request {
|
||||
|
|
Loading…
Reference in New Issue