-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Add supermaven support * align with new config structure and add autostart flag * add TODO regarding supermaven and lualine --------- Co-authored-by: Michael <[email protected]>
- Loading branch information
1 parent
62dc73a
commit c7448bb
Showing
6 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
-- https://github.com/supermaven-inc/supermaven-nvim | ||
local user_config = vim.g.config.plugins.supermaven or {} | ||
|
||
local default_config = { | ||
enabled = false, | ||
autostart = false, | ||
opts = { | ||
disable_inline_completion = true, -- disables inline completion for use with cmp | ||
}, | ||
keys = { | ||
{ "<leader>mC", "<cmd>SupermavenToggle<cr>", desc = "Toggle Supermaven" }, | ||
}, | ||
} | ||
|
||
local config = vim.tbl_deep_extend("force", default_config, user_config) | ||
|
||
return { | ||
"supermaven-inc/supermaven-nvim", | ||
enabled = config.enabled, | ||
event = "InsertEnter", | ||
dependencies = "hrsh7th/nvim-cmp", | ||
opts = config.opts, | ||
keys = config.keys, | ||
config = function(_, opts) | ||
require("supermaven-nvim").setup(opts) | ||
local api = require("supermaven-nvim.api") | ||
if not config.autostart then | ||
if api.is_running() then | ||
api.stop() | ||
return | ||
end | ||
end | ||
end, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
return { | ||
apps = { | ||
Copilot = "", | ||
Supermaven = "", | ||
}, | ||
arrows = { | ||
ArrowRight = "❯", | ||
|