| 1 |
# LSP Test Files for fackr |
| 2 |
|
| 3 |
This directory contains Python files for testing LSP (Language Server Protocol) |
| 4 |
features in the fackr editor. |
| 5 |
|
| 6 |
## Prerequisites |
| 7 |
|
| 8 |
Make sure you have a Python LSP server installed: |
| 9 |
- `pylsp` (python-lsp-server): `pip install python-lsp-server` |
| 10 |
- `ruff`: `pip install ruff` (for linting/formatting) |
| 11 |
- `pyright`: `pip install pyright` (for type checking) |
| 12 |
|
| 13 |
## Test Files |
| 14 |
|
| 15 |
| File | Feature | Keybinding | |
| 16 |
|------|---------|------------| |
| 17 |
| 01_hover.py | Hover Information | F1 | |
| 18 |
| 02_completion.py | Code Completion | Ctrl+Space | |
| 19 |
| 03_diagnostics.py | Diagnostics | Automatic | |
| 20 |
| 04_goto_definition.py | Go to Definition | F12 | |
| 21 |
| 05_references.py | Find References | Shift+F12 | |
| 22 |
| 06_rename.py | Rename Symbol | F2 | |
| 23 |
| 07_formatting.py | Code Formatting | Ctrl+Shift+F | |
| 24 |
|
| 25 |
## How to Test |
| 26 |
|
| 27 |
1. Open fackr: `fackr test_lsp/01_hover.py` |
| 28 |
2. Follow the instructions in the comments at the top of each file |
| 29 |
3. Each file is self-contained and tests a specific LSP feature |
| 30 |
|
| 31 |
## LSP Keybindings Reference |
| 32 |
|
| 33 |
| Key | Action | |
| 34 |
|-----|--------| |
| 35 |
| F1 | Show hover information | |
| 36 |
| Ctrl+Space | Trigger code completion | |
| 37 |
| F12 | Go to definition | |
| 38 |
| Shift+F12 | Find all references | |
| 39 |
| F2 | Rename symbol | |
| 40 |
| Ctrl+Shift+F | Format document | |
| 41 |
| Alt+M | Open LSP server manager | |
| 42 |
|
| 43 |
## Troubleshooting |
| 44 |
|
| 45 |
- If LSP features don't work, check that the language server is running |
| 46 |
- Use Alt+M to open the server manager and verify server status |
| 47 |
- Some features may take a moment to initialize when first opening a file |