aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/README_template.md
diff options
context:
space:
mode:
authorDheepak Krishnamurthy <me@kdheepak.com>2020-07-03 23:32:11 -0600
committerDheepak Krishnamurthy <me@kdheepak.com>2020-07-03 23:32:11 -0600
commit4a1c6fe84df744700426824d9b4bb9caaa62e4f2 (patch)
tree9b84f84d4f7447826e38a1414841484032a2c7aa /scripts/README_template.md
parentMerge pull request #285 from Iron-E/patch-1 (diff)
downloadnvim-lspconfig-4a1c6fe84df744700426824d9b4bb9caaa62e4f2.tar
nvim-lspconfig-4a1c6fe84df744700426824d9b4bb9caaa62e4f2.tar.gz
nvim-lspconfig-4a1c6fe84df744700426824d9b4bb9caaa62e4f2.tar.bz2
nvim-lspconfig-4a1c6fe84df744700426824d9b4bb9caaa62e4f2.tar.lz
nvim-lspconfig-4a1c6fe84df744700426824d9b4bb9caaa62e4f2.tar.xz
nvim-lspconfig-4a1c6fe84df744700426824d9b4bb9caaa62e4f2.tar.zst
nvim-lspconfig-4a1c6fe84df744700426824d9b4bb9caaa62e4f2.zip
Update README.md to make lua block clearer to read
Diffstat (limited to 'scripts/README_template.md')
-rw-r--r--scripts/README_template.md21
1 files changed, 17 insertions, 4 deletions
diff --git a/scripts/README_template.md b/scripts/README_template.md
index 33693615..1538c794 100644
--- a/scripts/README_template.md
+++ b/scripts/README_template.md
@@ -42,8 +42,19 @@ Each config provides a `setup()` function, to initialize the server with
reasonable defaults and some server-specific things like commands or different
diagnostics.
- vim.cmd('packadd nvim-lsp') -- If installed as a Vim "package".
- require'nvim_lsp'.<config>.setup{name=…, settings = {…}, …}
+```lua
+vim.cmd('packadd nvim-lsp') -- If installed as a Vim "package".
+require'nvim_lsp'.<config>.setup{name=…, settings = {…}, …}
+```
+
+If you want to add this to your vimrc, you will need to enclose it in a `lua` block.
+
+```vim
+lua <<EOF
+vim.cmd('packadd nvim-lsp') -- If installed as a Vim "package".
+require'nvim_lsp'.<config>.setup{name=…, settings = {…}, …}
+EOF
+```
Find the [config](#configurations) for your language, then paste the example
given there to your `init.vim`. **All examples are given in Lua,** see `:help
@@ -57,8 +68,10 @@ config provides `nvim_lsp.texlab.buf_build({bufnr})`.
To use the defaults, just call `setup()` with an empty `config` parameter.
For the `gopls` config, that would be:
- vim.cmd('packadd nvim-lsp') -- If installed as a Vim "package".
- require'nvim_lsp'.gopls.setup{}
+```lua
+vim.cmd('packadd nvim-lsp') -- If installed as a Vim "package".
+require'nvim_lsp'.gopls.setup{}
+```
### Example: override some defaults