docs: Add initial language settings documentation (#6957)
This pull request implements the following documentation changes: - [x] Copy existing language settings docs from old docs repo - [x] Add new pages for Zig, Haskell, Gleam, Deno and PureScript - [x] Add `rust-analyzer` target directory section to Rust language page Release Notes: - Added initial language settings documentation ([#4264](https://github.com/zed-industries/zed/issues/4264)).
This commit is contained in:
parent
5d0c144ce7
commit
6cd306e4c9
29 changed files with 288 additions and 0 deletions
25
docs/src/languages/javascript.md
Normal file
25
docs/src/languages/javascript.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# JavaScript
|
||||
|
||||
- Tree Sitter: [tree-sitter-javascript](https://github.com/tree-sitter/tree-sitter-javascript)
|
||||
- Language Server: [typescript-language-server](https://github.com/typescript-language-server/typescript-language-server)
|
||||
|
||||
### Code formatting
|
||||
|
||||
Formatting on save is enabled by default for JavaScript, using TypeScript's built-in code formatting. But many JavaScript projects use other command-line code-formatting tools, such as [Prettier](https://prettier.io/). You can use one of these tools by specifying an _external_ code formatter for JavaScript in your settings. See the [configuration](../configuration/configuring-zed.md) documentation for more information.
|
||||
|
||||
For example, if you have Prettier installed and on your `PATH`, you can use it to format JavaScript files by adding the following to your `settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"language_overrides": {
|
||||
"JavaScript": {
|
||||
"format_on_save": {
|
||||
"external": {
|
||||
"command": "prettier",
|
||||
"arguments": ["--stdin-filepath", "{buffer_path}"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue