Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump serde_json from 1.0.122 to 1.0.125 #136

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 14 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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]
Expand Down
8 changes: 8 additions & 0 deletions defaults/dark-theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions defaults/icon-theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
8 changes: 8 additions & 0 deletions defaults/light-theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion extra/linux/dev.lapce.lapce.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
</screenshot>
</screenshots>
<releases>
<release version="0.4.0" date="2024-04-24"/>
<release version="0.4.1" date="2024-08-07"/>
</releases>
</component>
2 changes: 1 addition & 1 deletion extra/macos/Lapce.app/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.4.0</string>
<string>0.4.1</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
Expand Down
2 changes: 1 addition & 1 deletion extra/windows/wix/lapce.wxs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="windows-1252"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Product Name="Lapce" Id="*" UpgradeCode="9c09a374-1135-4782-959f-2dec376a1dfa" Language="1033" Codepage="1252" Version="0.4.0" Manufacturer="Lapce">
<Product Name="Lapce" Id="*" UpgradeCode="9c09a374-1135-4782-959f-2dec376a1dfa" Language="1033" Codepage="1252" Version="0.4.1" Manufacturer="Lapce">
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"/>
<MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A newer version of [ProductName] is already installed."/>
<Icon Id="lapce.exe" SourceFile=".\extra\windows\lapce.ico"/>
Expand Down
1 change: 1 addition & 0 deletions icons/codicons/type-hierarchy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 14 additions & 7 deletions lapce-app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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| {
Expand All @@ -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()
Expand Down Expand Up @@ -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()),
Expand Down Expand Up @@ -2930,6 +2936,7 @@ fn hover(window_tab_data: Rc<WindowTabData>) -> 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 {
Expand Down
24 changes: 21 additions & 3 deletions lapce-app/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,23 @@ pub enum LapceWorkbenchCommand {
#[strum(message = "Show Call Hierarchy")]
ShowCallHierarchy,

#[strum(serialize = "reveal_in_file_tree")]
#[strum(message = "Reveal in File Tree")]
RevealInFileTree,
#[strum(serialize = "reveal_in_panel")]
#[strum(message = "Reveal in Panel")]
RevealInPanel,

#[cfg(not(target_os = "macos"))]
#[strum(serialize = "reveal_in_file_explorer")]
#[strum(message = "Reveal in System File Explorer")]
RevealInFileExplorer,

#[cfg(target_os = "macos")]
#[strum(serialize = "reveal_in_file_explorer")]
#[strum(message = "Reveal in Finder")]
RevealInFileExplorer,

#[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")]
Expand Down Expand Up @@ -562,6 +576,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)]
Expand Down
30 changes: 30 additions & 0 deletions lapce-app/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,36 @@ impl LapceConfig {
Some(self.ui_svg(kind_str))
}

pub fn symbol_color(&self, kind: &SymbolKind) -> Option<Color> {
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()
}
Expand Down
2 changes: 2 additions & 0 deletions lapce-app/src/config/icon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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";
Expand Down
Loading
Loading