Skip to content

Add status.tree_view option #1720

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: Homebrew/actions/setup-homebrew@master
- run: brew install lua-language-server
- uses: luarocks/gh-actions-lua@v10
with:
luaVersion: luajit
- uses: luarocks/gh-actions-luarocks@v5
with:
luaRocksVersion: "3.12.1"
- run: |
HOMEBREW_NO_INSTALL_CLEANUP=1 brew install lua-language-server
luarocks install llscheck
llscheck lua/
2 changes: 1 addition & 1 deletion .luarc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
"diagnostics.disable": [
"redefined-local"
],
Expand Down
18 changes: 16 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,23 @@ Simply clone *Neogit* to your project directory of choice to be able to use your
Logging is a useful tool for inspecting what happens in the code and in what order. Neogit uses
[`Plenary`](https://github.com/nvim-lua/plenary.nvim) for logging.

Export the environment variables `NEOGIT_LOG_CONSOLE="sync"` to enable logging, and `NEOGIT_LOG_LEVEL="debug"` for more
verbose logging.
#### Enabling logging via environment variables

- To enable logging to console, export `NEOGIT_LOG_CONSOLE="sync"`
- To enable logging to a file, export `NEOGIT_LOG_FILE="true"`
- For more verbose logging, set the log level to `debug` via `NEOGIT_LOG_LEVEL="debug"`

#### Enabling logging via lua api

To turn on logging while neovim is already running, you can use:

```lua
:lua require("neogit.logger").config.use_file = true -- for logs to ~/.cache/nvim/neogit.log.
:lua require("neogit.logger").config.use_console = true -- for logs to console.
:lua require("neogit.logger").config.level = 'debug' -- to set the log level
```

#### Using the logger from the neogit codebase

```lua
local logger = require("neogit.logger")
Expand Down
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
<div align="center" markdown="1">
<br>
<br>
<a href="https://www.warp.dev/neogit">
<img alt="Warp sponsorship" width="600" src="https://github.com/user-attachments/assets/c58acc85-7438-46a7-a89a-0f404c269256">
</a>

### [Warp, the intelligent terminal for developers](https://www.warp.dev/neogit)
#### [Try running neogit in Warp](https://www.warp.dev/neogit)<br>

</div>

<hr>

<div align="center">
<div>
<div><img src="https://github.com/NeogitOrg/neogit/assets/7228095/7684545f-47b5-40e2-aedd-ccf56e0553f4" width="400px"/></div>
Expand Down Expand Up @@ -148,6 +162,8 @@ neogit.setup {
HEAD_padding = 10,
HEAD_folded = false,
mode_padding = 3,
-- group changes by folder
tree_view = false,
mode_text = {
M = "modified",
N = "new file",
Expand Down Expand Up @@ -197,12 +213,6 @@ neogit.setup {
merge_editor = {
kind = "auto",
},
description_editor = {
kind = "auto",
},
tag_editor = {
kind = "auto",
},
preview_buffer = {
kind = "floating_console",
},
Expand Down Expand Up @@ -338,6 +348,7 @@ neogit.setup {
["<down>"] = "Next",
["<up>"] = "Previous",
["<tab>"] = "InsertCompletion",
["<c-y>"] = "CopySelection",
["<space>"] = "MultiselectToggleNext",
["<s-space>"] = "MultiselectTogglePrevious",
["<c-j>"] = "NOP",
Expand Down Expand Up @@ -382,6 +393,8 @@ neogit.setup {
["4"] = "Depth4",
["Q"] = "Command",
["<tab>"] = "Toggle",
["za"] = "Toggle",
["zo"] = "OpenFold",
["x"] = "Discard",
["s"] = "Stage",
["S"] = "StageUnstaged",
Expand Down Expand Up @@ -517,6 +530,12 @@ Neogit follows semantic versioning.

See [CONTRIBUTING.md](https://github.com/NeogitOrg/neogit/blob/master/CONTRIBUTING.md) for more details.

## Contributors

<a href="https://github.com/NeogitOrg/Neogit/graphs/contributors">
<img src="https://contrib.rocks/image?repo=NeogitOrg/Neogit" />
</a>

## Special Thanks

- [kolja](https://github.com/kolja) for the Neogit Logo
Expand Down
Loading