pwsh-ls error on emacs (with fix)
@andyleejordan já está trabalhando nisso.
Desde 28/7/2021.
Avaliação
Esta issue ainda não foi avaliada.
Descrição
I noticed an error when trying to use pwsh-ls with emacs for editing powershell scripts.
I get this error on the pwsh-ls::stderr buffer:

Process pwsh-ls stderr finished
The argument 'c:/Users/Ryan/AppData/Roaming/.emacs.d/.cache/lsp/pwsh/PowerShellEditorServices/PowerShellEditorServices/Start-EditorServices.ps1' to the -File parameter does not exist. Provide the path to an existing '.ps1' file as an argument to the -File parameter.
It looked strange that the directory argument after /pwsh/ is /PowerShellEditorServices/PowerShellEditorServices/ and this is where the issue is, as there is not actually another directory named "PowerShellEditorServices" inside the first when I check my own folder as installed from the language server, as shown in this image below.

I am not entirely sure if this is just a one off issue or something wrong with my install, but I freshly installed windows today and emacs, so I may assume it could be persistent issue, clearly if it is then the solution is to change the argument applied to not have two subdirectories of /PowerShellEditorServices/ because clearly it doesn't exist.
The steps to reproduce this is to;
- install the lsp-mode package
- open a .ps1 powershell script file, emacs will prompt to install the pwsh-ls language server
- pwsh-ls::stderr reports error message provided at start of this issue
Steps to fix: (until this is patched if it's a persistent isssue)
-
Create another folder in "C:\Users\USER\AppData\Roaming.emacs.d.cache\lsp\pwsh\PowerShellEditorServices" with the name PowerShellEditorServices
-
Copy every thing into the deeper directory so it looks like this:

-
Restart emacs and the language server should be somewhat working..

If you are getting errors like below in your lsp-log buffer then you need to install PSScriptAnalyzer at https://github.com/PowerShell/PSScriptAnalyzer after that everything should be working smoothly!

- Linguagem predominante
- C#
- Estrelas
- 772
- Forks
- 268
- Merge médio
- 3d 16h
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de PowerShell/PowerShellEditorServices
-
[Bug] None of the string overloads of `EditorExtensionServiceProvider.GetService()` work on .NET.Talvez livre de novo @andyleejordan assumiu há 97 dias e não há nenhum pull request aberto. Aberta
PowerShell/PowerShellEditorServices#2331 · 1 reação · 2 responsáveis ·
-
Area-Language Server Issue-Enhancement
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
PowerShell/PowerShellEditorServices#2315 · 1 comentário ·
-
Improve Constrained Runspace Debug ExperienceTalvez já em andamento @JustinGrote assumiu há 120 dias. AbertaArea-Debugging Issue-Enhancement
PowerShell/PowerShellEditorServices#2294 · 1 reação · 2 responsáveis ·
-
Issue-Bug Needs: Triage
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
PowerShell/PowerShellEditorServices#2293 · 1 comentário ·
-
Document outline drops child variables when a function/filter reuses a variable name declared earlier (scope-blind declaration dedup)Talvez já em andamento @JustinGrote assumiu há 148 dias. Aberta
PowerShell/PowerShellEditorServices#2282 · 1 comentário · 1 reação · 2 responsáveis ·
Todas as issues de PowerShell/PowerShellEditorServices
Issues semelhantes
-
copilot documentation
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 2 dias
-
[Rust][Flaky Test] multiple_deadlines_fire_in_order asserts a wall-clock gap instead of firing orderAbertaCI/CD ⚒️ Flaky-tests 🐦
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
valkey-io/valkey-glide#7255 ·
Mantenedores costumam responder em até 3 dias
-
bug good first issue
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 92/100
unoplatform/Uno.Core#99 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 86/100
aws/aws-dotnet-ai#75 ·