Skip to content

Commit 1b42250

Browse files
committed
Changed the paths in several config sections in the getting started guide to match the install paths in the earlier parts of the guide.
1 parent 30f2cb3 commit 1b42250

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

docs/guide/getting_started.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,22 @@ local on_attach = function(client, bufnr)
7474
vim.keymap.set('n', '<Leader>td', vim.lsp.buf.type_definition, bufopts)
7575
end
7676

77-
local bundle_path = '<Path to where PowerShell Editor Services was installed>'
77+
local home_directory = os.getenv('HOME')
78+
if home_directory == nil then
79+
home_directory = os.getenv('USERPROFILE')
80+
end
81+
82+
-- The bundle_path is where PowerShell Editor Services was installed
83+
local bundle_path = home_directory .. '/Desktop/PowerShellEditorServices'
7884

7985
require('lspconfig')['powershell_es'].setup {
8086
bundle_path = bundle_path,
8187
on_attach = on_attach
8288
}
8389
```
8490

85-
> NOTE: Be sure to set the bundle_path variable, otherwise the server will not
86-
> know the path to start the server.
91+
> NOTE: Be sure to set the bundle_path variable to the correct location,
92+
> otherwise the server will not know the path to start the server.
8793
8894
To further configure the server, you can supply settings to the setup table.
8995
For example, you can set the code formatting preset to one true brace style
@@ -99,9 +105,10 @@ require('lspconfig')['powershell_es'].setup {
99105
As another example, you can set the bundled PSScriptAnalyzer's custom rule path
100106
like so:
101107
```lua
108+
local custom_settings_path = home_directory .. '/PSScriptAnalyzerSettings.psd1'
102109
require('lspconfig')['powershell_es'].setup {
103110
bundle_path = bundle_path,
104111
on_attach = on_attach,
105-
settings = { powershell = { scriptAnalysis = { settingsPath = os.getenv('HOME') .. 'PSScriptAnalyzerSettings.psd1' } } }
112+
settings = { powershell = { scriptAnalysis = { settingsPath = custom_settings_path } } }
106113
}
107114
```

0 commit comments

Comments
 (0)