diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2020-12-21 13:12:53 -0800 |
|---|---|---|
| committer | Matthieu Coudron <teto@users.noreply.github.com> | 2021-01-03 14:52:45 +0100 |
| commit | d62fb1d17c2e79dd9520f5334d5d4d983359802d (patch) | |
| tree | 29879690c654137316587b6b2161103b68e7554e /lua | |
| parent | [docgen] Update README.md (diff) | |
| download | nvim-lspconfig-d62fb1d17c2e79dd9520f5334d5d4d983359802d.tar nvim-lspconfig-d62fb1d17c2e79dd9520f5334d5d4d983359802d.tar.gz nvim-lspconfig-d62fb1d17c2e79dd9520f5334d5d4d983359802d.tar.bz2 nvim-lspconfig-d62fb1d17c2e79dd9520f5334d5d4d983359802d.tar.lz nvim-lspconfig-d62fb1d17c2e79dd9520f5334d5d4d983359802d.tar.xz nvim-lspconfig-d62fb1d17c2e79dd9520f5334d5d4d983359802d.tar.zst nvim-lspconfig-d62fb1d17c2e79dd9520f5334d5d4d983359802d.zip | |
Update sumneko lua docs
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/sumneko_lua.lua | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/lua/lspconfig/sumneko_lua.lua b/lua/lspconfig/sumneko_lua.lua index 06bcf636..2b821766 100644 --- a/lua/lspconfig/sumneko_lua.lua +++ b/lua/lspconfig/sumneko_lua.lua @@ -121,6 +121,35 @@ require'lspconfig'.sumneko_lua.setup{ ``` If you install via our installer, if you execute `:LspInstallInfo sumneko_lua`, you can know `cmd` value. + +The settings of the language server can also be overridden. This is especially useful +when developing on the lua components of neovim. Some recommended settings are as follows: + +```lua +require'lspconfig'.sumneko_lua.setup { + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = 'LuaJIT', + -- Setup your lua path + path = vim.split(package.path, ';'), + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = {'vim'}, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = { + [vim.fn.expand('$VIMRUNTIME/lua')] = true, + [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true, + }, + }, + }, + }, +} +``` ]]; default_config = { root_dir = [[root_pattern(".git") or bufdir]]; |
