-
-
Notifications
You must be signed in to change notification settings - Fork 623
feat: Indicate modified buffers #1835
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
Changes from 4 commits
b65ecd6
b14b135
ece4c37
a34c907
84e4ff5
e501f16
00d3739
2ad6125
b3ed7c9
b4ef5e0
e95d3a5
9b04ff5
8bf609c
c7b20ca
621d634
2bbccb1
845069d
efb3805
ad6cb10
061a154
38846ab
9e15b32
e5c104d
4554681
413dc30
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -222,6 +222,7 @@ Subsequent calls to setup will replace the previous configuration. | |
highlight_git = false, | ||
full_name = false, | ||
highlight_opened_files = "none", | ||
highlight_modified = "none", | ||
root_folder_label = ":~:s?$?/..?", | ||
indent_width = 2, | ||
indent_markers = { | ||
|
@@ -240,6 +241,8 @@ Subsequent calls to setup will replace the previous configuration. | |
git_placement = "before", | ||
padding = " ", | ||
symlink_arrow = " ➛ ", | ||
modified = "[+]", | ||
modified_placement = "after", | ||
show = { | ||
file = true, | ||
folder = true, | ||
|
@@ -324,6 +327,12 @@ Subsequent calls to setup will replace the previous configuration. | |
show_on_open_dirs = true, | ||
timeout = 400, | ||
}, | ||
modified = { | ||
alex-courtis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
enable = false, | ||
show_on_dirs = true, | ||
show_on_open_dirs = false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could we perhaps change this to be consistent with git? show_on_dirs = true,
show_on_open_dirs = true, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually wanted to change git & diagnostics to the same as modified because I think that'd be the default that most people want, but didn't cause i thought that'd be breaking. Idk what is this plugin's stance on changes in default though, if you think it's alright I can make that change in this PR. In the mean time I'll change modified to be consistent with git for now :). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I'd like to change those defaults, they make more sense. That's what I use. Users do get upset when we make changes like that so we have avoided doing so. I am open to trying it again: how about we make a separate PR for those sensible defaults that we can revert if there is upset. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have this idea in my head for a while now. Wanted to open an issue but didn't find time to do investigation deep enough to justify it. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes.
We can break things in a controlled manner that will result in a better experience. We are also good at refactoring options, although we don't use it much.
Many lua plugins and packer are getting very good at handling versions. I think it is time.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did discover an interesting pattern with lualine: User is prompted to run
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's great to hear. Let's open a dedicated issue to discuss it further. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
debounce_delay = 50, | ||
alex-courtis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
actions = { | ||
use_system_clipboard = true, | ||
change_dir = { | ||
|
@@ -542,6 +551,7 @@ Configuration options for the system open command. | |
|
||
*nvim-tree.diagnostics* | ||
Show LSP and COC diagnostics in the signcolumn | ||
Note that the modified sign will take precedence over the diagnostics signs. | ||
alex-courtis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
`NOTE`: it will use the default diagnostic color groups to highlight the signs. | ||
If you wish to customize, you can override these groups: | ||
|
@@ -617,6 +627,28 @@ Git integration with icons and colors. | |
milliseconds but a few seconds), it will not render anything until the git | ||
process returned the data. | ||
|
||
*nvim-tree.modified* | ||
Indicate which file have unsaved modification. | ||
|
||
*nvim-tree.modified.enable* | ||
Enable / disable the feature. | ||
Type: `boolean`, Default: `false` | ||
|
||
*nvim-tree.modified.show_on_dirs* | ||
Show modified indication on directory whose children are modified. | ||
Type: `boolean`, Default: `true` | ||
|
||
*nvim-tree.modified.show_on_open_dirs* | ||
Show modified indication on open directories. | ||
Only relevant when |modified.show_on_dirs| is `true`. | ||
Type: `boolean`, Default: `false` | ||
|
||
*nvim-tree.modified.debounce_delay* | ||
Idle milliseconds between the file is modified and action. | ||
This helps performance when large number of files are modified in quick | ||
succession (e.g. lsp rename). | ||
Type: `number`, Default: `50` (ms) | ||
|
||
*nvim-tree.filesystem_watchers* | ||
Will use file system watcher (libuv fs_event) to watch the filesystem for | ||
changes. | ||
|
@@ -773,6 +805,13 @@ UI rendering setup | |
Value can be `"none"`, `"icon"`, `"name"` or `"all"`. | ||
Type: `string`, Default: `"none"` | ||
|
||
*nvim-tree.renderer.highlight_modified* | ||
Highlight icons and/or names for modified files using `NvimTreeModified` | ||
highlight groups. | ||
Value can be `"none"`, `"icon"`, `"name"` or `"all"` | ||
alex-courtis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
This can be used with or without the icons. | ||
Type: `string`, Default `"none"` | ||
|
||
*nvim-tree.renderer.root_folder_label* (previously `renderer.root_folder_modifier`) | ||
In what format to show root folder. See `:help filename-modifiers` for | ||
available `string` options. | ||
|
@@ -815,7 +854,7 @@ UI rendering setup | |
Place where the git icons will be rendered. | ||
Can be `"after"` or `"before"` filename (after the file/folders icons) | ||
or `"signcolumn"` (requires |nvim-tree.view.signcolumn| enabled). | ||
Note that the diagnostic signs will take precedence over the git signs. | ||
Note that the diagnostic signs and the modified sign will take precedence over the git signs. | ||
Type: `string`, Default: `before` | ||
|
||
*nvim-tree.renderer.icons.padding* | ||
|
@@ -827,6 +866,17 @@ UI rendering setup | |
Used as a separator between symlinks' source and target. | ||
Type: `string`, Default: `" ➛ "` | ||
|
||
*nvim-tree.renderer.icons.modified* | ||
Icon to display for modified files. Can be multiple characters if | ||
|renderer.icons.modified_placement| isn't `"signcolumn"`. | ||
Type: `string`, Default: `"[+]"` | ||
|
||
*nvim-tree.renderer.icons.modified_placement* | ||
Place where the modified icon will be rendered. | ||
Can be `"after"` or `"before"` filename (after the file/folders icons) | ||
or `"signcolumn"` (requires |nvim-tree.view.signcolumn| enabled). | ||
Type: `string`, Default: `after` | ||
|
||
*nvim-tree.renderer.icons.show* | ||
Configuration options for showing icon types. | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.