Skip to content

Commit

Permalink
fix: omit build parameter if nilPath provide
Browse files Browse the repository at this point in the history
  • Loading branch information
TwIStOy committed Feb 22, 2024
1 parent 2b02a0a commit 554ca47
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/conf/plugins/edit/markdown-preview-nivm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {

const spec: PluginOptsBase = {
shortUrl: "iamcco/markdown-preview.nvim",
nixPath: "markdown-preview-nvim",
lazy: {
ft: ["markdown"],
build: () => {
Expand Down
1 change: 1 addition & 0 deletions src/conf/plugins/other/gh-action-nvim.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const plugin = new Plugin({
lazy: {
cmd: ["GhActions"],
dependencies: ["nvim-lua/plenary.nvim", "MunifTanjim/nui.nvim"],
build: "make",
opts: {},
config: (_, opts) => {
luaRequire("gh-actions").setup(opts);
Expand Down
5 changes: 4 additions & 1 deletion src/core/model/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ export class Plugin<AIds extends string[] = []> {
if (!isNil(this._opts.nixPath)) {
let nixPlugins = ifNil(nix_plugins, new LuaTable());
let dir = nixPlugins.get(this._opts.shortUrl);
opts.dir = dir;
if (!isNil(dir)) {
opts.dir = dir;
opts.build = undefined;
}
}

let result = {
Expand Down

0 comments on commit 554ca47

Please sign in to comment.