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

fix(telescope): last used selection fixed #47

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions doc/greyjoy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,55 @@ Usage ~
`require("greyjoy.conditions").directory_exists("mybindir", fileobj)`


==============================================================================
------------------------------------------------------------------------------
*defaults*
`defaults`
Default options:
>lua
local defaults = {
ui = {
buffer = { -- setting for buffer output
width = math.ceil(
math.min(vim.o.columns, math.max(80, vim.o.columns - 20))
),
height = math.ceil(
math.min(vim.o.lines, math.max(20, vim.o.lines - 10))
),
},
toggleterm = { -- by default no size is defined for the toggleterm by
-- greyjoy.nvim it will be dependent on the user configured size for toggle
-- term.
size = nil,
},
telescope = {
keys = {
select = "<CR>", -- enter
edit = "<C-e>", -- CTRL-e
},
},
},
toggleterm = {
-- default_group_id can be a number or a function that takes a string as parameter.
-- The string passed as parameter is the name of the plugin so its possible to do logic based
-- on plugin name and function should always return a number like:
-- default_group_id = function(plugin) return 1 end
default_group_id = 1,
},
enable = true, -- enable/disable plugin
border = "rounded", -- default borders
style = "minimal", -- default style for vim.ui.selector
show_command = false, -- show full command when selection
show_command_in_output = true, -- Show the command that was running in output
patterns = { ".git", ".svn" }, -- patterns to find the root of the project
output_result = "buffer", -- buffer or to toggleterm
default_shell = vim.o.shell, -- default shell to run tasks in
extensions = {}, -- no extensions are loaded per default
last_first = false, -- make sure last option is first on next run, not persistant
overrides = {}, -- make global overrides
}
<

==============================================================================
------------------------------------------------------------------------------
*greyjoy.cargo*
Expand Down
12 changes: 7 additions & 5 deletions lua/greyjoy/config.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-- Defaults
--- Default options:
---@eval return MiniDoc.afterlines_to_code(MiniDoc.current.eval_section)
local defaults = {
ui = {
buffer = { -- setting for buffer output
Expand Down Expand Up @@ -30,16 +31,17 @@ local defaults = {
},
enable = true, -- enable/disable plugin
border = "rounded", -- default borders
style = "minimal", -- default style
style = "minimal", -- default style for vim.ui.selector
show_command = false, -- show full command when selection
show_command_in_output = true, -- Show the command that was running in output
patterns = { ".git", ".svn" },
output_result = "buffer",
patterns = { ".git", ".svn" }, -- patterns to find the root of the project
output_result = "buffer", -- buffer or to toggleterm
default_shell = vim.o.shell, -- default shell to run tasks in
extensions = {},
extensions = {}, -- no extensions are loaded per default
last_first = false, -- make sure last option is first on next run, not persistant
overrides = {}, -- make global overrides
}
--minidoc_afterlines_end

-- Set/Change options
local function set(_, key, value)
Expand Down
Loading
Loading