ayamir / nvimdots

A well configured and structured Neovim.
BSD 3-Clause "New" or "Revised" License
2.93k stars 466 forks source link

How to add xmake.nvim? #971

Closed Penguin-SAMA closed 1 year ago

Penguin-SAMA commented 1 year ago

Version confirmation

Following prerequisites

Neovim version

NVIM v0.9.1

Operating system/version

macos 14

Terminal name/version

iterm 2

$TERM environment variable

No response

Branch info

main (Default/Latest)

Fetch Preferences

SSH (use_ssh = true)

How to reproduce the issue

I filled in the following information in configs/custom/xmake.lua

return function() -- This file MUST return a function accepting no parameter and has no return value
    vim.g.compile_commands_dir = require(".vscode")
end

and filled in the following information in `plugins/custom.lua'

custom["Mythos-404/xmake.nvim"] = {
    lazy = true,
    event = "BufReadPost xmake.lua",
    config = true,
    dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
}

when i type :w xmake doesn't work, and it displayed Error code 255 image

Expected behavior

no error code, xmake.lua can work

Actual behavior

No response

Additional information

No response

ayamir commented 1 year ago

You set config = true so no need to add an xmake.lua as its config file. Remove the config/custom/xmake.lua. Switch to your work directory and nvim the real xmake.lua used to config how to build the project.

图片

Penguin-SAMA commented 1 year ago

I have removed xmake.lua, but still got the error

image
ayamir commented 1 year ago

did you install the xmake itself?

Penguin-SAMA commented 1 year ago

of course, The above file was generated with$ xmake create -l c -P ./hello

ayamir commented 1 year ago

It works for me after adding these lines to lua/modules/plugins/custom.lua:

local custom = {}

custom["Mythos-404/xmake.nvim"] = {
    lazy = true,
    event = "BufReadPost xmake.lua",
    config = true,
    dependencies = { "MunifTanjim/nui.nvim", "nvim-lua/plenary.nvim" },
}

return custom

You should open an issue to the plugin repo.