Skip to content

Commit

Permalink
Step 7
Browse files Browse the repository at this point in the history
  • Loading branch information
luozhiya committed Jun 5, 2024
1 parent 91430d2 commit 5d311c7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,20 @@ use {
},
-- Enable/Disable the default keymaps in inline completion.
use_default_keymaps = true,
-- Default keymaps
keymaps = {
inline = {
['<TAB>'] = 'accept_all_suggestions',
['<C-Down>'] = 'accept_line',
['<C-Right>'] = 'accept_word',
['<C-Up>'] = 'revoke_line',
['<C-Left>'] = 'revoke_word',
['<A-\\>'] = 'triggering_completion',
},
chat = {
['q'] = 'close'
}
},
-- Setting for source completion.
source_completion = {
-- Enable source completion.
Expand Down
5 changes: 3 additions & 2 deletions lua/fittencode/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,9 @@ M.internal = {
function M.setup(opts)
---@class FittenCodeOptions
M.options = vim.tbl_deep_extend('force', defaults, opts or {})
if not M.options.use_default_keymaps then
M.options.keymaps = {}
if M.options.use_default_keymaps == false then
M.options.keymaps.inline = {}
M.options.keymaps.chat = {}
end
end

Expand Down

0 comments on commit 5d311c7

Please sign in to comment.