aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorHirokazu Hata <h.hata.ai.t@gmail.com>2020-03-10 02:30:51 +0900
committerHirokazu Hata <h.hata.ai.t@gmail.com>2020-03-10 02:30:51 +0900
commit99951ea416d0ed45e259023b1296b4e12be726ae (patch)
treef86a79d4f120c067d777be77b011c871c93837b6 /scripts
parentMerge pull request #149 from h-michael/override-default (diff)
downloadnvim-lspconfig-99951ea416d0ed45e259023b1296b4e12be726ae.tar
nvim-lspconfig-99951ea416d0ed45e259023b1296b4e12be726ae.tar.gz
nvim-lspconfig-99951ea416d0ed45e259023b1296b4e12be726ae.tar.bz2
nvim-lspconfig-99951ea416d0ed45e259023b1296b4e12be726ae.tar.lz
nvim-lspconfig-99951ea416d0ed45e259023b1296b4e12be726ae.tar.xz
nvim-lspconfig-99951ea416d0ed45e259023b1296b4e12be726ae.tar.zst
nvim-lspconfig-99951ea416d0ed45e259023b1296b4e12be726ae.zip
README_template.md: add how to override default_config
Diffstat (limited to 'scripts')
-rw-r--r--scripts/README_template.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/README_template.md b/scripts/README_template.md
index 6ee2503e..fcc023fd 100644
--- a/scripts/README_template.md
+++ b/scripts/README_template.md
@@ -116,6 +116,19 @@ end
nvim_lsp.foo_lsp.setup{}
```
+### Example: orverride default config
+
+If you want to change default configs for all servers, you can override default_config like this.
+
+```lua
+local nvim_lsp = require'nvim_lsp'
+nvim_lsp.util.default_config = vim.tbl_extend(
+ "force",
+ nvim_lsp.util.default_config,
+ { log_level = lsp.protocol.MessageType.Warning.Error }
+)
+```
+
### Installing a language server
Configs may provide an `install()` function. Then you can use