diff --git a/CHANGELOG.md b/CHANGELOG.md
index e31fa27cad..0a4a3c8306 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,18 @@
## Unreleased
+### Features/Changes
+- Implement "Run in terminal"
+- Implement document symbols in a panel
+- Implement 'Go To Location' functionality in the Diff editor.
+- implement on screen find which is similar to `f` in vim but for the whole screen.
+
+### Bug Fixes
+- Fix markdown syntax highlighting
+- Fix click issue on window error message
+
+## 0.4.1
+
### Features/Changes
- Add fedora builds
- Finish tree sitter dynamic libary support by downloading from https://github.com/lapce/tree-sitter-grammars
diff --git a/Cargo.lock b/Cargo.lock
index f08869645e..cfd9d4105e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1684,7 +1684,7 @@ checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4"
[[package]]
name = "floem"
version = "0.1.1"
-source = "git+https://github.com/lapce/floem?rev=54f0d1bcf0e1a91d82492ee7300a526adb60eb5c#54f0d1bcf0e1a91d82492ee7300a526adb60eb5c"
+source = "git+https://github.com/lapce/floem?rev=3a974c9bbc0c1dfefc17affb976ea8e9ae31369b#3a974c9bbc0c1dfefc17affb976ea8e9ae31369b"
dependencies = [
"bitflags 2.6.0",
"copypasta",
@@ -1702,7 +1702,6 @@ dependencies = [
"image",
"indexmap",
"lapce-xi-rope",
- "once_cell",
"parking_lot",
"peniko",
"raw-window-handle 0.6.0",
@@ -1722,13 +1721,12 @@ dependencies = [
[[package]]
name = "floem-editor-core"
version = "0.1.1"
-source = "git+https://github.com/lapce/floem?rev=54f0d1bcf0e1a91d82492ee7300a526adb60eb5c#54f0d1bcf0e1a91d82492ee7300a526adb60eb5c"
+source = "git+https://github.com/lapce/floem?rev=3a974c9bbc0c1dfefc17affb976ea8e9ae31369b#3a974c9bbc0c1dfefc17affb976ea8e9ae31369b"
dependencies = [
"bitflags 2.6.0",
"itertools 0.12.1",
"lapce-xi-rope",
"memchr",
- "once_cell",
"serde",
"strum",
"strum_macros",
@@ -1800,7 +1798,7 @@ dependencies = [
[[package]]
name = "floem_reactive"
version = "0.1.1"
-source = "git+https://github.com/lapce/floem?rev=54f0d1bcf0e1a91d82492ee7300a526adb60eb5c#54f0d1bcf0e1a91d82492ee7300a526adb60eb5c"
+source = "git+https://github.com/lapce/floem?rev=3a974c9bbc0c1dfefc17affb976ea8e9ae31369b#3a974c9bbc0c1dfefc17affb976ea8e9ae31369b"
dependencies = [
"smallvec",
]
@@ -1808,7 +1806,7 @@ dependencies = [
[[package]]
name = "floem_renderer"
version = "0.1.1"
-source = "git+https://github.com/lapce/floem?rev=54f0d1bcf0e1a91d82492ee7300a526adb60eb5c#54f0d1bcf0e1a91d82492ee7300a526adb60eb5c"
+source = "git+https://github.com/lapce/floem?rev=3a974c9bbc0c1dfefc17affb976ea8e9ae31369b#3a974c9bbc0c1dfefc17affb976ea8e9ae31369b"
dependencies = [
"cosmic-text",
"image",
@@ -1821,7 +1819,7 @@ dependencies = [
[[package]]
name = "floem_tiny_skia_renderer"
version = "0.1.1"
-source = "git+https://github.com/lapce/floem?rev=54f0d1bcf0e1a91d82492ee7300a526adb60eb5c#54f0d1bcf0e1a91d82492ee7300a526adb60eb5c"
+source = "git+https://github.com/lapce/floem?rev=3a974c9bbc0c1dfefc17affb976ea8e9ae31369b#3a974c9bbc0c1dfefc17affb976ea8e9ae31369b"
dependencies = [
"anyhow",
"bytemuck",
@@ -1838,7 +1836,7 @@ dependencies = [
[[package]]
name = "floem_vger_renderer"
version = "0.1.1"
-source = "git+https://github.com/lapce/floem?rev=54f0d1bcf0e1a91d82492ee7300a526adb60eb5c#54f0d1bcf0e1a91d82492ee7300a526adb60eb5c"
+source = "git+https://github.com/lapce/floem?rev=3a974c9bbc0c1dfefc17affb976ea8e9ae31369b#3a974c9bbc0c1dfefc17affb976ea8e9ae31369b"
dependencies = [
"anyhow",
"floem-vger",
@@ -2906,7 +2904,7 @@ dependencies = [
[[package]]
name = "lapce"
-version = "0.4.0"
+version = "0.4.1"
dependencies = [
"lapce-app",
"lapce-proxy",
@@ -2914,7 +2912,7 @@ dependencies = [
[[package]]
name = "lapce-app"
-version = "0.4.0"
+version = "0.4.1"
dependencies = [
"Inflector",
"alacritty_terminal",
@@ -2971,14 +2969,14 @@ dependencies = [
"tracing-subscriber",
"unicode-width",
"url",
- "windows-sys 0.52.0",
+ "windows-sys 0.36.1",
"zip",
"zstd",
]
[[package]]
name = "lapce-core"
-version = "0.4.0"
+version = "0.4.1"
dependencies = [
"ahash",
"anyhow",
@@ -3006,7 +3004,7 @@ dependencies = [
[[package]]
name = "lapce-proxy"
-version = "0.4.0"
+version = "0.4.1"
dependencies = [
"alacritty_terminal",
"anyhow",
@@ -3055,7 +3053,7 @@ dependencies = [
[[package]]
name = "lapce-rpc"
-version = "0.4.0"
+version = "0.4.1"
dependencies = [
"anyhow",
"crossbeam-channel",
@@ -4481,9 +4479,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
[[package]]
name = "serde"
-version = "1.0.204"
+version = "1.0.207"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12"
+checksum = "5665e14a49a4ea1b91029ba7d3bca9f299e1f7cfa194388ccc20f14743e784f2"
dependencies = [
"serde_derive",
]
@@ -4499,9 +4497,9 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.204"
+version = "1.0.207"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222"
+checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e"
dependencies = [
"proc-macro2",
"quote",
diff --git a/Cargo.toml b/Cargo.toml
index 658c97f93d..28ddba1ae6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,7 +23,7 @@ path = "lapce-proxy/src/bin/lapce-proxy.rs"
members = ["lapce-app", "lapce-proxy", "lapce-rpc", "lapce-core"]
[workspace.package]
-version = "0.4.0"
+version = "0.4.1"
edition = "2021"
rust-version = "1.77.0"
license = "Apache-2.0"
@@ -76,9 +76,9 @@ lapce-core = { path = "./lapce-core" }
lapce-rpc = { path = "./lapce-rpc" }
lapce-proxy = { path = "./lapce-proxy" }
-floem = { git = "https://github.com/lapce/floem", rev = "54f0d1bcf0e1a91d82492ee7300a526adb60eb5c", features = ["editor", "serde", "default-image-formats", "rfd-async-std"] }
+floem = { git = "https://github.com/lapce/floem", rev = "3a974c9bbc0c1dfefc17affb976ea8e9ae31369b", features = ["editor", "serde", "default-image-formats", "rfd-async-std"] }
# floem = { path = "../floem", features = ["editor", "serde", "default-image-formats", "rfd-async-std"] }
-floem-editor-core = { git = "https://github.com/lapce/floem", rev = "54f0d1bcf0e1a91d82492ee7300a526adb60eb5c", features = ["serde"] }
+floem-editor-core = { git = "https://github.com/lapce/floem", rev = "3a974c9bbc0c1dfefc17affb976ea8e9ae31369b", features = ["serde"] }
# floem-editor-core = { path = "../floem/editor-core/", features = ["serde"] }
[patch.crates-io]
diff --git a/defaults/dark-theme.toml b/defaults/dark-theme.toml
index 478d501a64..8d3c6ce0c4 100644
--- a/defaults/dark-theme.toml
+++ b/defaults/dark-theme.toml
@@ -68,6 +68,14 @@ dim-text = "#5C6370"
"variable.other.member" = "$red"
"tag" = "$blue"
+"markup.heading" = "$red"
+"markup.bold" = "$orange"
+"markup.italic" = "$orange"
+"markup.list" = "$orange"
+"markup.link.url" = "$blue"
+"markup.link.label" = "$purple"
+"markup.link.text" = "$purple"
+
"bracket.color.1" = "$blue"
"bracket.color.2" = "$yellow"
"bracket.color.3" = "$purple"
diff --git a/defaults/icon-theme.toml b/defaults/icon-theme.toml
index 8bda5b1de8..4a818c9bee 100644
--- a/defaults/icon-theme.toml
+++ b/defaults/icon-theme.toml
@@ -36,6 +36,7 @@ name = "Lapce Codicons"
"keyboard" = "keyboard.svg"
"breadcrumb_separator" = "chevron-right.svg"
"symbol_color" = "symbol-color.svg"
+"type_hierarchy" = "type-hierarchy.svg"
"window.close" = "chrome-close.svg"
"window.restore" = "chrome-restore.svg"
@@ -103,6 +104,7 @@ name = "Lapce Codicons"
"search.replace" = "replace.svg"
"search.replace_all" = "replace-all.svg"
+"document_symbol" = "symbol-class.svg"
"symbol_kind.array" = "symbol-array.svg"
"symbol_kind.boolean" = "symbol-boolean.svg"
"symbol_kind.class" = "symbol-class.svg"
diff --git a/defaults/light-theme.toml b/defaults/light-theme.toml
index 5cef4861b2..570e6f75b2 100644
--- a/defaults/light-theme.toml
+++ b/defaults/light-theme.toml
@@ -74,6 +74,14 @@ dim-text = "#A0A1A7"
"variable.other.member" = "$red"
"tag" = "$blue"
+"markup.heading" = "$red"
+"markup.bold" = "$orange"
+"markup.italic" = "$orange"
+"markup.list" = "$orange"
+"markup.link.url" = "$blue"
+"markup.link.label" = "$purple"
+"markup.link.text" = "$purple"
+
"bracket.color.1" = "$blue"
"bracket.color.2" = "$yellow"
"bracket.color.3" = "$purple"
diff --git a/extra/linux/dev.lapce.lapce.metainfo.xml b/extra/linux/dev.lapce.lapce.metainfo.xml
index 99d322aff3..3c6ad2db59 100644
--- a/extra/linux/dev.lapce.lapce.metainfo.xml
+++ b/extra/linux/dev.lapce.lapce.metainfo.xml
@@ -30,6 +30,6 @@
-
+
diff --git a/extra/macos/Lapce.app/Contents/Info.plist b/extra/macos/Lapce.app/Contents/Info.plist
index 2f6f78e208..5896e12833 100644
--- a/extra/macos/Lapce.app/Contents/Info.plist
+++ b/extra/macos/Lapce.app/Contents/Info.plist
@@ -15,7 +15,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 0.4.0
+ 0.4.1
CFBundleSupportedPlatforms
MacOSX
diff --git a/extra/windows/wix/lapce.wxs b/extra/windows/wix/lapce.wxs
index b2d0e4c600..305f835e22 100644
--- a/extra/windows/wix/lapce.wxs
+++ b/extra/windows/wix/lapce.wxs
@@ -1,6 +1,6 @@
-
+
diff --git a/icons/codicons/type-hierarchy.svg b/icons/codicons/type-hierarchy.svg
new file mode 100644
index 0000000000..bcbc902e40
--- /dev/null
+++ b/icons/codicons/type-hierarchy.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/lapce-app/src/app.rs b/lapce-app/src/app.rs
index 36a04eb11d..b9e6a2a7d6 100644
--- a/lapce-app/src/app.rs
+++ b/lapce-app/src/app.rs
@@ -2261,10 +2261,11 @@ fn palette_item(
.style(move |s| {
let config = config.get();
let size = config.ui.icon_size() as f32;
- s.min_width(size)
- .size(size, size)
- .margin_right(5.0)
- .color(config.color(LapceColor::LAPCE_ICON_ACTIVE))
+ s.min_width(size).size(size, size).margin_right(5.0).color(
+ config.symbol_color(&kind).unwrap_or_else(|| {
+ config.color(LapceColor::LAPCE_ICON_ACTIVE)
+ }),
+ )
}),
focus_text(
move || text.clone(),
@@ -2795,10 +2796,10 @@ fn window_message_view(
}),
stack((
text(title.clone()).style(|s| {
- s.min_width(0.0).line_height(1.6).font_weight(Weight::BOLD)
+ s.min_width(0.0).line_height(1.8).font_weight(Weight::BOLD)
}),
text(message.message.clone()).style(|s| {
- s.min_width(0.0).line_height(1.6).margin_top(5.0)
+ s.min_width(0.0).line_height(1.8).margin_top(5.0)
}),
))
.style(move |s| {
@@ -2818,6 +2819,7 @@ fn window_message_view(
)
.style(|s| s.margin_left(6.0)),
))
+ .on_event_stop(EventListener::PointerDown, |_| {})
.style(move |s| {
let config = config.get();
s.width_full()
@@ -2846,7 +2848,11 @@ fn window_message_view(
.style(|s| s.flex_col().width_full()),
)
.style(|s| {
- s.absolute().width_full().min_height(0.0).max_height_full()
+ s.absolute()
+ .width_full()
+ .min_height(0.0)
+ .max_height_full()
+ .set(PropagatePointerWheel, false)
}),
)
.style(|s| s.size_full()),
@@ -2930,6 +2936,7 @@ fn hover(window_tab_data: Rc) -> impl View {
layout_rect.set(rect);
})
.on_event_stop(EventListener::PointerMove, |_| {})
+ .on_event_stop(EventListener::PointerDown, |_| {})
.style(move |s| {
let active = window_tab_data.common.hover.active.get();
if !active {
diff --git a/lapce-app/src/command.rs b/lapce-app/src/command.rs
index 1ea715861c..aad6553df2 100644
--- a/lapce-app/src/command.rs
+++ b/lapce-app/src/command.rs
@@ -191,6 +191,10 @@ pub enum LapceWorkbenchCommand {
#[strum(message = "Reveal in File Tree")]
RevealInFileTree,
+ #[strum(serialize = "run_in_terminal")]
+ #[strum(message = "Run in Terminal")]
+ RunInTerminal,
+
#[strum(serialize = "reveal_active_file_in_file_explorer")]
#[strum(message = "Reveal Active File in File Explorer")]
RevealActiveFileInFileExplorer,
@@ -562,6 +566,10 @@ pub enum LapceWorkbenchCommand {
#[strum(serialize = "quit")]
#[strum(message = "Quit Editor")]
Quit,
+
+ #[strum(serialize = "go_to_location")]
+ #[strum(message = "Go to Location")]
+ GoToLocation,
}
#[derive(Clone, Debug)]
diff --git a/lapce-app/src/config.rs b/lapce-app/src/config.rs
index 4258f636a0..7c70e30340 100644
--- a/lapce-app/src/config.rs
+++ b/lapce-app/src/config.rs
@@ -655,6 +655,36 @@ impl LapceConfig {
Some(self.ui_svg(kind_str))
}
+ pub fn symbol_color(&self, kind: &SymbolKind) -> Option {
+ let theme_str = match *kind {
+ SymbolKind::METHOD => "method",
+ SymbolKind::FUNCTION => "method",
+ SymbolKind::ENUM => "enum",
+ SymbolKind::ENUM_MEMBER => "enum-member",
+ SymbolKind::CLASS => "class",
+ SymbolKind::VARIABLE => "field",
+ SymbolKind::STRUCT => "structure",
+ SymbolKind::CONSTANT => "constant",
+ SymbolKind::PROPERTY => "property",
+ SymbolKind::FIELD => "field",
+ SymbolKind::INTERFACE => "interface",
+ SymbolKind::ARRAY => "",
+ SymbolKind::BOOLEAN => "",
+ SymbolKind::EVENT => "",
+ SymbolKind::FILE => "",
+ SymbolKind::KEY => "",
+ SymbolKind::OBJECT => "",
+ SymbolKind::NAMESPACE => "",
+ SymbolKind::NUMBER => "number",
+ SymbolKind::OPERATOR => "",
+ SymbolKind::TYPE_PARAMETER => "",
+ SymbolKind::STRING => "string",
+ _ => return None,
+ };
+
+ self.style_color(theme_str)
+ }
+
pub fn logo_svg(&self) -> String {
self.svg_store.read().logo_svg()
}
diff --git a/lapce-app/src/config/icon.rs b/lapce-app/src/config/icon.rs
index a53812e88b..61a17bd421 100644
--- a/lapce-app/src/config/icon.rs
+++ b/lapce-app/src/config/icon.rs
@@ -38,6 +38,7 @@ impl LapceIcons {
pub const KEYBOARD: &'static str = "keyboard";
pub const BREADCRUMB_SEPARATOR: &'static str = "breadcrumb_separator";
pub const SYMBOL_COLOR: &'static str = "symbol_color";
+ pub const TYPE_HIERARCHY: &'static str = "type_hierarchy";
pub const FILE: &'static str = "file";
pub const FILE_EXPLORER: &'static str = "file_explorer";
@@ -108,6 +109,7 @@ impl LapceIcons {
pub const FILE_TYPE_SYMLINK_FILE: &'static str = "file-symlink-file";
pub const FILE_TYPE_SYMLINK_DIRECTORY: &'static str = "file-symlink-directory";
+ pub const DOCUMENT_SYMBOL: &'static str = "document_symbol";
pub const SYMBOL_KIND_ARRAY: &'static str = "symbol_kind.array";
pub const SYMBOL_KIND_BOOLEAN: &'static str = "symbol_kind.boolean";
pub const SYMBOL_KIND_CLASS: &'static str = "symbol_kind.class";
diff --git a/lapce-app/src/doc.rs b/lapce-app/src/doc.rs
index cd64958b1c..b733036af9 100644
--- a/lapce-app/src/doc.rs
+++ b/lapce-app/src/doc.rs
@@ -64,8 +64,8 @@ use lapce_xi_rope::{
Interval, Rope, RopeDelta, Transformer,
};
use lsp_types::{
- CodeActionOrCommand, CodeLens, Diagnostic, DiagnosticSeverity, InlayHint,
- InlayHintLabel,
+ CodeActionOrCommand, CodeLens, Diagnostic, DiagnosticSeverity,
+ DocumentSymbolResponse, InlayHint, InlayHintLabel,
};
use serde::{Deserialize, Serialize};
use smallvec::SmallVec;
@@ -78,7 +78,10 @@ use crate::{
history::DocumentHistory,
keypress::KeyPressFocus,
main_split::Editors,
- panel::kind::PanelKind,
+ panel::{
+ document_symbol::{SymbolData, SymbolInformationItemData},
+ kind::PanelKind,
+ },
window_tab::{CommonData, Focus},
workspace::LapceWorkspace,
};
@@ -205,6 +208,8 @@ pub struct Doc {
editors: Editors,
pub common: Rc,
+
+ pub document_symbol_data: RwSignal