nvim-lua / nvim-lua/kickstart.nvim

enhancement: add option for using Powershell as shell

Open
#1,788 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
31.5k
Forks
46.6k
Avg merge
2d 16h
Merged PRs (30d)
4

Description

In neovim/neovim#36881, documentation was added to show how to use powershell.exe (or pwsh.exe) as the shell. I have ported the VimScript to Lua:

if vim.fn.has("win32") == 1 then
  vim.o.shelltemp = false
  local shellcmdflag = "-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command "
  shellcmdflag = shellcmdflag .. "[Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.UTF8Encoding]::new();"
  shellcmdflag = shellcmdflag .. "$PSDefaultParameterValues['Out-File:Encoding']='utf8';"
  vim.o.shellpipe = "> %s 2>&1"
  vim.o.shellquote = ""
  vim.o.shellxquote = ""

  if vim.fn.executable("pwsh.exe") == 1 then
    vim.o.shell = "pwsh.exe"
    shellcmdflag = shellcmdflag .. "$PSStyle.OutputRendering = 'PlainText';"
    vim.env.__SuppressAnsiEscapeSequences = "1"
  else
    vim.o.shell = "powershell.exe"
  end
  vim.o.shellcmdflag = shellcmdflag
end

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no file or test; start by locating where kickstart.nvim configures the shell and compare that entry point with the supplied Lua snippet. The change is done when users have an option to use powershell.exe or pwsh.exe with the described settings, and the configuration remains valid on other platforms.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, powershell
Domain
cli
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.