Skip to content

Conversation

@924312
Copy link

@924312 924312 commented Jul 10, 2025

Powershell uses <# %s #> for multiline comments
I use Neovim with LazyVim which uses blink.cmp for the LSP as far as I can tell. I'm quite new to all this.

Treesitter does have a Powershell parser listed here https://github.com/tree-sitter/tree-sitter/wiki/List-of-parsers but I think everyone uses the powershell_es LSP instead. I installed powershell_es using Mason and it's working well.

I've created a plugin file for this with the change and tested it and it didn't work (good chance I did something wrong), but figured I'd give you the info anyway.

Powershell uses <# %s #> for multiline comments
I use Neovim with LazyVim which uses blink.cmp for the LSP as far as I can tell. I'm quite new to all this. 

Treesitter does have a Powershell parser listed here https://github.com/tree-sitter/tree-sitter/wiki/List-of-parsers but I think everyone uses the powershell_es LSP instead. I installed powershell_es using Mason and it's working well. 

I've created a plugin file for this with the change and tested it and it didn't work (good chance I did something wrong), but figured I'd give you the info anyway.
@924312
Copy link
Author

924312 commented Jul 10, 2025

I just installed Treesitter Powershell with :TSInstall powershell and have this plugin file:

return {
  "JoosepAlviste/nvim-ts-context-commentstring",
  opts = {
    languages = {
      powershell = { __default = "# %s", __multiline = "<# %s #>" },
    },
  },
}

Then closed and reopened my file but no luck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant