Skip to content
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

Foldmethod auto set manual #49

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 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
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ Use `setup` to override any of the default options
* `follow_node` : Keep the current node in focus on the source buffer
* `highlight` : Highlight the currently focused node
* reorient: Reorient buffer after changing nodes. options are "smart", "top", "mid" or "none"
* `folding` :
* `foldmethod_auto_set_manual` : Auto switch to manual mode
* `leading_spaces` : Add leading space to the foldmarker comment string

```lua
local navbuddy = require("nvim-navbuddy")
Expand Down Expand Up @@ -226,7 +229,11 @@ navbuddy.setup {
highlight = true, -- Highlight the currently focused node
reorient = "smart", -- "smart", "top", "mid" or "none"
scrolloff = nil -- scrolloff value when navbuddy is open
}
},
folding = {
foldmethod_auto_set_manual = true, -- Auto switch to manual mode
leading_spaces = 2, -- Add leading space to the foldmarker comment string
},
}
```

Expand Down
14 changes: 12 additions & 2 deletions doc/navbuddy.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Use |navbuddy.setup| to override any of the default options
the preference list is { "clangd", "pyright" }. Then clangd will
be prefered.

source_buffer:
source_buffer: table
follow_node: boolean
Move the source buffer such that focused node is visible.
highlight: boolean
Expand All @@ -100,6 +100,12 @@ Use |navbuddy.setup| to override any of the default options
Reorient buffer after changing nodes. options are "smart", "top",
"mid" or "none"

folding: table
foldmethod_auto_set_manual: bool
Auto switch to manual mode
leading_spaces: number
Add leading space to the foldmarker comment string

Defaults >

local navbuddy = require("nvim-navbuddy")
Expand Down Expand Up @@ -229,7 +235,11 @@ Defaults >
highlight = true, -- Highlight the currently focused node
reorient = "smart", -- "smart", "top", "mid" or "none"
scrolloff = nil -- scrolloff value when navbuddy is open
}
},
folding = {
foldmethod_auto_set_manual = true, -- Auto switch to manual mode
leading_spaces = 2, -- Add leading space to the foldmarker comment string
},
}
<
=============================================================================
Expand Down
Loading