diff options
| author | rotorotoroto <roto@tuta.io> | 2024-11-15 11:37:08 -0500 |
|---|---|---|
| committer | rotorotoroto <roto@tuta.io> | 2024-11-15 11:37:08 -0500 |
| commit | f861071d3eb81aa281e00e5a610714e2dcf65446 (patch) | |
| tree | a759f138823203732f1d5a503a6e9eb8f44020a9 /README.md | |
| parent | 212e52c273a1004ff2081f51f54b92058e47d62c (diff) | |
Update readme with nvim lspconfig settings example
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -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 |