Skip to content

Conversation

@dpetka2001
Copy link

Description

Add new shell_out for Neovim 0.11 onwards as kind for external commands messages

Related Issue(s)

Fixes #1097

Screenshots

@lljbash
Copy link

lljbash commented Apr 16, 2025

It seems that just adding shell_out is not enough.

image

@dpetka2001 dpetka2001 force-pushed the fix/msg_show.shell_out branch from 1201f65 to bdaa559 Compare April 16, 2025 07:26
@dpetka2001
Copy link
Author

I added shell_err and shell_ret, that seem related to the aforementioned issue. Not sure about the rest. Folke can decide what he further wants to include or not.

@lljbash
Copy link

lljbash commented Apr 16, 2025

I guess this fixes #1096 as well.

@dpetka2001
Copy link
Author

No, it doesn't from my testing. Something else must be amiss there, not sure what.

@lljbash
Copy link

lljbash commented Apr 16, 2025

BTW, do you think it is a mistake that :Noice filters out almost everything from msg_show by default?

-- You can add any custom commands below that will be available with `:Noice command`
---@type table<string, NoiceCommand>
commands = {
history = {
-- options for the message history that you get with `:Noice`
view = "split",
opts = { enter = true, format = "details" },
filter = {
any = {
{ event = "notify" },
{ error = true },
{ warning = true },
{ event = "msg_show", kind = { "" } },
{ event = "lsp", kind = "message" },
},
},
},
-- :Noice last
last = {
view = "popup",
opts = { enter = true, format = "details" },
filter = {
any = {
{ event = "notify" },
{ error = true },
{ warning = true },
{ event = "msg_show", kind = { "" } },
{ event = "lsp", kind = "message" },
},
},
filter_opts = { count = 1 },
},
-- :Noice errors
errors = {
-- options for the message history that you get with `:Noice`
view = "popup",
opts = { enter = true, format = "details" },
filter = { error = true },
filter_opts = { reverse = true },
},
all = {
-- options for the message history that you get with `:Noice`
view = "split",
opts = { enter = true, format = "details" },
filter = {},
},
},

At least with :Noice telescope I would like to see everything and filter it manually. Maybe using the all filter config for telescope?

local messages = Manager.get(Config.options.commands.history.filter, {
history = true,
sort = true,
reverse = true,
})

@dpetka2001
Copy link
Author

Sorry, but you're asking the wrong person about this. I have limited programming experience and am not familiar with Noice codebase at all.

This PR was just a simple fix. You should direct your question towards Folke.

@dpetka2001
Copy link
Author

I found something interesting regarding #1096. If you add print(#self._messages > 0) here before line 157

function View:display()
if #self._messages > 0 then
Format.align(self._messages, self._opts.align)
self:check_options()
, then this will be printed in the popup view.

It seems like the token from command lua require("noice").redirect("echo 3") is somehow being consumed?? No idea what might be causing this. Just mentioning this in case you might be able to figure out something that I fail to think of.

omrisarig13 pushed a commit to omrisarig13/kickstart.nvim that referenced this pull request Apr 27, 2025
The current version of the noice plugin in the upstream have a bug,
where command-line-code is not being sent to the user. This is quite
big, and have a big effect on the usability of the plugin.

There is a PR open for the fix of that, available here:
folke/noice.nvim#1098

However, until this PR is resolved, the plugin becomes unusable. Instead
of disabling it, we switch the used version to the forked version, which
have the fix available in it.
This commit should be reverted once the PR is solved in the upstreamed
noice.
omrisarig13 pushed a commit to omrisarig13/kickstart.nvim that referenced this pull request Apr 29, 2025
The current version of the noice plugin in the upstream have a bug,
where command-line-code is not being sent to the user. This is quite
big, and have a big effect on the usability of the plugin.

There is a PR open for the fix of that, available here:
folke/noice.nvim#1098

However, until this PR is resolved, the plugin becomes unusable. Instead
of disabling it, we switch the used version to the forked version, which
have the fix available in it.
This commit should be reverted once the PR is solved in the upstreamed
noice.
omrisarig13 pushed a commit to omrisarig13/kickstart.nvim that referenced this pull request Apr 29, 2025
The current version of the noice plugin in the upstream have a bug,
where command-line-code is not being sent to the user. This is quite
big, and have a big effect on the usability of the plugin.

There is a PR open for the fix of that, available here:
folke/noice.nvim#1098

However, until this PR is resolved, the plugin becomes unusable. Instead
of disabling it, we switch the used version to the forked version, which
have the fix available in it.
This commit should be reverted once the PR is solved in the upstreamed
noice.
omrisarig13 pushed a commit to omrisarig13/kickstart.nvim that referenced this pull request May 11, 2025
The current version of the noice plugin in the upstream have a bug,
where command-line-code is not being sent to the user. This is quite
big, and have a big effect on the usability of the plugin.

There is a PR open for the fix of that, available here:
folke/noice.nvim#1098

However, until this PR is resolved, the plugin becomes unusable. Instead
of disabling it, we switch the used version to the forked version, which
have the fix available in it.
This commit should be reverted once the PR is solved in the upstreamed
noice.
@github-actions
Copy link
Contributor

This PR is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the stale This issue or PR has been inactive for a while label May 17, 2025
omrisarig13 pushed a commit to omrisarig13/kickstart.nvim that referenced this pull request May 23, 2025
The current version of the noice plugin in the upstream have a bug,
where command-line-code is not being sent to the user. This is quite
big, and have a big effect on the usability of the plugin.

There is a PR open for the fix of that, available here:
folke/noice.nvim#1098

However, until this PR is resolved, the plugin becomes unusable. Instead
of disabling it, we switch the used version to the forked version, which
have the fix available in it.
This commit should be reverted once the PR is solved in the upstreamed
noice.
@Avsilver
Copy link

Avsilver commented Jul 7, 2025

Helped with a lot of headache. Hopefully this gets merged.

@github-actions github-actions bot removed the stale This issue or PR has been inactive for a while label Jul 30, 2025
@github-actions
Copy link
Contributor

This PR is stale because it has been open 30 days with no activity.

@github-actions github-actions bot added the stale This issue or PR has been inactive for a while label Aug 30, 2025
@github-actions github-actions bot removed the stale This issue or PR has been inactive for a while label Sep 29, 2025
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.

bug: Cannot get stdout while running !commands

3 participants