aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanielGavin <danielgavin5@hotmail.com>2021-03-12 00:58:05 +0100
committerDanielGavin <danielgavin5@hotmail.com>2021-03-12 00:58:05 +0100
commitacfadc6bf0d99a562026b424ce99bef7a6794788 (patch)
treee8de7d390b846b86134981167f95d85dd4e6a4ca
parent1004c5c127c0eff5e2b90b235a0c47dc1aa4da10 (diff)
parentf528d38d78c46280d6280c62af9dac1392504102 (diff)
Merge branch 'master' of github.com:DanielGavin/ols
-rw-r--r--README.md16
1 files changed, 15 insertions, 1 deletions
diff --git a/README.md b/README.md
index 1a6ab26..330c035 100644
--- a/README.md
+++ b/README.md
@@ -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)
+```