diff options
| author | DanielGavin <danielgavin5@hotmail.com> | 2021-03-12 00:58:05 +0100 |
|---|---|---|
| committer | DanielGavin <danielgavin5@hotmail.com> | 2021-03-12 00:58:05 +0100 |
| commit | acfadc6bf0d99a562026b424ce99bef7a6794788 (patch) | |
| tree | e8de7d390b846b86134981167f95d85dd4e6a4ca | |
| parent | 1004c5c127c0eff5e2b90b235a0c47dc1aa4da10 (diff) | |
| parent | f528d38d78c46280d6280c62af9dac1392504102 (diff) | |
Merge branch 'master' of github.com:DanielGavin/ols
| -rw-r--r-- | README.md | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -11,6 +11,7 @@ Language server for Odin. This project is still in early development. - [Vs Code](#vs-code) - [Sublime](#sublime) - [Vim](#vim) + - [Emacs](#emacs) ## Installation @@ -97,4 +98,17 @@ Configuration of the LSP: } } } -```
\ No newline at end of file +``` + +### Emacs +``` +;; With odin-mode (https://github.com/mattt-b/odin-mode) and lsp-mode already added to your init.el of course!. +(setq-default lsp-auto-guess-root t) ;; if you work with Projectile/project.el this will help find the ols.json file. +(defvar lsp-language-id-configuration '((odin-mode . "odin"))) +(lsp-register-client + (make-lsp-client :new-connection (lsp-stdio-connection "/path/to/ols/executable") + :major-modes '(odin-mode) + :server-id 'ols + :multi-root t)) ;; This is just so lsp-mode sends the "workspaceFolders" param to the server. +(add-hook 'odin-mode-hook #'lsp) +``` |