Skip to content

Commit

Permalink
docs: update server_configurations.md
Browse files Browse the repository at this point in the history
skip-checks: true
  • Loading branch information
github-actions[bot] committed Sep 19, 2024
1 parent 3401673 commit aaec5d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions doc/server_configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -6715,9 +6715,11 @@ settings.
```lua
require'lspconfig'.lua_ls.setup {
on_init = function(client)
local path = client.workspace_folders[1].name
if vim.loop.fs_stat(path..'/.luarc.json') or vim.loop.fs_stat(path..'/.luarc.jsonc') then
return
if client.workspace_folders then
local path = client.workspace_folders[1].name
if vim.loop.fs_stat(path..'/.luarc.json') or vim.loop.fs_stat(path..'/.luarc.jsonc') then
return
end
end

client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
Expand Down
8 changes: 5 additions & 3 deletions doc/server_configurations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6715,9 +6715,11 @@ settings.
```lua
require'lspconfig'.lua_ls.setup {
on_init = function(client)
local path = client.workspace_folders[1].name
if vim.loop.fs_stat(path..'/.luarc.json') or vim.loop.fs_stat(path..'/.luarc.jsonc') then
return
if client.workspace_folders then
local path = client.workspace_folders[1].name
if vim.loop.fs_stat(path..'/.luarc.json') or vim.loop.fs_stat(path..'/.luarc.jsonc') then
return
end
end

client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
Expand Down

0 comments on commit aaec5d0

Please sign in to comment.