Commit graph

17 commits

Author SHA1 Message Date
c685f53dec Clean up more outdated documentation in db.rs
- Removed references to 'LspFileSystem' (now WorkspaceFileSystem)
- Removed verbose 'overlay' explanations (now using Buffers abstraction)
- Simplified struct field documentation to be accurate and concise
- Removed unnecessary mentions of 'Ruff's pattern' everywhere

The documentation now accurately reflects the current implementation
without verbose explanations of outdated architecture.
2025-08-29 17:05:38 -05:00
af8820b7bc Fix outdated and incorrect db.rs documentation
The documentation was completely out of sync with the code:
- Referenced 'overlays in Session using Arc<DashMap>' when they're now in Buffers
- Mentioned 'LspFileSystem' which was renamed to WorkspaceFileSystem
- Was overly verbose without being helpful - 'vomit of words'

Rewrote to be concise and accurate:
- Correctly describes the current two-layer architecture
- Focuses on the critical revision dependency trick
- Removes outdated implementation details
- Uses proper cross-references
2025-08-29 16:57:14 -05:00
f6e7f9084e Fix missing backticks in documentation
Fixed unclosed HTML tag warnings by adding backticks around:
- Generic types like Arc<DashMap>
- Type names in documentation like StorageHandle<Database>
- The word 'Arc' when referring to the type
2025-08-29 16:02:39 -05:00
89e979ba3f Add cross-references and improve documentation consistency
- Added [] cross-references between related types
- Fixed parameter naming consistency (lsp_uri -> uri)
- Added Returns sections to document when functions return None
- Added example to url_to_path function
- Linked Buffers <-> WorkspaceFileSystem relationship
- Linked LanguageId -> FileKind conversion
2025-08-29 15:39:23 -05:00
f3fb8e7045 Improve documentation and consolidate path/URL utilities
- Added comprehensive module-level documentation to all djls-workspace modules
- Consolidated scattered URL/path conversion utilities into paths module
- Added documentation explaining the 'why' for key types and abstractions
- Added #[must_use] annotations to constructors and getters
- Focused on explaining architecture and design decisions rather than obvious behavior
2025-08-29 15:35:12 -05:00
2dd779bcda Fix overlay bug: Salsa wasn't re-reading from buffers when files were opened
The core issue was that when a file was opened in the LSP, if it had already
been read from disk, Salsa would return cached content instead of reading
from the overlay system. This happened because opening a file didn't bump
its revision, so Salsa had no reason to invalidate its cache.

Key changes:
- Created Buffers abstraction to encapsulate shared buffer storage
- Fixed Session::open_document() to bump revision when file already exists
- Added comprehensive integration tests to verify overlay behavior
- Refactored WorkspaceFileSystem to use Buffers instead of raw DashMap

This ensures that overlays always take precedence over disk content, fixing
the issue where LSP edits weren't being reflected in template parsing.
2025-08-29 07:55:37 -05:00
21403df0ba tests 2025-08-28 23:07:44 -05:00
96e0b81417 wowza 2025-08-28 22:54:41 -05:00
4e3446f6ee wip 2025-08-27 15:37:29 -05:00
3bf25ac204 must use! 2025-08-25 13:11:13 -05:00
3131470cce wip 2025-08-25 12:22:54 -05:00
541200cbb1 wip 2025-08-25 10:52:37 -05:00
20163b50f8 wip 2025-08-25 10:34:57 -05:00
fb768a86d5 wip 2025-08-25 10:14:43 -05:00
b6bc1664ac wip 2025-08-25 05:54:56 -05:00
74b6b5b56d wip 2025-08-25 03:47:56 -05:00
75385e0254 workspace 2025-08-24 19:43:51 -05:00