-
-
Notifications
You must be signed in to change notification settings - Fork 626
Chore/move renderer globals - Round 2 #1280
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
Chore/move renderer globals - Round 2 #1280
Conversation
@@ -1,61 +0,0 @@ | |||
local M = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
goodbye
function M.setup(opts) | ||
M.config = opts.renderer.icons | ||
|
||
M.devicons = pcall(require, "nvim-web-devicons") and require "nvim-web-devicons" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only needed once.
@@ -146,21 +143,17 @@ local function get_highlight_(node) | |||
return git_hl[git_status] | |||
end | |||
|
|||
M.get_icons = nil_ | |||
M.get_highlight = nil_ | |||
function M.setup(opts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reload was unnecessary; these can be set once.
@@ -84,9 +83,6 @@ local function get_links() | |||
end | |||
|
|||
function M.setup() | |||
if icons.get_config().show_file_icon and icons.get_config().has_devicons then | |||
require("nvim-web-devicons").setup() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to nvim-tree.setup
@@ -131,6 +131,35 @@ Values may be functions. Warning: this may result in unexpected behaviour. | |||
git_placement = "before", | |||
padding = " ", | |||
symlink_arrow = " ➛ ", | |||
show = { | |||
file = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plurals were removed e.g. files -> file, as they were inconsistent.
doc/nvim-tree-lua.txt
Outdated
folder_arrow = true, | ||
git = true, | ||
}, | ||
symbols = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renderer.icons.symbols
was the best name I could think of. Ideas welcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good to me :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry... changed my mind... glyphs
now.
Matches https://www.nerdfonts.com/ wording.
Merge #1279 first.
Simplifies a lot.
help doc has some bad formatting, mixing tabs and spaces. I'll fix the whole file later.