You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/aiassistant.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ To use cloud-based LLM providers, you need to add your API keys. You can do this
69
69
70
70
The following default keybindings are provided for interacting with the LLM Chat UI. You can customize these in the `keybindings` section of your settings file.
71
71
72
-
*(Note: `mod` typically refers to `Cmd` on macOS and `Ctrl` on Windows/Linux)*
72
+
*(Note: `mod` typically refers to `Ctrl` on Windows/Linux and `Cmd` on macOS)*
@@ -85,6 +85,7 @@ The following default keybindings are provided for interacting with the LLM Chat
85
85
| Show Chat Menu | `mod+m` | Displays a context menu with common chat actions: New Chat, Save Chat, Rename Chat, Clone Chat, Lock Chat Memory (prevents removal during batch clear operations). |
86
86
| Toggle Private Chat | `mod+shift+p` | Toggles if chat must be persisted or no in the chat history (incognito mode) |
87
87
| Open New AI Assistant Tab | `mod+shift+m` | Opens a new LLM Chat UI |
88
+
| Attach a source file | `mod+shift+a` | Attaches a source file to the current message, allowing the AI to analyze, review, or reference the file's contents in its response. |
ecode supports project-specific file associations, allowing you to map file patterns or names to specific programming languages for syntax highlighting, autocompletion, and other language-specific features. This is configured via the `.ecode/settings.json` file in your project root, using the same format as VS Code for easy compatibility.
4
+
5
+
## Setup
6
+
7
+
1.**Create the configuration file**: In your project's root directory, create a folder named `.ecode` if it doesn't exist, and inside it, add a `settings.json` file.
8
+
9
+
2.**Add file associations**: In `settings.json`, include a `"files.associations"` object. Keys are glob patterns or file names, and values are the target [language ID](https://github.com/SpartanJ/ecode/?tab=readme-ov-file#language-support-table) (e.g., "cpp" for C++).
10
+
11
+
Example ` .ecode/settings.json`:
12
+
```json
13
+
{
14
+
"files.associations": {
15
+
"glob_pattern": "language_name",
16
+
"functional": "cpp",
17
+
"map": "cpp",
18
+
"**/c++/**": "cpp"
19
+
}
20
+
}
21
+
```
22
+
23
+
-**Simple file name**: `"functional": "cpp"` associates files named "functional" with C++.
24
+
-**Glob pattern**: `"**/c++/**": "cpp"` matches any file in a subdirectory named "c++".
25
+
- Language IDs follow standard conventions (e.g., "javascript", "python", "json"). Check ecode's [supported languages for exact IDs](https://github.com/SpartanJ/ecode/?tab=readme-ov-file#language-support-table).
26
+
27
+
3.**Reload the project**: Open or reload your project in ecode. The associations will apply automatically to matching files.
28
+
29
+
## VS Code Fallback
30
+
31
+
If `.ecode/settings.json` does not exist, ecode will automatically fall back to `.vscode/settings.json` (if present) and read the `"files.associations"` from there. This ensures compatibility with VS Code workspaces. You can migrate by copying the relevant section to `.ecode/settings.json` for ecode-specific overrides.
Copy file name to clipboardExpand all lines: docs/lsp.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,8 +76,8 @@ Please check the [language support table](#language-support-table)
76
76
***url** (optional): The web page URL of the language server
77
77
***use** (optional): A server can be inherit the configuration from other server. This must be the name of the server configuration that inherits (useful for LSPs that support several languages like clang and typescript-language-server).
78
78
***file_patterns**: Array of [Lua Patterns](https://www.lua.org/manual/5.4/manual.html#6.4.1) representing the file extensions that must use the LSP client
79
-
***command**: The command to execute to run the LSP. It's possible to override the default LSP command by declaring the server in the `lspclient.json` config. It's also possible to specify a different command for each platform, given that it might change in some ocassions per-platform. In that case an object should be used, with each key being a platform, and there's also a wildcard platform "other" to specify any other platform that does not match the platform definition. For example, `sourcekit-lsp` uses: `"command": {"macos": "xcrun sourcekit-lsp","other": "sourcekit-lsp"}`
80
-
***command_parameters** (optional): The command parameters. Parameters can be set from the **command** also, unless the command needs to run a binary with name with spaces. Also command_parameters can be used to add more parameters to the original command. The lsp configuration can be overriden from the lspclient.json in the user configuration. For example: a user trying to append some command line arguments to clang would need to do something like: `{"name": "clangd","command_parameters": "--background-index-priority=background --malloc-trim"}`
79
+
***command**: The command to execute to run the LSP. It's possible to override the default LSP command by declaring the server in the `lspclient.json` config. It's also possible to specify a different command for each platform, given that it might change in some occasions per-platform. In that case an object should be used, with each key being a platform, and there's also a wildcard platform "other" to specify any other platform that does not match the platform definition. For example, `sourcekit-lsp` uses: `"command": {"macos": "xcrun sourcekit-lsp","other": "sourcekit-lsp"}`
80
+
***command_parameters** (optional): The command parameters. Parameters can be set from the **command** also, unless the command needs to run a binary with name with spaces. Also command_parameters can be used to add more parameters to the original command. The lsp configuration can be overridden from the lspclient.json in the user configuration. For example: a user trying to append some command line arguments to clang would need to do something like: `{"name": "clangd","command_parameters": "--background-index-priority=background --malloc-trim"}`
81
81
***rootIndicationFileNames** (optional): Some languages need to indicate the project root path to the LSP work correctly. This is an array of files that might indicate where the root path is. Usually this is resolver by the LSP itself, but it might help in some situations.
82
82
***initializationOptions** (optional): These are custom initialization options that can be passed to the LSP. Usually not required, but it will allow the user to configure the LSP. More information can be found [here](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize).
83
83
***host** (optional): It's possible to connect to LSP servers via TCP. This is the host location of the LSP. When using TCP connections *command* can be empty or can be used to initialize the LSP server. And then use the LSP through a TCP connection.
The spell checker provides real-time spell checking for source code across your project, helping you catch typos and maintain consistent spelling in comments, strings, and identifiers.
4
+
5
+
## Installation
6
+
7
+
### Prerequisites
8
+
9
+
The spell checker requires the [typos](https://github.com/crate-ci/typos) tool to be installed and available in your system `PATH`.
10
+
11
+
**Installation options:**
12
+
13
+
-**Cargo:**`cargo install typos-cli`
14
+
-**Homebrew (macOS):**`brew install typos-cli`
15
+
-**Pre-built binaries:** Download from the [releases page](https://github.com/crate-ci/typos/releases)
16
+
17
+
To verify installation, run:
18
+
```bash
19
+
typos --version
20
+
```
21
+
22
+
## Configuration
23
+
24
+
Configuration is managed through ecode's settings file (JSON format) using the `config` and `keybindings` sections.
25
+
26
+
### Basic Structure
27
+
28
+
```json
29
+
{
30
+
"config": {
31
+
"delay_time": "500ms"
32
+
},
33
+
"keybindings": {
34
+
"spellchecker-fix-typo": "alt+shift+return",
35
+
"spellchecker-go-to-next-error": "",
36
+
"spellchecker-go-to-previous-error": ""
37
+
}
38
+
}
39
+
```
40
+
41
+
### Configuration Options
42
+
43
+
#### `config`
44
+
45
+
| Key | Type | Default | Description |
46
+
|-----|------|---------|-------------|
47
+
|`delay_time`| integer | 500 | Delay in milliseconds before running spell check after document changes |
48
+
49
+
#### Keybindings
50
+
51
+
| Command | Description |
52
+
|---------|-------------|
53
+
|`spellchecker-fix-typo`| Display suggestions for the current typo |
54
+
|`spellchecker-go-to-next-error`| Navigate to the next spelling error |
55
+
|`spellchecker-go-to-previous-error`| Navigate to the previous spelling error |
56
+
57
+
## Usage
58
+
59
+
### Basic Workflow
60
+
61
+
1.**Automatic Detection**: Spelling errors are highlighted automatically as you type
62
+
2.**Navigate Errors**: Use the navigation keybindings to jump between errors
63
+
3.**Fix Typos**: Position your cursor on a highlighted error and use the fix-typo command to see suggestions or right click the typo -> Spell Checker and pick the replacement word
64
+
65
+
## Troubleshooting
66
+
67
+
### Common Issues
68
+
69
+
**Spell checker not working**
70
+
- Verify `typos` is installed and in your PATH
71
+
- Check the ecode console/logs for error messages
72
+
- Ensure your configuration syntax is valid JSON
73
+
74
+
**Too many false positives**
75
+
- Consider configuring a custom `typos` configuration file (`.typos.toml`) in your project root
76
+
- Refer to the [typos documentation](https://github.com/crate-ci/typos/blob/master/docs/reference.md) for advanced filtering options
77
+
78
+
**Performance issues**
79
+
- Increase the `delay_time` value to reduce frequency of checks
80
+
- Consider excluding large files or directories via typos configuration
81
+
82
+
## Integration with typos
83
+
84
+
This plugin leverages the `typos` tool's configuration system. You can create a `.typos.toml` file in your project root to:
85
+
86
+
- Add custom dictionaries
87
+
- Ignore specific files or patterns
88
+
- Configure language-specific rules
89
+
- Define project-specific corrections
90
+
91
+
Example `.typos.toml`:
92
+
```toml
93
+
[default.extend-words]
94
+
# Add custom corrections
95
+
teh = "the"
96
+
recieve = "receive"
97
+
98
+
[files]
99
+
# Ignore certain file types
100
+
extend-exclude = ["*.min.js", "*.lock"]
101
+
```
102
+
103
+
For complete configuration options, see the [typos documentation](https://github.com/crate-ci/typos/blob/master/docs/reference.md).
0 commit comments