253 Commits

Author SHA1 Message Date
Harrison Cramer 0a4ce10aa1 Removed extra log 2023-08-14 17:59:40 -04:00
Harrison (Harry) Cramer fd99159c3d Update README.md 2023-08-14 17:48:48 -04:00
Harrison (Harry) Cramer 432a9b7ef2 Update README.md 2023-08-14 17:25:10 -04:00
Harrison (Harry) Cramer b4077ba8c2 Feat: Discussion Changes + Code Cleanup (#24)
* Changed to relative time

* Added days

* Updated display of discussion tree

* Updated a lot of functionality + behaviors for discussions + comments

* Modified state on deletion/creation

* Fixed relative times
2023-08-14 17:19:39 -04:00
Harrison (Harry) Cramer 8349bccb29 Update README.md
Fixed optional log path property!
2023-08-14 17:00:48 -04:00
Harrison (Harry) Cramer 7dfd6d24e7 Update README.md 2023-08-14 07:43:17 -04:00
Harrison (Harry) Cramer dce74035eb Update README.md
Updated the "Troubleshooting" Section
2023-08-14 07:42:53 -04:00
Harrison (Harry) Cramer a5dde79ea8 Update README.md 2023-08-14 07:24:23 -04:00
Harrison Cramer 97195d4ab5 Feat: Configure discussion tree split width and position
This MR improves the configurability of the plugin by using Nui's split
system rather than managing the splits ourselves. This lets the user
configure both the positioning of the discussion tree and it's width,
and reduces overall maintenance of split management for the plugin.
2023-08-12 14:36:48 -04:00
Harrison Cramer e958b35bd5 Minor comment changes in init.lua 2023-08-12 13:12:54 -04:00
Harrison Cramer feff814b56 Bugfix: State Initialization
This ensures that the state for the plugin has been initialized prior to
calling any of the other jobs. This ensures that they won't error if
called quickly after Neovim starts up
2023-08-12 13:07:04 -04:00
Harrison Cramer 7e4ca89198 Expose state for debugging purposes
This should hopefully make it easier to debug and for users to figure
out what's going on by exposing the state of the plugin.

It is a Lua table, and can be seen via `:lua print(require("gitlab").state)`

The easiest way to print out a Lua table is with some sort of utility
function like this:

```
function printTable(...)
  local objects = {}
  for i = 1, select("#", ...) do
    local v = select(i, ...)
    table.insert(objects, vim.inspect(v))
  end

  print(table.concat(objects, "\n"))
  return ...
end
```
2023-08-11 21:05:31 -04:00
Harrison Cramer 3d3bb764ba Bugfix: The job might not return JSON data, so we don't need to throw
here
2023-08-09 17:30:36 -04:00
Harrison Cramer 6ab8cfdc55 Bugfix: Shows error on failed startup (adds on_stderr handler) 2023-08-06 22:03:02 -04:00
Harrison Cramer 5f5f5d63c0 Bugfix: Fixed issue with JSON marshalling/unmarshalling 2023-08-06 15:30:17 -04:00
Harrison Cramer 68f27e5dc1 Use job wrapper for INFO call 2023-08-06 14:56:00 -04:00
Harrison (Harry) Cramer 4f0d4b49ef BREAKING CHANGE: Setup refactor and code cleanup
This MR makes several major tweaks to the codebase. Primarily it adjusts
the setup steps for the application so that rather than providing just
the project ID in the `.gitlab.nvim` file, users can also provide a
vareity of other settings, such as auth_token, base_branch, and so
forth. This is to make the project more extensible in the future.

This MR also fixes a variety of issues with error handling in the code,
primarily in the request/response model between the Lua jobs and the
Golang server.

BREAKING CHANGE: Modifies `.gitlab.nvim` and setup steps
2023-08-06 11:23:36 -04:00
Harrison (Harry) Cramer ade9f81426 Revert "Pull down all non-code notes (#14)" (#15)
This reverts commit f15711edab.
2023-08-04 14:31:55 -04:00
Harrison (Harry) Cramer f15711edab Pull down all non-code notes (#14)
This commit changes the filter on the API response so that we are only
filtering out system level notes. This means we get notes that are not
linked to specific locations in the code.

Subsequent work will have to separate these types of notes from the
other code-linked notes and probably display them in some sort of
separate tree.
2023-08-04 14:25:58 -04:00
Harrison Cramer 22389fdb3d BUGFIX: Don't error when there are no discussions for an MR, just alert
the user
2023-08-04 12:25:39 -04:00
Harrison (Harry) Cramer 1058559bd3 Update README.md
Clarified that make and Go are both requirements, added link to projects.
2023-08-04 09:54:18 -04:00
Harrison Cramer 2f60984c90 BUGFIX: Fix Error Notifications
These errors need to be wrapped in a delay call in order to actually
work, otherwise we run into this error: https://www.reddit.com/r/neovim/comments/qz4wy6/how_can_i_do_this/
2023-08-03 10:22:49 -04:00
Harrison Cramer 74afe95d0e BUGFIX: Don't try to start server when on main branch 2023-08-03 09:55:19 -04:00
Harrison Cramer b9538b1ce6 BUGFIX: Show all merge requests
We do not want to show only merge requests created by the current user,
   we want to show all merge requests for the current branch created by
   anyone.
2023-08-03 09:43:52 -04:00
Harrison (Harry) Cramer f8509ef0ca Update README.md 2023-08-02 11:50:03 -04:00
Harrison (Harry) Cramer 23a21b867b Removed notify as a dependency (#11)
Fixes: https://www.reddit.com/r/neovim/comments/14irqwt/comment/jphw2cx/?utm_source=share&utm_medium=web2x&context=3
2023-06-30 16:35:50 -04:00
Harrison (Harry) Cramer 4069b95b3d Update README.md 2023-06-14 11:20:09 -04:00
Paul Gothreau 8ba8266372 ensure discussion splits open correctly when splitright is set to true or false (#7) 2023-06-10 20:29:12 -04:00
Harrison Cramer b105e83f98 Updated readme 2023-05-20 09:54:13 -07:00
Harrison Cramer bf5da3e3e4 Added build binary 2023-05-20 09:53:23 -07:00
Harrison Cramer f5038656a9 Post MR cleanup (better error handling, comments, etc) 2023-05-20 09:42:00 -07:00
Harrison Cramer 27ec4668c1 Modified project_id logic to require .gitlab.nvim file 2023-05-19 18:20:16 -07:00
Harrison Cramer ca7c702fd0 Added port to job function 2023-05-19 17:36:37 -07:00
Harrison (Harry) Cramer 63fc025070 Change to HTTP Model (#5) 2023-05-19 17:28:58 -07:00
Harrison Cramer fe0d09d582 Updated todo.md file 2023-04-25 22:50:16 -04:00
Harrison Cramer 2a249cdf27 Line number set (either new_line or old_line) 2023-04-25 21:59:44 -04:00
Harrison Cramer 44323b9a11 Added command to open diffview 2023-04-25 21:54:29 -04:00
Harrison Cramer 55d7bf2d21 Cleaned up commnts and added notify events back 2023-04-25 20:41:04 -04:00
Harrison Cramer 1ce0c56121 Made comment code sequential to avoid multiple comments 2023-04-25 20:38:22 -04:00
Harrison Cramer 9eb8d08f14 Migrated comment.go to new approach (three API calls) 2023-04-25 20:27:30 -04:00
Harrison Cramer c2f1eb2b5b Finally fixed commenting on deletions 2023-04-23 19:02:37 -04:00
Harrison Cramer c479daa5fb Fixed comments for deleted lines 2023-04-23 18:56:39 -04:00
Harrison Cramer 182575d95a Comments on deleted lines 2023-04-23 17:21:13 -04:00
Harrison Cramer b0cdc5dd88 Don't error when there are no discussions 2023-04-23 14:32:19 -04:00
Harrison Cramer 74309af007 Set up comment to allow for comments on unmodified lines 2023-04-23 14:27:08 -04:00
Harrison (Harry) Cramer 08463c0b84 Develop (#4)
Adds `.gitlab.nvim` configuration file option.
2023-04-22 14:19:12 -04:00
Harrison (Harry) Cramer 899e04082e Develop (#3)
Moves build script into separate function and sets up instructions for Packer installs.
2023-04-22 13:53:58 -04:00
Harrison (Harry) Cramer 6154d4c9f3 Fix Notify Requires (#2)
Moves all notify require calls outside of scheduled calls
2023-04-22 12:52:07 -04:00
Harrison (Harry) Cramer 6ec3f15966 Update README.md 2023-04-22 12:33:05 -04:00
Harrison Cramer 3cd7f1db06 Added plenary to readme 2023-04-22 00:12:25 -04:00