Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ jobs:
bin: codebook-lsp.exe
name: codebook-lsp-x86_64-pc-windows-msvc.zip
command: build
- release_for: Windows-arm64
os: windows-latest
target: aarch64-pc-windows-msvc
project: codebook-lsp
bin: codebook-lsp.exe
name: codebook-lsp-aarch64-pc-windows-msvc.zip
command: build
- release_for: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[Unreleased]

- Add Windows ARM64 release artifacts
- Move dictionary cache directory to platform-specific data directories instead of /tmp

[0.3.18]

- Fixed f-string issues in Python
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@
<img
src="assets/example.png" alt="Example" width="400" >

No setup needed. Codebook will automatically detect the language you are editing and mark issues for you. Note, Codebook will only mark issues for words that you control, where they are initially defined.
No configuration needed. Codebook will automatically detect the language you are editing and mark issues for you. Codebook will try to only mark issues for words that you create, where they are initially defined.

Please gift a ⭐ if you find Codebook useful!

**Supported platforms:** Prebuilt archives are published for macOS (x86_64, aarch64), Linux (x86_64, aarch64), and Windows (x86_64, arm64).

## Integrations

### Zed
Expand Down Expand Up @@ -158,7 +160,9 @@ If you are a Zed user, you may skip this step and consult the [Zed section](#zed
### Manual

1. Download the latest release for your architecture from the [releases](https://github.com/blopker/codebook/releases) page.
2. Extract the binary from the tarball, and move it somewhere on your system `$PATH`.
- Prebuilt archives are published for macOS (x86_64, aarch64), Linux (x86_64, aarch64), and Windows (x86_64, arm64).
- Windows artifacts are provided as `.zip` files; macOS and Linux artifacts are `.tar.gz`.
2. Extract the binary from the archive, and move it somewhere on your system `$PATH`.
- `~/.local/bin/codebook-lsp`
- `/usr/bin/codebook-lsp`
- Etc...
Expand Down
14 changes: 8 additions & 6 deletions crates/codebook/src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,15 @@ fn find_locations_code(
end_byte: range.end_byte + node_start_byte,
};
if let Some(existing_result) = word_locations.get_mut(&word_pos.word) {
let added = existing_result.insert(location);
#[cfg(debug_assertions)]
if !added {
let word = word_pos.word.clone();
panic!(
"Two of the same locations found. Make a better query. Word: {word}, Location: {location:?}"
)
{
let added = existing_result.insert(location);
if !added {
let word = word_pos.word.clone();
panic!(
"Two of the same locations found. Make a better query. Word: {word}, Location: {location:?}"
)
}
}
} else {
let mut set = HashSet::new();
Expand Down