Skip to content

feat: add a :GpLog command #215

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 1 commit into from
Closed

feat: add a :GpLog command #215

wants to merge 1 commit into from

Conversation

teto
Copy link
Collaborator

@teto teto commented Sep 23, 2024

that opens up the logfile

@Robitx
Copy link
Owner

Robitx commented Sep 23, 2024

There should be :GpInspectLog available as default hook:

gp.nvim/lua/gp/config.lua

Lines 538 to 547 in 2372d53

-- GpInspectLog for checking the log file
InspectLog = function(plugin, params)
local log_file = plugin.config.log_file
local buffer = plugin.helpers.get_buffer(log_file)
if not buffer then
vim.cmd("e " .. log_file)
else
vim.cmd("buffer " .. buffer)
end
end,

@teto
Copy link
Collaborator Author

teto commented Sep 23, 2024

ha ty. :h :GpInspectLog returns nothing (while :h :GpInspectPlugin worked).
I would say that GpLog is more discoverable than GpInspectLog , aka it's similar to :LspLog, :Rocks log but it's not a strong case.

@Robitx
Copy link
Owner

Robitx commented Sep 23, 2024

Good point on both the rename and need to add to help.

@teto
Copy link
Collaborator Author

teto commented Sep 23, 2024

cool. I can rename InspectLog to Log but not sure how to add help to it ?

@Robitx
Copy link
Owner

Robitx commented Sep 23, 2024

Help is build automatically from readme. https://github.com/Robitx/gp.nvim?tab=readme-ov-file#other-commands

and reference the command in the README
@teto
Copy link
Collaborator Author

teto commented Oct 15, 2024

closed in favor of #222

@teto teto closed this Oct 15, 2024
@teto teto deleted the teto/add-GpLog branch October 15, 2024 13:58
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants