Add usage for Doom Emacs.
All credit goes to @g-w1 for this :3
This commit is contained in:
parent
8c7a93fdf3
commit
29049bc467
20
README.md
20
README.md
@ -14,6 +14,7 @@ Zig Language Server, or `zls`, is a language server for Zig. The Zig wiki states
|
||||
- [Kate](#kate)
|
||||
- [Neovim/Vim8](#neovimvim8)
|
||||
- [Emacs](#emacs)
|
||||
- [Doom Emacs](#doom-emacs)
|
||||
- [Related Projects](#related-projects)
|
||||
- [License](#license)
|
||||
|
||||
@ -224,6 +225,25 @@ let g:LanguageClient_serverCommands = {
|
||||
:server-id 'zls))
|
||||
```
|
||||
|
||||
### Doom Emacs
|
||||
|
||||
- Enable the `lsp` module
|
||||
- Install the [zig-mode](https://github.com/zigland/zig-mode) package (add `(package! zig-mode)` to your `packages.el` file
|
||||
|
||||
```elisp
|
||||
(require 'lsp)
|
||||
(use-package! zig-mode
|
||||
:hook ((zig-mode . lsp))
|
||||
:custom (zig-format-on-save nil)
|
||||
:init
|
||||
(add-to-list 'lsp-language-id-configuration '(zig-mode . "zig"))
|
||||
(lsp-register-client
|
||||
(make-lsp-client
|
||||
:new-connection (lsp-stdio-connection "zls")
|
||||
:major-modes '(zig-mode)
|
||||
:server-id 'zls)))
|
||||
```
|
||||
|
||||
## Related Projects
|
||||
|
||||
- [`sublime-zig-language` by @prime31](https://github.com/prime31/sublime-zig-language)
|
||||
|
Loading…
Reference in New Issue
Block a user