Miscellaneous Bug Fixes (#423)

fix: Show non-resolvable notes in winbar (#417)
fix: add more emojis and make emoji picker configurable (#414)
fix: comment creation should not be possible for renamed and moved files (#416)
fix: color highlight groups are invalid (#421)
fix: plugin failing to build on Windows (#419)

---------

Co-authored-by: Jakub F. Bortlík <jakub.bortlik@proton.me>
This commit is contained in:
Harrison (Harry) Cramer
2024-11-12 11:01:28 -05:00
committed by GitHub
parent 30daecfb60
commit be027331e1
17 changed files with 221 additions and 11079 deletions

View File

@@ -80,8 +80,10 @@ end
M.build = function(override)
local file_path = u.current_file_path()
local parent_dir = vim.fn.fnamemodify(file_path, ":h:h:h:h")
state.settings.bin_path = parent_dir
state.settings.bin = parent_dir .. (u.is_windows() and "\\bin.exe" or "/bin")
local bin_name = u.is_windows() and "bin.exe" or "bin"
state.settings.root_path = parent_dir
state.settings.bin = parent_dir .. u.path_separator .. "cmd" .. u.path_separator .. bin_name
if not override then
local binary_exists = vim.loop.fs_stat(state.settings.bin)
@@ -90,17 +92,15 @@ M.build = function(override)
end
end
local cmd = u.is_windows() and "cd %s\\cmd && go build -o bin.exe && move bin.exe ..\\"
or "cd %s/cmd && go build -o bin && mv bin ../bin"
local res = vim
.system({ "go", "build", "-o", bin_name }, { cwd = state.settings.root_path .. u.path_separator .. "cmd" })
:wait()
local command = string.format(cmd, state.settings.bin_path)
local null = u.is_windows() and " >NUL" or " > /dev/null"
local installCode = os.execute(command .. null)
if installCode ~= 0 then
u.notify("Could not install gitlab.nvim!", vim.log.levels.ERROR)
if res.code ~= 0 then
u.notify(string.format("Failed to install with status code %d:\n%s", res.code, res.stderr), vim.log.levels.ERROR)
return false
end
u.notify("Gitlab.nvim installed successfully!", vim.log.levels.INFO)
u.notify("Installed successfully!", vim.log.levels.INFO)
return true
end