Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide flexibility to use different quickfix UIs in Build and Compile Actions. #730

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nsoufian
Copy link

@nsoufian nsoufian commented Dec 28, 2024

This PR introduces a new optional optionquickfix_open_cmd for the compile and build. This allows users to specify a custom command for opening the quickfix list. If not provided, the default behavior (copen) remains unchanged, ensuring backward compatibility.

The added option enables seamless integration with plugins that offer enhanced quickfix UIs, such as Trouble.nvim, providing a more customizable user experience for error navigation.

Please let me know if this change aligns with the project's vision and if it can be integrated.

Thank you for creating and maintaining this amazing plugin; it has significantly enhanced my workflow!

@nsoufian
Copy link
Author

@mfussenegger I wanted to ask if this pull request has a chance to be merged. I understand that this change might not bring a significant enhancement to most users, so please feel free to close it if it doesn't align with the project's goals or priorities.

Copy link
Owner

@mfussenegger mfussenegger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems okay to me to allow customizing this but left a suggestion.

lua/jdtls.lua Outdated
[3] = "CANCELLED",
}
print(string.format('Compile error. (%s)', reverse_status[result]))
vim.cmd(quickfix_open_cmd)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd change this to a function like on_compile_result(items), which defaults to function(_) vim.cmd("copen") end.
It gives a bit more flexibility without making it much more complex and would also handle #733

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the suggestion, it makes perfect sense to me. I’ve applied the change.

@nsoufian nsoufian force-pushed the ns/custom_quickfix branch from 8298cce to 1a097c5 Compare January 6, 2025 14:01
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.

2 participants