aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrotorotoroto <roto@tuta.io>2024-11-15 11:37:08 -0500
committerrotorotoroto <roto@tuta.io>2024-11-15 11:37:08 -0500
commitf861071d3eb81aa281e00e5a610714e2dcf65446 (patch)
treea759f138823203732f1d5a503a6e9eb8f44020a9
parent212e52c273a1004ff2081f51f54b92058e47d62c (diff)
Update readme with nvim lspconfig settings example
-rw-r--r--README.md21
1 files changed, 16 insertions, 5 deletions
diff --git a/README.md b/README.md
index 3b04939..7958a6d 100644
--- a/README.md
+++ b/README.md
@@ -205,14 +205,25 @@ Configuration of the LSP:
Neovim has a builtin support for LSP.
-There is a plugin that turns easier the setup, called [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig). You can
-install it with you prefered package manager.
+There is a plugin that makes the setup easier, called [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig). You can install it with your prefered package manager.
-A simple configuration to use with Odin would be like this:
+A simple configuration that uses the default `ols` settings would be like this:
```lua
-local lspconfig = require('lspconfig')
-lspconfig.ols.setup({})
+require'lspconfig'.ols.setup {}
+```
+
+And here is an example of a configuration with a couple of settings applied:
+
+```lua
+require'lspconfig'.ols.setup {
+ init_options = {
+ checker_args = "-strict-style",
+ collections = {
+ { name = "shared", path = vim.fn.expand('$HOME/odin-lib') }
+ },
+ },
+}
```
### Emacs