Add support for Spacemacs
Add Spacemacs setup instructions to README and configuration wizard
This commit is contained in:
parent
825f4ae584
commit
259f056bd2
10
README.md
10
README.md
@ -290,6 +290,16 @@ let g:LanguageClient_serverCommands = {
|
|||||||
:server-id 'zls))))
|
:server-id 'zls))))
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Spacemacs
|
||||||
|
|
||||||
|
- Add `lsp` and `zig` to `dotspacemacs-configuration-layers` in your `.spacemacs` file.
|
||||||
|
- If you don't have `zls` in your `PATH`, add the following to `dotspacemacs/user-config` in your
|
||||||
|
`.spacemacs` file:
|
||||||
|
|
||||||
|
```elisp
|
||||||
|
(setq lsp-zig-zls-executable "<path to zls>")
|
||||||
|
```
|
||||||
|
|
||||||
## Related Projects
|
## Related Projects
|
||||||
|
|
||||||
- [`sublime-zig-language` by @prime31](https://github.com/prime31/sublime-zig-language)
|
- [`sublime-zig-language` by @prime31](https://github.com/prime31/sublime-zig-language)
|
||||||
|
@ -168,14 +168,14 @@ pub fn wizard(allocator: std.mem.Allocator) !void {
|
|||||||
"What is the path to the 'zig' executable you would like to use?", std.fs.MAX_PATH_BYTES);
|
"What is the path to the 'zig' executable you would like to use?", std.fs.MAX_PATH_BYTES);
|
||||||
}
|
}
|
||||||
|
|
||||||
const editor = try askSelectOne("Which code editor do you use?", enum { VSCode, Sublime, Kate, Neovim, Vim8, Emacs, Doom, Other });
|
const editor = try askSelectOne("Which code editor do you use?", enum { VSCode, Sublime, Kate, Neovim, Vim8, Emacs, Doom, Spacemacs, Other });
|
||||||
const snippets = try askBool("Do you want to enable snippets?");
|
const snippets = try askBool("Do you want to enable snippets?");
|
||||||
const style = try askBool("Do you want to enable style warnings?");
|
const style = try askBool("Do you want to enable style warnings?");
|
||||||
const semantic_tokens = try askBool("Do you want to enable semantic highlighting?");
|
const semantic_tokens = try askBool("Do you want to enable semantic highlighting?");
|
||||||
const operator_completions = try askBool("Do you want to enable .* and .? completions?");
|
const operator_completions = try askBool("Do you want to enable .* and .? completions?");
|
||||||
const include_at_in_builtins = switch (editor) {
|
const include_at_in_builtins = switch (editor) {
|
||||||
.Sublime => true,
|
.Sublime => true,
|
||||||
.VSCode, .Kate, .Neovim, .Vim8, .Emacs, .Doom => false,
|
.VSCode, .Kate, .Neovim, .Vim8, .Emacs, .Doom, .Spacemacs => false,
|
||||||
else => try askBool("Should the @ sign be included in completions of builtin functions?\nChange this later if `@inc` completes to `include` or `@@include`"),
|
else => try askBool("Should the @ sign be included in completions of builtin functions?\nChange this later if `@inc` completes to `include` or `@@include`"),
|
||||||
};
|
};
|
||||||
const max_detail_length: usize = switch (editor) {
|
const max_detail_length: usize = switch (editor) {
|
||||||
@ -303,6 +303,16 @@ pub fn wizard(allocator: std.mem.Allocator) !void {
|
|||||||
\\ :server-id 'zls))))
|
\\ :server-id 'zls))))
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
.Spacemacs => {
|
||||||
|
write(
|
||||||
|
\\To use ZLS in Spacemacs, add the `lsp` and `zig` layers
|
||||||
|
\\to `dotspacemacs-configuration-layers` in your .spacemacs file.
|
||||||
|
\\Then, if you don't have `zls` in your PATH, add the following to
|
||||||
|
\\`dotspacemacs/user-config` in your .spacemacs file:
|
||||||
|
\\
|
||||||
|
\\(setq lsp-zig-zls-executable "<path to zls>")
|
||||||
|
);
|
||||||
|
},
|
||||||
.Other => {
|
.Other => {
|
||||||
write(
|
write(
|
||||||
\\We might not *officially* support your editor, but you can definitely still use ZLS!
|
\\We might not *officially* support your editor, but you can definitely still use ZLS!
|
||||||
|
Loading…
Reference in New Issue
Block a user