Skip to content

Commit

Permalink
New start
Browse files Browse the repository at this point in the history
  • Loading branch information
luozhiya committed Sep 14, 2024
1 parent b72560e commit 2a022b8
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# fittencode.nvim

删繁就简,彻底重写了之前的 `fittencode.nvim` 插件。

新版本更加灵活和强大,具有许多新功能和改进:
14 changes: 14 additions & 0 deletions lua/fittencode/action.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
local Config = require("fittencode.config")

---@class fittencode.Action
local M = {}

function M.setup()
end

---@class Conversation
---@field id string
---@field message string[]
---@field source 'Bot'|'User'

return M
10 changes: 10 additions & 0 deletions lua/fittencode/api.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
local M = {}

function M._action(action)
end

return setmetatable(M, {
__index = function(_, k)
return M._action(k)
end
})
Empty file added lua/fittencode/command.lua
Empty file.
25 changes: 25 additions & 0 deletions lua/fittencode/config.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---@class fittencode.Config
local M = {}

local defaults = {}

local options = {}

---@param opts? fittencode.Config
function M.setup(opts)
vim.api.nvim_create_user_command('FittenCode', function(input)
require('fittencode.command').execute(input)
end, {
nargs = '*',
complete = function(...)
return require('fittencode.command').complete(...)
end,
desc = 'FittenCode',
})
end

return setmetatable(M, {
__index = function(_, key)
return options[key]
end,
})
Empty file added lua/fittencode/http.lua
Empty file.
13 changes: 13 additions & 0 deletions lua/fittencode/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---@class fittencode.api
local M = {}

---@param opts? fittencode.Config
function M.setup(opts)
require('fittencode.config').setup(opts)
end

return setmetatable(M, {
__index = function(_, key)
return require('fittencode.api')[key]
end,
})
13 changes: 13 additions & 0 deletions lua/fittencode/inline.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
local Config = require("fittencode.config")

---@class fittencode.Inline
local M = {}

function M.setup()

end

function M.accpet()
end

return M

0 comments on commit 2a022b8

Please sign in to comment.