fix tabbyml plugin

This commit is contained in:
Dmitriy Pleshevskiy 2023-06-09 15:31:58 +03:00
parent 91b9f31c3f
commit b4a93f588f
Signed by: pleshevskiy
GPG key ID: 79C4487B44403985
3 changed files with 4 additions and 8 deletions

View file

@ -53,18 +53,13 @@ let
basicConfigs = map readFile [ ./config/basic.lua ]; basicConfigs = map readFile [ ./config/basic.lua ];
pluginConfigs = catAttrs "luaConfig" pluginsSettings; pluginConfigs = catAttrs "luaConfig" pluginsSettings;
allConfigs = basicConfigs ++ pluginConfigs ++ [ extraLuaConfig ]; allConfigs = basicConfigs ++ pluginConfigs ++ [ extraLuaConfig ];
# TODO: DRY
tabbymlEnable = lib.attrByPath [ "tabbyml" "enable" ] false plugins;
nodeJsEnable = tabbymlEnable;
in in
(wrapNeovim neovim-unwrapped { (wrapNeovim neovim-unwrapped {
inherit viAlias; inherit viAlias;
inherit vimAlias; inherit vimAlias;
withPython3 = false; withPython3 = false;
withNodeJs = nodeJsEnable; withNodeJs = false;
withRuby = false; withRuby = false;
configure = { configure = {

View file

@ -15,6 +15,7 @@ let
tabbymlEnable = lib.attrByPath [ "tabbyml" "enable" ] false plugins; tabbymlEnable = lib.attrByPath [ "tabbyml" "enable" ] false plugins;
tabbymlDefaultSettings = { tabbymlDefaultSettings = {
host = "http://127.0.0.1:8080"; host = "http://127.0.0.1:8080";
max_lines = 100;
}; };
tabbymlSettings = lib.toLua (lib.attrByPath [ "tabbyml" "settings" ] tabbymlDefaultSettings plugins); tabbymlSettings = lib.toLua (lib.attrByPath [ "tabbyml" "settings" ] tabbymlDefaultSettings plugins);
tabbymlLuaConfig = lib.optional tabbymlEnable tabbymlLuaConfig = lib.optional tabbymlEnable
@ -24,7 +25,7 @@ let
{ name = "nvim_lsp"; } { name = "nvim_lsp"; }
{ name = "luasnip"; } { name = "luasnip"; }
{ name = "orgmode"; } { name = "orgmode"; }
] ++ lib.optional tabbymlEnable [{ name = "cmp-tabby"; }]); ] ++ lib.optional tabbymlEnable [{ name = "cmp_tabby"; }]);
cmpLuaConfig = lib.readSubFile ./nvim-cmp.lua { inherit cmpSources; }; cmpLuaConfig = lib.readSubFile ./nvim-cmp.lua { inherit cmpSources; };
lspconfigLuaConfig = lib.readSubFile ./lspconfig.lua lspconfigLuaConfig = lib.readSubFile ./lspconfig.lua

View file

@ -36,5 +36,5 @@ cmp.setup({
end end
end, { "i", "s" }), end, { "i", "s" }),
}), }),
sources = @cmpSources@, sources = cmp.config.sources(@cmpSources@),
}) })